fips203ipd
C11 implementation of FIPS 203 initial public draft (IPD).
|
KEM512 constants and functions. More...
Functions | |
void | fips203ipd_kem512_keygen (uint8_t ek[static FIPS203IPD_KEM512_EK_SIZE], uint8_t dk[static FIPS203IPD_KEM512_DK_SIZE], const uint8_t seed[static FIPS203IPD_KEYGEN_SEED_SIZE]) |
Generate KEM512 encapsulation key ek and decapsulation key dk from 64 byte random seed seed . More... | |
void | fips203ipd_kem512_encaps (uint8_t key[static FIPS203IPD_KEY_SIZE], uint8_t ct[static FIPS203IPD_KEM512_CT_SIZE], const uint8_t ek[static FIPS203IPD_KEM512_EK_SIZE], const uint8_t seed[static FIPS203IPD_ENCAPS_SEED_SIZE]) |
Generate KEM512 shared key key and ciphertext ct from given encapsulation key ek and randomness seed . More... | |
void | fips203ipd_kem512_decaps (uint8_t key[static FIPS203IPD_KEY_SIZE], const uint8_t ct[static FIPS203IPD_KEM512_CT_SIZE], const uint8_t dk[static FIPS203IPD_KEM512_DK_SIZE]) |
Decapsulate shared key key from ciphertext ct using KEM512 decapsulation key dk with implicit rejection. More... | |
KEM512 constants and functions.
void fips203ipd_kem512_decaps | ( | uint8_t | key[static FIPS203IPD_KEY_SIZE], |
const uint8_t | ct[static FIPS203IPD_KEM512_CT_SIZE], | ||
const uint8_t | dk[static FIPS203IPD_KEM512_DK_SIZE] | ||
) |
Decapsulate shared key key
from ciphertext ct
using KEM512 decapsulation key dk
with implicit rejection.
[out] | key | Shared key (32 bytes). |
[out] | ct | Ciphertext (768 bytes). |
[in] | dk | KEM512 decapsulation key (1632 bytes). |
Example:
void fips203ipd_kem512_encaps | ( | uint8_t | key[static FIPS203IPD_KEY_SIZE], |
uint8_t | ct[static FIPS203IPD_KEM512_CT_SIZE], | ||
const uint8_t | ek[static FIPS203IPD_KEM512_EK_SIZE], | ||
const uint8_t | seed[static FIPS203IPD_ENCAPS_SEED_SIZE] | ||
) |
Generate KEM512 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 128 bits of strength.pqc-forum
discussion.[out] | key | Shared key (32 bytes). |
[out] | ct | Ciphertext (768 bytes). |
[in] | ek | KEM512 encapsulation key (800 bytes). |
[in] | seed | Random seed (32 bytes). |
Example:
void fips203ipd_kem512_keygen | ( | uint8_t | ek[static FIPS203IPD_KEM512_EK_SIZE], |
uint8_t | dk[static FIPS203IPD_KEM512_DK_SIZE], | ||
const uint8_t | seed[static FIPS203IPD_KEYGEN_SEED_SIZE] | ||
) |
Generate KEM512 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 128 bits of strength.[out] | ek | KEM512 encapsulation key (800 bytes). |
[out] | dk | KEM512 decapsulation key (1632 bytes). |
[in] | seed | Random seed (64 bytes). |
Example: