Public git repository
The primary source to obtain the Kyber software is the public GitHub repository. To download and build the software, follow the following steps:
cd kyber/ref && make
cd ../avx2 && make
In each of the subdirectories ref/ and avx/ this will build 26 binaries. For each of the 6 parameter sets Kyber-512, Kyber-512-90s, Kyber-768, Kyber-768-90s, Kyber-1024, and Kyber-1024-90s, it will build test_kyber, test_kex, test_vectors, and test_speed. Additionally it will build the NIST test-vector generation binary PQCgenKAT_kem for the recommended parameter set Kyber-768.
- test_kyber runs several invocations of key generation, encapsulation and decapsulation and tests that they produce the same key on both sides. Also it runs several key exchanges with modified secret key or with modified ciphertext and tests that the key exchange fails. If all tests are successful, the program only prints sizes of secret key, public key, and ciphertext.
- test_kex runs several tests of unilaterally authenticated and mutually authenticated key exchange and, if successful, prints only the amount of data transmitted by the two participants
- test_vectors prints deterministically generated testvectors of several executions of Kyber. This binary is meant to be used to ensure compatibility of different independent implementations.
- test_speed prints benchmarks of various subroutines of Kyber. It assumes cycle counting on an Intel CPU.
Integration with Open Quantum Safe
For users of the Open Quantum Safe framework it may be easier to use liboqs, which includes an implementation of Kyber.
Integration with PQClean
Users who are looking for an easy way to drop multiple different NIST PQC candidates into an existing codebase, might want to use the implementations of Kyber integrated into PQClean; this is also how liboqs integrates Kyber.
In the following list we collect links to third-party implementations of Kyber. These implementations are not maintained by the CRYSTALS team; please contact the authors for any issues with those implementations.
- Kyber is now integrated in version 3.0 release of the Botan C++ crypto and TLS library.
- Implementation in Rust by Argyle Software.
- Implementation in Python by Dominik Klein.
- Kyber is now part of the Beta version of Bouncy Castle.
- Implementation in Java by Steven Fisher.
- Implementation in Typescript by Steven Fisher; see also the NPM package.
- Implementation in Go by Yawning Angel.
- Proof-of-concept Python implementation using RSA accelerators by Martin R. Albrecht, Christian Hanser, Andrea Hoeller, Thomas Pöppelmann, Fernando Virdia, and Andreas Wallner. See also the corresponding paper.
- Kyber-K2SO, a Go implementation of Kyber by Nadim Kobeissi aiming for small code and easy readibility.