Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RustCrypto/KEMs
/ functions
Functions
448 in github.com/RustCrypto/KEMs
⨍
Functions
448
◇
Types & classes
113
↓ 34 callers
Method
update
(&mut self, provided_data: Option<&RngSeed>)
frodo-kem/tests/rng.rs:91
↓ 33 callers
Function
const_ntt
A polynomial with only a scalar component, to make simple test cases
ml-kem/src/algebra.rs:358
↓ 26 callers
Method
as_bytes
(&self)
x-wing/src/lib.rs:192
↓ 25 callers
Function
gf_mul
(a: u16, b: u16)
hqc-kem/src/gf256.rs:44
↓ 24 callers
Method
algorithm
(&self)
frodo-kem/src/lib.rs:274
↓ 22 callers
Method
generate_keypair
Generate a new keypair consisting of a [`EncryptionKey`] and a [`DecryptionKey`]
frodo-kem/src/lib.rs:1311
↓ 18 callers
Method
zeroize
(&mut self)
hqc-kem/src/types.rs:243
↓ 15 callers
Method
encapsulate_with_rng
Encapsulate a random value to generate a [`SharedSecret`] and a [`Ciphertext`].
frodo-kem/src/lib.rs:334
↓ 15 callers
Function
generate_key
(rng: &mut impl rand::CryptoRng)
hqc-kem/src/lib.rs:106
↓ 14 callers
Method
encapsulate
Encapsulate: produce a ciphertext and shared secret.
hqc-kem/src/types.rs:323
↓ 12 callers
Method
repeat
(&self)
module-lattice/tests/encode.rs:40
↓ 12 callers
Method
zeroize
(&mut self)
frodo-kem/src/hazmat/models.rs:303
↓ 10 callers
Method
decapsulate
Decapsulate the [`Ciphertext`] to return the [`SharedSecret`] and message generated during encapsulation.
frodo-kem/src/lib.rs:400
↓ 9 callers
Method
as_ref
(&self)
dhkem/src/lib.rs:73
↓ 9 callers
Method
as_ref
(&self)
frodo-kem/src/lib.rs:262
↓ 9 callers
Function
bit0mask
(x: u32)
hqc-kem/src/reed_muller.rs:14
↓ 9 callers
Method
decapsulate
Decapsulate: recover shared secret from ciphertext.
hqc-kem/src/types.rs:373
↓ 8 callers
Function
gf_square
(a: u16)
hqc-kem/src/gf256.rs:56
↓ 7 callers
Method
ntt
(&self)
ml-kem/src/algebra.rs:163
↓ 7 callers
Method
to_bytes
Represent this decryption key as a byte array `(s_hat)`
ml-kem/src/pke.rs:106
↓ 6 callers
Method
ntt_inverse
(&self)
ml-kem/src/algebra.rs:220
↓ 5 callers
Method
to_seed
(&self)
ml-kem/src/decapsulation_key.rs:96
↓ 5 callers
Method
zeroize
(&mut self)
module-lattice/src/algebra.rs:131
↓ 4 callers
Function
G
(inputs: &[impl AsRef<[u8]>])
ml-kem/src/crypto.rs:8
↓ 4 callers
Function
barrett_reduce
()
module-lattice/tests/algebra.rs:25
↓ 4 callers
Function
gf_inverse
(a: u16)
hqc-kem/src/gf256.rs:64
↓ 4 callers
Function
load8_arr
(out: &mut [u64], inp: &[u8])
hqc-kem/src/poly.rs:250
↓ 4 callers
Method
public_key
(&self)
frodo-kem/src/hazmat/models.rs:337
↓ 4 callers
Function
radix
Radix conversion for small sizes (hardcoded cases).
hqc-kem/src/fft.rs:26
↓ 4 callers
Function
small_reduce
()
module-lattice/tests/algebra.rs:16
↓ 4 callers
Method
unpack
Unpack the input byte sequence into the output matrix See Algorithm 4 in the [spec](https://frodokem.org/files/FrodoKEM-specification-20210604.pdf).
frodo-kem/src/hazmat/traits.rs:724
↓ 4 callers
Function
vect_mul
Multiply two polynomials modulo X^n - 1.
hqc-kem/src/poly.rs:238
↓ 4 callers
Function
vect_resize
Resize vector: copy and potentially truncate.
hqc-kem/src/poly.rs:282
↓ 3 callers
Function
XOF
(rho: &B32, i: u8, j: u8)
ml-kem/src/crypto.rs:63
↓ 3 callers
Function
compute_subset_sums
Compute subset sums of a set.
hqc-kem/src/fft.rs:16
↓ 3 callers
Method
ct_eq
(&self, other: &Self)
ml-kem/src/pke.rs:33
↓ 3 callers
Method
decapsulate
(&self, encapsulated_key: &Ciphertext<P>)
ml-kem/src/decapsulation_key.rs:172
↓ 3 callers
Method
encapsulate_with_rng
(&self, rng: &mut R)
ml-kem/src/encapsulation_key.rs:78
↓ 3 callers
Method
encapsulation_key
(&self)
ml-kem/src/decapsulation_key.rs:102
↓ 3 callers
Method
encrypt
Encrypt the specified message for the holder of the corresponding decryption key, using the provided randomness, according the `K-PKE.Encrypt` procedu
ml-kem/src/pke.rs:134
↓ 3 callers
Method
expand_a
(&self, seed_a: &[u8], a: &mut [u16])
frodo-kem/src/hazmat/models.rs:549
↓ 3 callers
Function
expect_seed_bytes
(ref_pem: &str, expected_seed_prefix: &[u8])
ml-kem/tests/pkcs8.rs:203
↓ 3 callers
Method
get_bytes
Read `sz` bytes with 8-byte alignment waste. After reading `sz` bytes, discards `(8 - sz%8) % 8` bytes to maintain 8-byte alignment of the XOF stream
hqc-kem/src/shake.rs:39
↓ 3 callers
Method
h
Retrieve the hash of the encryption key.
ml-kem/src/encapsulation_key.rs:67
↓ 3 callers
Method
increment_counter
(&mut self)
frodo-kem/tests/rng.rs:113
↓ 3 callers
Function
keygen_deterministic
( seed_kem: &[u8; SEED_BYTES], p: &HqcParameters, )
hqc-kem/src/kem.rs:20
↓ 3 callers
Method
pack
Pack the matrix input into the output byte sequence See Algorithm 3 in the [spec](https://frodokem.org/files/FrodoKEM-specification-20210604.pdf).
frodo-kem/src/hazmat/traits.rs:674
↓ 3 callers
Function
parse_kat
Parse a KAT .rsp file and extract the first test vector.
hqc-kem/tests/kat.rs:60
↓ 3 callers
Method
sample
(&self, s: &mut [u16])
frodo-kem/src/hazmat/models.rs:563
↓ 3 callers
Function
sample_fixed_wt_mod
Sample a fixed-weight vector using modular mapping (v5.0.0 encrypt). Reads 4*weight bytes from XOF (with alignment waste), maps each u32 to position
hqc-kem/src/sampling.rs:24
↓ 3 callers
Function
sample_fixed_wt_rej
Sample a fixed-weight vector using rejection sampling (v5.0.0 keygen). Reads 3*weight bytes per XOF chunk (matching reference implementation), parses
hqc-kem/src/sampling.rs:93
↓ 3 callers
Method
seed_a
(&self)
frodo-kem/src/hazmat/models.rs:231
↓ 3 callers
Function
store8_arr
(out: &mut [u8], inp: &[u64])
hqc-kem/src/poly.rs:268
↓ 3 callers
Function
test_sample
(sample: &[Elem], ref_dist: &Distribution)
ml-kem/src/algebra.rs:529
↓ 3 callers
Method
to_bytes
(&self)
x-wing/src/lib.rs:154
↓ 3 callers
Method
to_bytes
(&self)
dhkem/src/x25519_kem.rs:69
↓ 3 callers
Method
to_public_key_der
Serialize the given `EncapsulationKey` into DER format. Returns a `Document` which wraps the DER document in case of success.
ml-kem/src/pkcs8.rs:102
↓ 3 callers
Method
try_decapsulate
( &self, encapsulated_key: &Ciphertext<EcdhKem<C>>, )
dhkem/src/ecdh_kem.rs:127
↓ 3 callers
Function
vect_add_assign
(v: &mut [u64], rhs: &[u64], size: usize)
hqc-kem/src/poly.rs:17
↓ 3 callers
Method
zeroize
(&mut self)
dhkem/src/lib.rs:131
↓ 3 callers
Method
zeroize
(&mut self)
ml-kem/src/pke.rs:54
↓ 2 callers
Function
H
(x: impl AsRef<[u8]>)
ml-kem/src/crypto.rs:23
↓ 2 callers
Function
J
(inputs: &[impl AsRef<[u8]>])
ml-kem/src/crypto.rs:35
↓ 2 callers
Method
add
Matrix subtraction
frodo-kem/src/hazmat/traits.rs:603
↓ 2 callers
Method
ciphertext_from_bytes
Obtain a ciphertext from a byte slice Returns Err if the byte slice is not the correct length
frodo-kem/src/lib.rs:1113
↓ 2 callers
Function
combiner
( ss_m: &ArrayN<u8, 32>, ss_x: &x25519_dalek::SharedSecret, ct_x: &PublicKey, pk_x: &PublicKey
x-wing/src/lib.rs:341
↓ 2 callers
Function
compute_fft_betas
Compute FFT betas (basis elements).
hqc-kem/src/fft.rs:9
↓ 2 callers
Method
ct_eq
(&self, other: &Self)
frodo-kem/src/lib.rs:494
↓ 2 callers
Method
ct_select
Constant time select for a u16 array
frodo-kem/src/hazmat/traits.rs:772
↓ 2 callers
Method
decrypt
Decrypt ciphertext to obtain the encrypted value, according to the K-PKE.Decrypt procedure. Algorithm 14. kK-PKE.Decrypt(dk_PKE, c)
ml-kem/src/pke.rs:90
↓ 2 callers
Method
decryption_key_from_bytes
Obtain a secret key from a byte slice Returns Err if the byte slice is not the correct length
frodo-kem/src/lib.rs:1005
↓ 2 callers
Function
encaps_deterministic
( ek_kem: &[u8], m: &[u8], salt: &[u8; SALT_BYTES], p: &HqcParameters, )
hqc-kem/src/kem.rs:69
↓ 2 callers
Method
encapsulate
Encapsulate with given message to generate a [`SharedSecret`] and a [`Ciphertext`]. NOTE: The message must be of the correct length for the algorithm
frodo-kem/src/lib.rs:346
↓ 2 callers
Method
encode_message
Matrix encoding into a bit sequence See Algorithm 1 in the [spec](https://frodokem.org/files/FrodoKEM-specification-20210604.pdf).
frodo-kem/src/hazmat/traits.rs:623
↓ 2 callers
Method
encryption_key_from_bytes
Obtain a public key from a byte slice Returns Err if the byte slice is not the correct length
frodo-kem/src/lib.rs:1059
↓ 2 callers
Function
expand_key
( sk: &[u8; DECAPSULATION_KEY_SIZE], )
x-wing/src/lib.rs:271
↓ 2 callers
Function
fft_rec
Recursive FFT evaluation.
hqc-kem/src/fft.rs:102
↓ 2 callers
Function
hash_g
G function: SHA3-512(data || 0x00). Returns 64 bytes.
hqc-kem/src/shake.rs:55
↓ 2 callers
Function
hash_h
H function: SHA3-256(data || 0x01). Returns 32 bytes.
hqc-kem/src/shake.rs:66
↓ 2 callers
Method
matrix_b
(&self)
frodo-kem/src/hazmat/models.rs:243
↓ 2 callers
Method
matrix_s
(&self)
frodo-kem/src/hazmat/models.rs:349
↓ 2 callers
Function
matrix_sample_ntt
(rho: &B32, transpose: bool)
ml-kem/src/algebra.rs:94
↓ 2 callers
Method
mul_add_sa_plus_e
Multiply by s' on the left. Uses matrix A column-wise Inputs: s', e' (N_BAR x N) Output: out = s'*A + e' (N_BAR x N)
frodo-kem/src/hazmat/traits.rs:465
↓ 2 callers
Method
mul_add_sb_plus_e
Multiply by s on the left Inputs: b (N x N_BAR), s (N_BAR x N), e (N_BAR x N_BAR) Output: out = s*b + e (N_BAR x N_BAR)
frodo-kem/src/hazmat/traits.rs:525
↓ 2 callers
Function
multiplicity
Number of repetitions for a given parameter set.
hqc-kem/src/reed_muller.rs:8
↓ 2 callers
Function
pke_encrypt
PKE encryption. Returns ciphertext bytes: u_bytes || v_bytes (n_bytes + n1n2_bytes).
hqc-kem/src/pke.rs:64
↓ 2 callers
Function
read_from
(reader: &mut Shake256Reader)
x-wing/src/lib.rs:358
↓ 2 callers
Method
read_raw
Raw squeeze without alignment waste. Used in KEM keygen for seed_pke and sigma.
hqc-kem/src/shake.rs:49
↓ 2 callers
Method
reseed
Reseed the DRBG with a new seed
frodo-kem/tests/rng.rs:83
↓ 2 callers
Function
sample_ntt
Algorithm 7: `SampleNTT(B)`
ml-kem/src/algebra.rs:34
↓ 2 callers
Function
sample_vect
Sample a random binary vector of n bits via XOF.
hqc-kem/src/sampling.rs:11
↓ 2 callers
Method
shared_secret_from_bytes
Obtain a shared secret from a byte slice Returns Err if the byte slice is not the correct length
frodo-kem/src/lib.rs:1212
↓ 2 callers
Method
to_bytes
(&self)
ml-kem/src/decapsulation_key.rs:231
↓ 2 callers
Method
to_expanded_bytes
(&self)
ml-kem/src/decapsulation_key.rs:276
↓ 2 callers
Method
to_pkcs8_der
Serialize the given `DecapsulationKey` into DER format. Returns a `SecretDocument` which wraps the DER document in case of success.
ml-kem/src/pkcs8.rs:161
↓ 2 callers
Method
try_fill_bytes
(&mut self, dest: &mut [u8])
hqc-kem/tests/kat.rs:42
↓ 2 callers
Function
vect_add
(o: &mut [u64], v1: &[u64], v2: &[u64], size: usize)
hqc-kem/src/poly.rs:9
↓ 1 callers
Function
barrett_reduce
(val: u32, n: u32, reciprocal: u32)
hqc-kem/src/sampling.rs:78
↓ 1 callers
Function
base_case_multiply
(a0: Elem, a1: Elem, b0: Elem, b1: Elem, i: usize)
ml-kem/src/algebra.rs:271
↓ 1 callers
Function
base_mul
(a: u64, b: u64)
hqc-kem/src/poly.rs:36
next →
1–100 of 448, ranked by callers