Lines Matching refs:key
91 const uint8_t key[kChaChaKeySize], in ChaChaInitState()
99 state[4 + i] = get_unaligned_le32(&key[i * sizeof(__le32)]); in ChaChaInitState()
132 static void XChaCha(const uint8_t key[kXChaChaKeySize], in XChaCha()
141 ChaChaInitState(state, key, nonce); in XChaCha()
177 static void XChaCha12(const uint8_t key[kXChaChaKeySize], in XChaCha12()
180 XChaCha(key, nonce, src, dst, nbytes, 12); in XChaCha12()
187 static void Poly1305(const uint8_t key[kPoly1305KeySize], const uint8_t *msg, in Poly1305()
196 memcpy(mac_key, key, kPoly1305KeySize); in Poly1305()
214 static uint64_t NH_Pass(const uint32_t *key, const uint8_t *msg, int msglen) { in NH_Pass() argument
219 sum += NH_Add(msg + 0, key[0]) * NH_Add(msg + 8, key[2]); in NH_Pass()
220 sum += NH_Add(msg + 4, key[1]) * NH_Add(msg + 12, key[3]); in NH_Pass()
221 key += kNHMessageUnit / sizeof(key[0]); in NH_Pass()
229 static void NH(const uint32_t *key, const uint8_t *msg, int msglen, in NH() argument
234 put_unaligned_le64(NH_Pass(key, msg, msglen), &result[i]); in NH()
235 key += kNHMessageUnit / sizeof(key[0]); in NH()
242 static void AdiantumHash(const uint8_t key[kAdiantumHashKeySize], in AdiantumHash()
245 const uint8_t *header_poly_key = key; in AdiantumHash()
281 bool AdiantumCipher::DoEncrypt(const uint8_t key[kAdiantumKeySize], in DoEncrypt()
299 XChaCha12(key, rbuf, subkeys, subkeys, sizeof(subkeys)); in DoEncrypt()
317 XChaCha12(key, rbuf, src, dst, bulk_len); in DoEncrypt()