fips203ipd
C11 implementation of FIPS 203 initial public draft (IPD).
|
KEM768 constants and functions. More...
Functions | |
void | fips203ipd_kem768_keygen (uint8_t ek[static FIPS203IPD_KEM768_EK_SIZE], uint8_t dk[static FIPS203IPD_KEM768_DK_SIZE], const uint8_t seed[static FIPS203IPD_KEYGEN_SEED_SIZE]) |
Generate KEM768 encapsulation key ek and decapsulation key dk from 64 byte random seed seed . More... | |
void | fips203ipd_kem768_encaps (uint8_t key[static FIPS203IPD_KEY_SIZE], uint8_t ct[static FIPS203IPD_KEM768_CT_SIZE], const uint8_t ek[static FIPS203IPD_KEM768_EK_SIZE], const uint8_t seed[static FIPS203IPD_ENCAPS_SEED_SIZE]) |
Generate KEM768 shared key key and ciphertext ct from given encapsulation key ek and randomness seed . More... | |
void | fips203ipd_kem768_decaps (uint8_t key[static FIPS203IPD_KEY_SIZE], const uint8_t ct[static FIPS203IPD_KEM768_CT_SIZE], const uint8_t dk[static FIPS203IPD_KEM768_DK_SIZE]) |
Decapsulate shared key key from ciphertext ct using KEM768 decapsulation key dk with implicit rejection. More... | |
KEM768 constants and functions.
void fips203ipd_kem768_decaps | ( | uint8_t | key[static FIPS203IPD_KEY_SIZE], |
const uint8_t | ct[static FIPS203IPD_KEM768_CT_SIZE], | ||
const uint8_t | dk[static FIPS203IPD_KEM768_DK_SIZE] | ||
) |
Decapsulate shared key key
from ciphertext ct
using KEM768 decapsulation key dk
with implicit rejection.
[out] | key | Shared key (32 bytes). |
[out] | ct | Ciphertext (1088 bytes). |
[in] | dk | KEM768 decapsulation key (2400 bytes). |
Example:
void fips203ipd_kem768_encaps | ( | uint8_t | key[static FIPS203IPD_KEY_SIZE], |
uint8_t | ct[static FIPS203IPD_KEM768_CT_SIZE], | ||
const uint8_t | ek[static FIPS203IPD_KEM768_EK_SIZE], | ||
const uint8_t | seed[static FIPS203IPD_ENCAPS_SEED_SIZE] | ||
) |
Generate KEM768 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 192 bits of strength.pqc-forum
discussion.[out] | key | Shared key (32 bytes). |
[out] | ct | Ciphertext (1088 bytes). |
[in] | ek | KEM768 encapsulation key (1184 bytes). |
[in] | seed | Random seed (32 bytes). |
Example:
void fips203ipd_kem768_keygen | ( | uint8_t | ek[static FIPS203IPD_KEM768_EK_SIZE], |
uint8_t | dk[static FIPS203IPD_KEM768_DK_SIZE], | ||
const uint8_t | seed[static FIPS203IPD_KEYGEN_SEED_SIZE] | ||
) |
Generate KEM768 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 192 bits of strength.[out] | ek | KEM768 encapsulation key (1184 bytes). |
[out] | dk | KEM768 decapsulation key (2400 bytes). |
[in] | seed | Random seed (64 bytes). |
Example: