Crate qfall_schemes

Crate qfall_schemes 

Source
Expand description

qFALL is a prototyping library for lattice-based cryptography. qFALL-schemes collects prototype implementations of lattice-based cryptography s.t. anyone can audit, modify, extend, or build on top of them to prototype more involved constructions or protocols. Among these are traits and implemented constructions of:

The qFALL project contains two more crates called qFALL-math and qFALL-tools to support prototyping.

§Quick Example

use qfall_schemes::pk_encryption::{KPKE, PKEncryptionScheme};
use qfall_math::integer::Z;

// setup public parameters
let k_pke = KPKE::ml_kem_512();

// generate (pk, sk) pair
let (pk, sk) = k_pke.key_gen();

// encrypt a message
let msg = Z::from_utf8("Hello");
let cipher = k_pke.enc(&pk, &msg);

// decrypt the ciphertext
let m = k_pke.dec(&sk, &cipher);

assert_eq!(msg, m);

Modules§

hash
Contains traits and implementations related to hash functions.
identity_based_encryption
Contains traits and implementations related to Identity-Based Encryption (IBE) schemes.
pk_encryption
Contains traits and implementations related to Public-Key Encryption (PKE) schemes.
signature
Contains traits and implementations related to signature schemes.