MersennePKC is a post-quantum cryptosystem adapted from this paper. It is based on the hardness of distinguishing a quotient of two numbers with small Hamming weight in a finite field whose order is some Mersenne prime.
This repository contains the report detailing the construction of MersennePKC as well as an implementation of MersennePKC as a library. There are two programs: the first (in main.rs) is a sample program that does an encryption and decryption proof of concept, while the second (in graph.rs) plots graphs that were used to verify the correctness of MersennePKC.
Compiling MersennePKC requires the Rust compiler (version >= 1.34) and an installation of Cargo. Rust and Cargo can be installed easily by using Rustup.
- To compile a release build, perform
cargo build --release
. To compile a debug build, performcargo build
. - To run the test suite, perform
cargo test
. - To run the proof of concept sample program, perform
cargo run --release --bin main
. - To run the graph plotting program, perform
cargo run --release --bin graph
.
Directory | Contents |
---|---|
report/ | LaTeX sources and figures for the report |
src/ | Source code |
src/bin/main.rs | Proof of concept program |
src/bin/graph.rs | Analysis and graph plotting program |
_src/lib.rs | MersennePKC library functions |