Skip to main content

Instructions

How to set up the server and run the client with a default configuration

Server

Installing

  • Create a conda environment (optional but recommended)
$ conda create -n Quantumacy python=3.8.10
$ conda activate Quantumacy
  • install requirements
$ pip install QKDSimkit
  • Download, install and run Redis
$ wget https://download.redis.io/releases/redis-6.2.6.tar.gz
$ tar xzf redis-6.2.6.tar.gz
$ cd redis-6.2.6
$ make
$ src/redis-server

Redis is a requirement for QKDSimkit server and QKDSimkit p2p

Executing

  • Run the server and the channel on the same machine, it will start both the server and the channel, the default addresses are 127.0.0.1:5002 for server and 127.0.0.1:5000 for channel
$ QKDSimkit server local
  • It is possible to run the channel with custom settings adding noise (-n) and simulating an eavesdropper (-e)
$ QKDSimkit server local -n 0.5 -e True
  • In case you want to share an already existing channel with other servers or with a peer to peer infrastructure you can use this command to connect the server to an external channel:
$ QKDSimkit server -a [host:port] external -ca [host:port]

Additional commands

  • Add a user: specify a token, it can be useful for multiple clients
$ QKDSimkit server add_user <token>
  • Retrieve keys from server it is possible to specify a token (-t) to retrieve a specific set of keys
$ QKDSimkit server retrieve 

Help

For more options please check

$ QKDSimkit server -h
$ QKDSimkit server local -h
$ QKDSimkit server external -h
$ QKDSimkit server add_user -h
$ QKDSimkit server retrieve -h

Client

Installation

  • Create a conda environment (optional but recommended)
$ conda create -n Quantumacy python=3.8
$ conda activate Quantumacy
  • Install requirements
$ pip install QKDSimkit

Executing

  • Run client
$ QKDSimkit client [server_host:port] [channel_host:port]
  • It is possible to specify the number of keys (-n) and their size (-s):
$ QKDSimkit client [server_host:port] [channel_host:port] -n [num_keys] -s [size]
  • To handle multiple clients it is possible to run the client with a pre shared token
$ QKDSimkit client -t [token] [server_host:port] [channel_host:port] 
  • If you are using a token remember to add the same token in the server running in the server machine:
$ QKDSimkit server add_user [token]

Help

For more options please check

$ python client -h

P2P

The peer to peer mode provides two servers (Alice and Bob) to simulate a synchronous exchange, there are three components: the channel, Alice and Bob

  • Use the following command to run the channel, you can use this channel also in the Server - Client architecture and similarly it is possible to use custom settings like noise (-n) and eavesdropper (-e)
$ QKDSimkit channel -a [hostname:port]
  • Run Alice
$ QKDSimkit p2p alice -c [channel_address] -a [hostname:port]
  • Run Bob
$ QKDSimkit p2p bob -c [channel_address] -a [hostname:port]
  • You can use http requests to Alice and Bob to start the exchange and retrieve keys.
    Check http://[address]/docs to access FastAPI documentation and to know more about http request parameters

Authors

Contributor names and contact info:

Alberto Di Meglio

Gabriele Morello [email]

License

This project is licensed under the MIT License - see the LICENSE file for details

Version History

  • 0.0.6
  • 0.0.5
  • 0.0.2
  • 0.0.1
    • Initial Release

Acknowledgments

Metadata

Release files for QKDSimkit 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for QKDSimkit 0.0.7
File Size Uploaded
QKDSimkit-0.0.7.tar.gz 19.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for QKDSimkit 0.0.7
File Interpreter ABI Platform
QKDSimkit-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 45.5 kB

Release files / QKDSimkit-0.0.7.tar.gz

Download URL QKDSimkit-0.0.7.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0de73471690db3ebded70a1fe9e43aabfd45f6b458a2b99f8c790c57b2cf2b16
BLAKE2b-256 checksum
How to use checksums
0609c5467dda9dbe60293831f7ac0563a870a6c743efaf70cfe89f2387dd291e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

Release files / QKDSimkit-0.0.7-py3-none-any.whl

Download URL QKDSimkit-0.0.7-py3-none-any.whl
Size 26.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
125c1cf734ccc543224c62332c758f20daf38ca88f5c1d0ac6c1774efecbf68f
BLAKE2b-256 checksum
How to use checksums
31a6cc42970909cb647a38fddd56260d2cd0bc1176ec18369aea81aee1b82632
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.12

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page