Lines Matching refs:nonce
180 uint8_t nonce[EVP_AEAD_MAX_NONCE_LENGTH]; in SSL_AEAD_CTX_open() local
186 memset(nonce, 0, nonce_len); in SSL_AEAD_CTX_open()
188 memcpy(nonce, aead->fixed_nonce, aead->fixed_nonce_len); in SSL_AEAD_CTX_open()
199 memcpy(nonce + nonce_len, in, aead->variable_nonce_len); in SSL_AEAD_CTX_open()
204 memcpy(nonce + nonce_len, seqnum, aead->variable_nonce_len); in SSL_AEAD_CTX_open()
213 nonce[i] ^= aead->fixed_nonce[i]; in SSL_AEAD_CTX_open()
217 return EVP_AEAD_CTX_open(&aead->ctx, out, out_len, max_out, nonce, nonce_len, in SSL_AEAD_CTX_open()
241 uint8_t nonce[EVP_AEAD_MAX_NONCE_LENGTH]; in SSL_AEAD_CTX_seal() local
247 memset(nonce, 0, nonce_len); in SSL_AEAD_CTX_seal()
249 memcpy(nonce, aead->fixed_nonce, aead->fixed_nonce_len); in SSL_AEAD_CTX_seal()
256 if (!RAND_bytes(nonce + nonce_len, aead->variable_nonce_len)) { in SSL_AEAD_CTX_seal()
263 memcpy(nonce + nonce_len, seqnum, aead->variable_nonce_len); in SSL_AEAD_CTX_seal()
279 memcpy(out, nonce + aead->fixed_nonce_len, aead->variable_nonce_len); in SSL_AEAD_CTX_seal()
290 nonce[i] ^= aead->fixed_nonce[i]; in SSL_AEAD_CTX_seal()
294 if (!EVP_AEAD_CTX_seal(&aead->ctx, out, out_len, max_out, nonce, nonce_len, in SSL_AEAD_CTX_seal()