etsi014-client

Crates.ioetsi014-client
lib.rsetsi014-client
version0.1.2
sourcesrc
created_at2024-10-10 12:57:36.854705
updated_at2024-11-28 10:37:52.231132
descriptionETSI GS QKD 014 client library
homepage
repositoryhttps://github.com/TUe-QTS/ETSI-QKD014-client
max_upload_size
id1403780
size40,466
(qukedi)

documentation

README

ETSI GS QKD 014 client command-line program and library for Rust and C

DOI crates.io

Quantum Key Distribution (QKD) hardware provides cryptographic keys that can be used to secure confidential data. This software allows to request keys exchanged using QKD from QKD hardware or a Key Management System by following the ETSI GS QKD 014 standard. It is then up to the user of this library to use these keys to encrypt data. There are 3 ways to use the client: as a command-line program, as a Rust crate or as a C library.

Dependencies

Install Rust. Then install libsodium:

Debian

sudo apt install libsodium-dev

Windows

  1. Download the latest libsodium release.
  2. Copy libsodium\x64\Release\v143\dynamic\libsodium.dll into C:\Windows\System32\.
  3. Copy libsodium\x64\Release\v143\dynamic\libsodium.lib into C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433\lib\x64 and rename it to sodium.lib.

Command-line program

Installation

cd binary
cargo install --path .

Usage

Retrieving KME status:

$ etsi014-cli --host kms.example.org --port 443 --key client-1.key --cert client-1.crt --server-ca server-ca.crt --target-sae-id client-2 status
source_KME_ID=kms-1.example.org
target_KME_ID=kms-2.example.org
source_SAE_ID=client-1
target_SAE_ID=client-2
key_size=256
...

Requesting new keys:

$ etsi014-cli --host kms.example.org --port 443 --key client-1.key --cert client-1.crt --server-ca server-ca.crt --target-sae-id client-2 get-keys --amount 3 --key-size 256
851884a2-57c3-4b83-876e-6de27882d003=1ca3bcde45f880df267c0c70110921c77c442b28400e2f67ba2f84d408aa2a1c
16771d3f-994b-4850-aa5e-86138544a4a6=4b1a4cd007e672f8e662d72e8c62c146c36485668cfbddb2245c113d551b41fa
b81bfeec-c35f-45e1-a394-361da46f3dcb=1b7bc8a5c3a4a994bb6e1e69005c595c206116e381f8670b168024a028d21277

Requesting keys by UUID:

$ etsi014-cli --host kms.example.org --port 443 --key client-2.key --cert client-2.crt --server-ca server-ca.crt --target-sae-id client-1 get-keys-by-ids --ids=851884a2-57c3-4b83-876e-6de27882d003,16771d3f-994b-4850-aa5e-86138544a4a6,b81bfeec-c35f-45e1-a394-361da46f3dcb
851884a2-57c3-4b83-876e-6de27882d003=1ca3bcde45f880df267c0c70110921c77c442b28400e2f67ba2f84d408aa2a1c
16771d3f-994b-4850-aa5e-86138544a4a6=4b1a4cd007e672f8e662d72e8c62c146c36485668cfbddb2245c113d551b41fa
b81bfeec-c35f-45e1-a394-361da46f3dcb=1b7bc8a5c3a4a994bb6e1e69005c595c206116e381f8670b168024a028d21277

Rust crate

Shared library with C API

Installation

cargo build --release --lib
sudo cp target/release/libetsi014_client.so /usr/local/lib/libetsi014_client.so
# Header for development
sudo mkdir /usr/local/include/etsi014-client/
sudo cp library/c/etsi014-client.h /usr/local/include/etsi014-client/etsi014-client.h

Usage

Documentation

Acknowledgements

This project is funded by the Dutch Research Council under the FIQCS project (NWA.1436.20.005).

License

This project is licensed under the MIT license.

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed under the MIT license and the Apache-2.0 license, without any additional terms or conditions.

BibLaTex Citation

To cite this project, we recommend the following:

@software{aquina_etsi_qkd_014_2024,
          title = {{ETSI} {GS} {QKD} 014 client command-line program and library for {Rust} and {C}},
          rights = {{MIT} License},
          url = {https://doi.org/10.4121/3618fc0a-6b89-46c3-8199-5cf5bdb46a29},
          publisher = {4TU.{ResearchData}},
          author = {Aquina, Nick and Rommel, Simon and Tafur Monroy, Idelfonso},
          date = {2024},
          doi = {10.4121/3618FC0A-6B89-46C3-8199-5CF5BDB46A29},
}
Commit count: 13

cargo fmt