This repository includes the implementations for dilithium and kyber post quantum algorithms. It also includes an implementation of post-quantum safe comunication protocol and an application for exchaning files/chatting utilizing this protocol.
Install go here.
While in the root git directory run with:
go build -o pqcom
Either run the compiled binary from compilation or run with:
go run .
See the flag -h
for additional information and the flag -h
in other commands, for example ./pqcom app chat -h
.
This application is capable of benchmarking all the available algorithms by using the the tests defined in crypto/kem_test.go
and crypto/sign_test.go
. Addionally the application benchstat
can be used on the results. Few examples of benchmarks:
-
Benchmark only the sum of all KEM and Digital signature operations together
go test -count=8 -timeout=24h -bench="Kem$|Signature$" -run=ˆ# ./... | tee out.txt && benchstat out.txt
-
Benchmark all operations and separate operations for all KEMs and Digital signatures
go test -count=8 -timeout=24h -bench="Kem|Signature" -run=ˆ# ./... | tee out.txt && benchstat out.txt
The listening port and target/listening address can be changed using flags. For more specific information check ./pqcom app -h
Before chatting or file exchange can be done a confoguration file has to be specified. Path to a configuration file can be specified in 3 ways:
ENV
variable calledPQCOM_CONFIG
- Using the
--config
flag - Default config location at
$HOME/.config/pqcom/pqcom.json
To generate example config files for server and client run
./pqcom config gen
To specify different algorithms for communicating run
./pqcom config gen -h
and see available flags. To check the list available algorithsm run
./pqcom config list
To run the app in chat mode, the clint runs
./pqcom app chat -c --config pqcom_client.json
and the server runs:
./pqcom app chat -l --config pqcom_server.json
To exchange files, the receiver has to run
./pqcom app receive --config pqcom_server.json > output.txt
and the client that sends the file has to run
cat test.txt | ./pqcom app send --config pqcom_client.json
Install go here.
While the root git directory run with:
go test -v ./...
The folder wireshark
contains a README
about wireshark dissector integration for the implemented protocol.