All Projects → pq-crystals → kyber

pq-crystals / kyber

Licence: other
No description or website provided.

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects
assembly
5116 projects
CMake
9771 projects

Projects that are alternatives of or similar to kyber

dilithium
No description or website provided.
Stars: ✭ 166 (-2.35%)
Mutual labels:  post-quantum-cryptography, lattice-based-crypto, post-quantum, module-lattices
frodo
practical quantum-secure key encapsulation from generic lattices
Stars: ✭ 17 (-90%)
Mutual labels:  post-quantum-cryptography, key-exchange-algorithms, lattice-based-crypto, module-lattices
lwe-frodo
Post-quantum key exchange from the learning with errors problem — from the paper "Frodo: Take off the ring! Practical, Quantum-Secure Key Exchange from LWE", published in ACM CCS 2016, https://eprint.iacr.org/2016/659
Stars: ✭ 36 (-78.82%)
Mutual labels:  post-quantum-cryptography, key-exchange-algorithms
virgil-crypto-c
This library is designed to be small, flexible and convenient wrapper for a variety crypto algorithms. So it can be used in a small micro controller as well as in a high load server application.
Stars: ✭ 24 (-85.88%)
Mutual labels:  crypto, post-quantum-cryptography
DAPSCoin
DAPS is the world's first coin to implement Bulletproofs and RingCT & Ring Signatures in a staking chain. With DAPS it is possible to stake, run masternodes and mine PoA blocks.
Stars: ✭ 58 (-65.88%)
Mutual labels:  crypto
documentation
Documentation, Guides, Whitepapers
Stars: ✭ 22 (-87.06%)
Mutual labels:  crypto
twitter-crypto-bot
This is a Twitter bot that tweets about cryptocurrencies prices every certain amount of minutes
Stars: ✭ 21 (-87.65%)
Mutual labels:  crypto
TAcharts
Apply popular TA tools and charts to candlestick data with NumPy.
Stars: ✭ 131 (-22.94%)
Mutual labels:  crypto
github-did
Decentralized Identity with Github
Stars: ✭ 108 (-36.47%)
Mutual labels:  crypto
crypto-news
Crypto News allows you to convert cryptocurrencies, view latest news and exchange rates for each ICO – all the data from the world of cryptocurrencies in one place.
Stars: ✭ 26 (-84.71%)
Mutual labels:  crypto
TomatoTools
TomatoTools 一款CTF杂项利器,支持36种常见编码和密码算法的加密和解密,31种密文的分析和识别,支持自动提取flag,自定义插件等。
Stars: ✭ 66 (-61.18%)
Mutual labels:  crypto
sphincsplus
The SPHINCS+ reference code, accompanying the submission to NIST's Post-Quantum Cryptography project
Stars: ✭ 53 (-68.82%)
Mutual labels:  post-quantum-cryptography
BerylEnigma
一个为渗透测试与CTF而制作的工具集,主要实现一些加解密的功能。
Stars: ✭ 329 (+93.53%)
Mutual labels:  crypto
hydro
Libhydrogen bindings for Erlang
Stars: ✭ 19 (-88.82%)
Mutual labels:  crypto
banana split
Shamir's Secret Sharing for people with friends
Stars: ✭ 106 (-37.65%)
Mutual labels:  crypto
eth-commerce
Javascript library to accept ethereum payments on any website
Stars: ✭ 24 (-85.88%)
Mutual labels:  crypto
common
Utilities and base libraries for use across polkadot-js for Polkadot and Substrate. Includes base libraries, crypto helpers and cross-environment helpers. Full documentation & examples available.
Stars: ✭ 221 (+30%)
Mutual labels:  crypto
sike-java
SIKE for Java is a software library that implements experimental supersingular isogeny cryptographic schemes that aim to provide protection against attackers running a large-scale quantum computer.
Stars: ✭ 28 (-83.53%)
Mutual labels:  post-quantum-cryptography
noble-ed25519
Fastest JS implementation of ed25519, x25519 & ristretto255. Independently audited, high-security, 0-dependency EDDSA signatures and ECDH key agreement
Stars: ✭ 220 (+29.41%)
Mutual labels:  crypto
gravity-sphincs
Signature scheme submitted to NIST's Post-Quantum Cryptography Project
Stars: ✭ 67 (-60.59%)
Mutual labels:  post-quantum-cryptography

