|
OpenVPN
|


Go to the source code of this file.
Macros | |
| #define | SIPHASH_KEY_SIZE 16 |
Functions | |
| void | siphash_reference (const void *in, size_t inlen, const void *k, uint8_t *out, size_t outlen) |
| Calculates SIPHASH using the reference implementation. | |
| static void | siphash (const void *in, size_t inlen, const void *k, uint8_t *out, size_t outlen) |
| static void | siphash_key_init (uint8_t *key) |
| Initialises a SIPHASH key with a random value. | |
| uint64_t | siphash_hash_func (const uint8_t *k, uint32_t length, const uint8_t hash_key[SIPHASH_KEY_SIZE]) |
| Wrapper of the siphash function to be able to use it in the hash map. | |
|
inlinestatic |
Definition at line 70 of file siphash.h.
References siphash_reference().
Referenced by calculate_session_id_hmac(), and siphash_hash_func().
| uint64_t siphash_hash_func | ( | const uint8_t * | k, |
| uint32_t | length, | ||
| const uint8_t | hash_key[SIPHASH_KEY_SIZE] | ||
| ) |
Wrapper of the siphash function to be able to use it in the hash map.
| k | the data to hash |
| length | length of the data to hash |
| hash_key | the siphash key |
Definition at line 37 of file siphash.c.
References siphash().
Referenced by mroute_addr_hash_function(), and word_hash_function().
|
inlinestatic |
Initialises a SIPHASH key with a random value.
| key | the key to be initialised |
Definition at line 85 of file siphash.h.
References prng_bytes(), and SIPHASH_KEY_SIZE.
Referenced by do_init_crypto_tls(), test_verify_hmac_none(), test_verify_hmac_none_out_of_range_ack(), and test_verify_hmac_tls_auth().
| void siphash_reference | ( | const void * | in, |
| size_t | inlen, | ||
| const void * | k, | ||
| uint8_t * | out, | ||
| size_t | outlen | ||
| ) |
Calculates SIPHASH using the reference implementation.
Definition at line 103 of file siphash_reference.c.
References cROUNDS, dROUNDS, SIPROUND, TRACE, U64TO8_LE, and U8TO64_LE.
Referenced by siphash(), test_siphash(), and test_siphash_openssl().