GithubHelp home page GithubHelp logo

creeppork / next-door-key-simulator Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 80 KB

Quantum key distribution (QKD) key management entity (KME) simulator based on the ETSI GS QKD 014 V1.1.1 standard

License: MIT License

Python 83.80% Dockerfile 1.73% Shell 14.48%
qkd qkd-simulator etsi-qkd-014 docker docker-compose next-door-key

next-door-key-simulator's Introduction

Next Door Key Simulator

Quantum key distribution (QKD) key management entity (KME) simulator based on the ETSI GS QKD 014 V1.1.1 standard.

Abbreviations

  • CA - Certificate Authority
  • KME - Key Management Entity (server)
  • SAE - Secure Application Entity (client)
  • QKD - Quantum Key Distribution

Requirements

  • Docker
  • Docker Compose

Installation

  1. git clone https://github.com/CreepPork/next-door-key-simulator
  2. cd next-door-key-simulator
  3. bash ./certs/generate.sh
  4. docker compose up -d

Introduction

In the Docker Compose file there are 2 KMEs and for each KME there is 1 SAE. If you want, you can modify the example and use only 1 KME and 1 SAE.

The KMEs communicate with each other using proprietary endpoints to share the generated keys between the other KMEs. ( This would be implemented by a real KME using quantum protocols).

The KMEs discover each other by only giving their host address (configurable in the OTHER_KMES environment variable).

Implementation details

Do not use this simulator in any type of production environment because, in no way, this simulator is secure.

The given QKD KME simulator currently only supports POST method on /enc_keys and /dec_keys endpoints, no support for GET is given.

Troubleshooting

Socket hang up

As per the standard, there is an authentication process with mututal TLS certificates. If this error occurs the most likely reason, is that you are not giving the client TLS certificates.

If you are using Postman, this can be easily enabled by:

  • using the respective KME's SAE auto-generated certificates (available in the certs directory);
  • and configuring Postman as follows: Cog > Settings > Certificates > Client Certificates > Add Certificate.

postman-config

Waiting for response

Sometimes, the Docker containers will get stuck and are not either responding to user requests, or doing any kind of sync operations between the KMEs.

It might be caused by host network interruptions, both containers starting at the same time and not being able to connect, and possibly more scenarios.

The best option, is to just restart either 1 or both containers using this command in your terminal:

docker compose restart
docker compose logs -f

This will restart both containers, and afterward enter following mode for the console logs. Then you should see the new log entries starting to appear.

Disclaimer

This project originally has been developed for LatQN (Latvian National Quantum Network) project in association with LVRTC (Latvian State Radio and Television Center).

next-door-key-simulator's People

Contributors

creeppork avatar

Watchers

 avatar

Forkers

filip2142

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.