Kyber

Build Status Coverage Status

This repository contains the official reference implementation of the Kyber key encapsulation mechanism, and an optimized implementation for x86 CPUs supporting the AVX2 instruction set. Kyber is a finalist in round 3 of the NIST PQC standardization project.

Build instructions

The implementations contain several test and benchmarking programs and a Makefile to facilitate compilation.

Prerequisites

Some of the test programs require OpenSSL. If the OpenSSL header files and/or shared libraries do not lie in one of the standard locations on your system, it is necessary to specify their location via compiler and linker flags in the environment variables CFLAGS, NISTFLAGS, and LDFLAGS.

For example, on macOS you can install OpenSSL via Homebrew by running

brew install openssl

Then, run

export CFLAGS="-I/usr/local/opt/[email protected]/include"
export NISTFLAGS="-I/usr/local/opt/[email protected]/include"
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"

before compilation to add the OpenSSL header and library locations to the respective search paths.

Test programs

To compile the test programs on Linux or macOS, go to the ref/ or avx2/ directory and run

make

This produces the executables

test/test_kyber$ALG
test/test_kex$ALG
test/test_vectors$ALG

where $ALG ranges over the parameter sets 512, 768, 1024, 512-90s, 768-90s, 1024-90s.

  • test_kyber$ALG tests 1000 times to generate keys, encapsulate a random key and correctly decapsulate it again. Also, the program tests that the keys cannot correctly be decapsulated using a random secret key or a ciphertext where a single random byte was randomly distorted in order to test for trivial failures of the CCA security. The program will abort with an error message and return 1 if there was an error. Otherwise it will output the key and ciphertext sizes and return 0.
  • test_kex$ALG tests the authenticated key exchange schemes derived from the Kyber KEM
  • test_vectors$ALG generates 10000 sets of test vectors containing keys, ciphertexts and shared secrets whose byte-strings are output in hexadecimal. The required random bytes come from a simple deterministic expansion of a fixed seed defined in test_vectors.c.

Benchmarking programs

For benchmarking the implementations, we provide speed test programs for x86 CPUs that use the Time Step Counter (TSC) or the actual cycle counter provided by the Performance Measurement Counters (PMC) to measure performance. To compile the programs run

make speed

This produces the executables

test/test_speed$ALG

for all parameter sets $ALG as above. The programs report the median and average cycle counts of 1000 executions of various internal functions and the API functions for key generation, encapsulation and decapsulation. By default the Time Step Counter is used. If instead you want to obtain the actual cycle counts from the Performance Measurement Counters, export CFLAGS="-DUSE_RDPMC" before compilation.

Please note that the reference implementation in ref/ is not optimized for any platform, and, since it prioritises clean code, is significantly slower than a trivially optimized but still platform-independent implementation. Hence benchmarking the reference code does not provide meaningful results.

Our Kyber implementations are contained in the SUPERCOP benchmarking framework. See here for cycle counts on an Intel KabyLake CPU.

Shared libraries

All implementations can be compiled into shared libraries by running

make shared

For example in the directory ref/ of the reference implementation, this produces the libraries

libpqcrystals_kyber$ALG_ref.so

for all parameter sets $ALG, and the required symmetric crypto libraries

libpqcrystals_aes256ctr_ref.so
libpqcrystals_fips202_ref.so

All global symbols in the libraries lie in the namespaces pqcrystals_kyber$ALG_ref, libpqcrystals_aes256ctr_ref and libpqcrystals_fips202_ref. Hence it is possible to link a program against all libraries simultaneously and obtain access to all implementations for all parameter sets. The corresponding API header file is ref/api.h, which contains prototypes for all API functions and preprocessor defines for the key and signature lengths.

CMake

Also available is a portable cmake based build system that permits building the reference implementation.

By calling

mkdir build && cd build && cmake .. && cmake --build . && ctest

the Kyber reference implementation gets built and tested.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].