fips203ipd
C11 implementation of FIPS 203 initial public draft (IPD).
|
KEM1024 constants and functions. More...
Functions | |
void | fips203ipd_kem1024_keygen (uint8_t ek[static FIPS203IPD_KEM1024_EK_SIZE], uint8_t dk[static FIPS203IPD_KEM1024_DK_SIZE], const uint8_t seed[static FIPS203IPD_KEYGEN_SEED_SIZE]) |
Generate KEM1024 encapsulation key ek and decapsulation key dk from 64 byte random seed seed . More... | |
void | fips203ipd_kem1024_encaps (uint8_t key[static FIPS203IPD_KEY_SIZE], uint8_t ct[static FIPS203IPD_KEM1024_CT_SIZE], const uint8_t ek[static FIPS203IPD_KEM1024_EK_SIZE], const uint8_t seed[static FIPS203IPD_ENCAPS_SEED_SIZE]) |
Generate KEM1024 shared key key and ciphertext ct from given encapsulation key ek and randomness seed . More... | |
void | fips203ipd_kem1024_decaps (uint8_t key[static FIPS203IPD_KEY_SIZE], const uint8_t ct[static FIPS203IPD_KEM1024_CT_SIZE], const uint8_t dk[static FIPS203IPD_KEM1024_DK_SIZE]) |
Decapsulate shared key key from ciphertext ct using KEM1024 decapsulation key dk with implicit rejection. More... | |
KEM1024 constants and functions.
void fips203ipd_kem1024_decaps | ( | uint8_t | key[static FIPS203IPD_KEY_SIZE], |
const uint8_t | ct[static FIPS203IPD_KEM1024_CT_SIZE], | ||
const uint8_t | dk[static FIPS203IPD_KEM1024_DK_SIZE] | ||
) |
Decapsulate shared key key
from ciphertext ct
using KEM1024 decapsulation key dk
with implicit rejection.
[out] | key | Shared key (32 bytes). |
[out] | ct | Ciphertext (1568 bytes). |
[in] | dk | KEM1024 decapsulation key (3168 bytes). |
Example:
void fips203ipd_kem1024_encaps | ( | uint8_t | key[static FIPS203IPD_KEY_SIZE], |
uint8_t | ct[static FIPS203IPD_KEM1024_CT_SIZE], | ||
const uint8_t | ek[static FIPS203IPD_KEM1024_EK_SIZE], | ||
const uint8_t | seed[static FIPS203IPD_ENCAPS_SEED_SIZE] | ||
) |
Generate KEM1024 shared key key
and ciphertext ct
from given encapsulation key ek
and randomness seed
.
seed
must be 32 random bytes generated by a cryptographically secure pseudorandom number generator (CSPRNG). Specifically, section 3.3 of the FIPS 203 initial public draft requires an approved random bit generator (RBG) with at least 256 bits of strength.pqc-forum
discussion.[out] | key | Shared key (32 bytes). |
[out] | ct | Ciphertext (1568 bytes). |
[in] | ek | KEM1024 encapsulation key (1568 bytes). |
[in] | seed | Random seed (32 bytes). |
Example:
void fips203ipd_kem1024_keygen | ( | uint8_t | ek[static FIPS203IPD_KEM1024_EK_SIZE], |
uint8_t | dk[static FIPS203IPD_KEM1024_DK_SIZE], | ||
const uint8_t | seed[static FIPS203IPD_KEYGEN_SEED_SIZE] | ||
) |
Generate KEM1024 encapsulation key ek
and decapsulation key dk
from 64 byte random seed seed
.
seed
must be 64 random bytes generated by a cryptographically secure pseudorandom number generator (CSPRNG). Specifically, section 3.3 of the FIPS 203 initial public draft requires an approved random bit generator (RBG) with at least 256 bits of strength.[out] | ek | KEM1024 encapsulation key (1568 bytes). |
[out] | dk | KEM1024 decapsulation key (3168 bytes). |
[in] | seed | Random seed (64 bytes). |
Example: