Lines Matching refs:hash

82 	memset(&handshake->hash, 0, NOISE_HASH_LEN);
432 static void mix_hash(u8 hash[NOISE_HASH_LEN], const u8 *src, size_t src_len)
437 blake2s_update(&blake, hash, NOISE_HASH_LEN);
439 blake2s_final(&blake, hash);
442 static void mix_psk(u8 chaining_key[NOISE_HASH_LEN], u8 hash[NOISE_HASH_LEN],
450 mix_hash(hash, temp_hash, NOISE_HASH_LEN);
455 u8 hash[NOISE_HASH_LEN],
458 memcpy(hash, handshake_init_hash, NOISE_HASH_LEN);
460 mix_hash(hash, remote_static, NOISE_PUBLIC_KEY_LEN);
465 u8 hash[NOISE_HASH_LEN])
467 chacha20poly1305_encrypt(dst_ciphertext, src_plaintext, src_len, hash,
470 mix_hash(hash, dst_ciphertext, noise_encrypted_len(src_len));
475 u8 hash[NOISE_HASH_LEN])
478 hash, NOISE_HASH_LEN,
481 mix_hash(hash, src_ciphertext, src_len);
488 u8 hash[NOISE_HASH_LEN])
492 mix_hash(hash, ephemeral_src, NOISE_PUBLIC_KEY_LEN);
537 handshake_init(handshake->chaining_key, handshake->hash,
547 handshake->hash);
557 NOISE_PUBLIC_KEY_LEN, key, handshake->hash);
567 NOISE_TIMESTAMP_LEN, key, handshake->hash);
592 u8 hash[NOISE_HASH_LEN];
602 handshake_init(chaining_key, hash, wg->static_identity.static_public);
605 message_ephemeral(e, src->unencrypted_ephemeral, chaining_key, hash);
613 sizeof(src->encrypted_static), key, hash))
629 sizeof(src->encrypted_timestamp), key, hash))
647 memcpy(handshake->hash, hash, NOISE_HASH_LEN);
659 memzero_explicit(hash, NOISE_HASH_LEN);
694 handshake->hash);
707 mix_psk(handshake->chaining_key, handshake->hash, key,
711 message_encrypt(dst->encrypted_nothing, NULL, 0, key, handshake->hash);
735 u8 hash[NOISE_HASH_LEN];
755 memcpy(hash, handshake->hash, NOISE_HASH_LEN);
767 message_ephemeral(e, src->unencrypted_ephemeral, chaining_key, hash);
778 mix_psk(chaining_key, hash, key, preshared_key);
782 sizeof(src->encrypted_nothing), key, hash))
795 memcpy(handshake->hash, hash, NOISE_HASH_LEN);
807 memzero_explicit(hash, NOISE_HASH_LEN);