1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! # kyber
//!
//! This crate provides bindings to and wrappers around the following
//! implementations from [PQClean][pqc]:
//!
//! * kyber512 - clean
//! * kyber768 - clean
//! * kyber1024 - clean
//!
//! [pqc]: https://github.com/pqclean/pqclean/
//!

#![no_std]
#![allow(clippy::len_without_is_empty)]

// For no-std vectors
extern crate alloc;

// For tests
#[cfg(feature = "std")]
extern crate std;

pub mod ffi;
pub mod kyber1024;
pub mod kyber512;
pub mod kyber768;

pub use crate::kyber1024::{
    ciphertext_bytes as kyber1024_ciphertext_bytes, decapsulate as kyber1024_decapsulate,
    encapsulate as kyber1024_encapsulate, keypair as kyber1024_keypair,
    public_key_bytes as kyber1024_public_key_bytes, secret_key_bytes as kyber1024_secret_key_bytes,
    shared_secret_bytes as kyber1024_shared_secret_bytes,
};
pub use crate::kyber512::{
    ciphertext_bytes as kyber512_ciphertext_bytes, decapsulate as kyber512_decapsulate,
    encapsulate as kyber512_encapsulate, keypair as kyber512_keypair,
    public_key_bytes as kyber512_public_key_bytes, secret_key_bytes as kyber512_secret_key_bytes,
    shared_secret_bytes as kyber512_shared_secret_bytes,
};
pub use crate::kyber768::{
    ciphertext_bytes as kyber768_ciphertext_bytes, decapsulate as kyber768_decapsulate,
    encapsulate as kyber768_encapsulate, keypair as kyber768_keypair,
    public_key_bytes as kyber768_public_key_bytes, secret_key_bytes as kyber768_secret_key_bytes,
    shared_secret_bytes as kyber768_shared_secret_bytes,
};