NOISE_HASH_LEN
get_random_bytes(checker->secret, NOISE_HASH_LEN);
blake2s_init_key(&blake, COOKIE_LEN, checker->secret, NOISE_HASH_LEN);
get_random_bytes(checker->secret, NOISE_HASH_LEN);
u8 secret[NOISE_HASH_LEN];
static u8 handshake_init_hash[NOISE_HASH_LEN] __ro_after_init;
static u8 handshake_init_chaining_key[NOISE_HASH_LEN] __ro_after_init;
size_t data_len, const u8 chaining_key[NOISE_HASH_LEN])
hmac(secret, data, chaining_key, data_len, NOISE_HASH_LEN);
handshake_init_chaining_key, NOISE_HASH_LEN);
const u8 chaining_key[NOISE_HASH_LEN])
blake2s_init(&blake, NOISE_HASH_LEN);
static bool __must_check mix_dh(u8 chaining_key[NOISE_HASH_LEN],
blake2s_update(&blake, handshake_init_chaining_key, NOISE_HASH_LEN);
kdf(chaining_key, key, NULL, dh_calculation, NOISE_HASH_LEN,
static bool __must_check mix_precomputed_dh(u8 chaining_key[NOISE_HASH_LEN],
kdf(chaining_key, key, NULL, precomputed, NOISE_HASH_LEN,
static void mix_hash(u8 hash[NOISE_HASH_LEN], const u8 *src, size_t src_len)
blake2s_init(&blake, NOISE_HASH_LEN);
blake2s_update(&blake, hash, NOISE_HASH_LEN);
static void mix_psk(u8 chaining_key[NOISE_HASH_LEN], u8 hash[NOISE_HASH_LEN],
u8 temp_hash[NOISE_HASH_LEN];
kdf(chaining_key, temp_hash, key, psk, NOISE_HASH_LEN, NOISE_HASH_LEN,
mix_hash(hash, temp_hash, NOISE_HASH_LEN);
memzero_explicit(temp_hash, NOISE_HASH_LEN);
static void handshake_init(u8 chaining_key[NOISE_HASH_LEN],
u8 hash[NOISE_HASH_LEN],
memcpy(hash, handshake_init_hash, NOISE_HASH_LEN);
memcpy(chaining_key, handshake_init_chaining_key, NOISE_HASH_LEN);
u8 hash[NOISE_HASH_LEN])
NOISE_HASH_LEN,
u8 hash[NOISE_HASH_LEN])
hash, NOISE_HASH_LEN,
u8 chaining_key[NOISE_HASH_LEN],
u8 hash[NOISE_HASH_LEN])
kdf(chaining_key, NULL, NULL, ephemeral_src, NOISE_HASH_LEN, 0, 0,
u8 chaining_key[NOISE_HASH_LEN];
u8 hash[NOISE_HASH_LEN];
memcpy(handshake->hash, hash, NOISE_HASH_LEN);
memcpy(handshake->chaining_key, chaining_key, NOISE_HASH_LEN);
memzero_explicit(hash, NOISE_HASH_LEN);
memzero_explicit(chaining_key, NOISE_HASH_LEN);
u8 hash[NOISE_HASH_LEN];
u8 chaining_key[NOISE_HASH_LEN];
memcpy(hash, handshake->hash, NOISE_HASH_LEN);
memcpy(chaining_key, handshake->chaining_key, NOISE_HASH_LEN);
memcpy(handshake->hash, hash, NOISE_HASH_LEN);
memcpy(handshake->chaining_key, chaining_key, NOISE_HASH_LEN);
memzero_explicit(hash, NOISE_HASH_LEN);
memzero_explicit(chaining_key, NOISE_HASH_LEN);
memset(&handshake->hash, 0, NOISE_HASH_LEN);
memset(&handshake->chaining_key, 0, NOISE_HASH_LEN);
u8 hash[NOISE_HASH_LEN];
u8 chaining_key[NOISE_HASH_LEN];