Lines Matching refs:key

13 SipHash takes a secret key filled with randomly generated numbers and either
18 Generating a key
24 siphash_key_t key;
25 get_random_bytes(&key, sizeof(key));
27 If you're not deriving your key from here, you're doing it wrong.
35 u64 siphash(const void *data, size_t len, const siphash_key_t *key);
39 u64 siphash_1u64(u64, const siphash_key_t *key);
40 u64 siphash_2u64(u64, u64, const siphash_key_t *key);
41 u64 siphash_3u64(u64, u64, u64, const siphash_key_t *key);
42 u64 siphash_4u64(u64, u64, u64, u64, const siphash_key_t *key);
43 u64 siphash_1u32(u32, const siphash_key_t *key);
44 u64 siphash_2u32(u32, u32, const siphash_key_t *key);
45 u64 siphash_3u32(u32, u32, u32, const siphash_key_t *key);
46 u64 siphash_4u32(u32, u32, u32, u32, const siphash_key_t *key);
52 Hashtable key function usage::
56 siphash_key_t key;
61 get_random_bytes(&table->key, sizeof(table->key));
66 …return &table->hashtable[siphash(input, sizeof(*input), &table->key) & (HASH_SIZE(table->hashtable…
74 SipHash has a very high security margin, with its 128-bit key. So long as the
75 key is kept secret, it is impossible for an attacker to guess the outputs of
120 even scarier, uses an easily brute-forcable 64-bit key (with a 32-bit output)
121 instead of SipHash's 128-bit key. However, this may appeal to some
127 Do not ever use the hsiphash functions except for as a hashtable key
141 Generating a hsiphash key
147 hsiphash_key_t key;
148 get_random_bytes(&key, sizeof(key));
150 If you're not deriving your key from here, you're doing it wrong.
158 u32 hsiphash(const void *data, size_t len, const hsiphash_key_t *key);
162 u32 hsiphash_1u32(u32, const hsiphash_key_t *key);
163 u32 hsiphash_2u32(u32, u32, const hsiphash_key_t *key);
164 u32 hsiphash_3u32(u32, u32, u32, const hsiphash_key_t *key);
165 u32 hsiphash_4u32(u32, u32, u32, u32, const hsiphash_key_t *key);
171 Hashtable key function usage
178 hsiphash_key_t key;
183 get_random_bytes(&table->key, sizeof(table->key));
188 …return &table->hashtable[hsiphash(input, sizeof(*input), &table->key) & (HASH_SIZE(table->hashtabl…