Home
last modified time | relevance | path

Searched refs:aead (Results 1 – 25 of 33) sorted by relevance

12

/external/boringssl/src/crypto/fipsmodule/cipher/
Daead.c28 size_t EVP_AEAD_key_length(const EVP_AEAD *aead) { return aead->key_len; } in EVP_AEAD_key_length() argument
30 size_t EVP_AEAD_nonce_length(const EVP_AEAD *aead) { return aead->nonce_len; } in EVP_AEAD_nonce_length() argument
32 size_t EVP_AEAD_max_overhead(const EVP_AEAD *aead) { return aead->overhead; } in EVP_AEAD_max_overhead() argument
34 size_t EVP_AEAD_max_tag_len(const EVP_AEAD *aead) { return aead->max_tag_len; } in EVP_AEAD_max_tag_len() argument
40 EVP_AEAD_CTX *EVP_AEAD_CTX_new(const EVP_AEAD *aead, const uint8_t *key, in EVP_AEAD_CTX_new() argument
45 if (EVP_AEAD_CTX_init(ctx, aead, key, key_len, tag_len, NULL)) { in EVP_AEAD_CTX_new()
58 int EVP_AEAD_CTX_init(EVP_AEAD_CTX *ctx, const EVP_AEAD *aead, in EVP_AEAD_CTX_init() argument
61 if (!aead->init) { in EVP_AEAD_CTX_init()
63 ctx->aead = NULL; in EVP_AEAD_CTX_init()
66 return EVP_AEAD_CTX_init_with_direction(ctx, aead, key, key_len, tag_len, in EVP_AEAD_CTX_init()
[all …]
/external/boringssl/src/crypto/cipher_extra/
Daead_test.cc101 const EVP_AEAD *aead() { return GetParam().func(); } in aead() function in PerAEADTest
140 ctx.get(), aead(), key.data(), key.size(), tag_len, evp_aead_seal)); in TEST_P()
142 std::vector<uint8_t> out(in.size() + EVP_AEAD_max_overhead(aead())); in TEST_P()
163 ctx.get(), aead(), key.data(), key.size(), tag_len, evp_aead_open)); in TEST_P()
184 ctx.get(), aead(), key.data(), key.size(), tag_len, evp_aead_open)); in TEST_P()
199 ctx.get(), aead(), key.data(), key.size(), tag_len, evp_aead_open)); in TEST_P()
215 if (!aead()->seal_scatter_supports_extra_in) { in TEST_P()
237 ASSERT_TRUE(EVP_AEAD_CTX_init(ctx.get(), aead(), key.data(), key.size(), in TEST_P()
239 std::vector<uint8_t> out_tag(EVP_AEAD_max_overhead(aead()) + in.size()); in TEST_P()
287 ctx.get(), aead(), key.data(), key.size(), tag_len, evp_aead_seal)); in TEST_P()
[all …]
De_aesccm.c48 assert(M == EVP_AEAD_max_overhead(ctx->aead)); in aead_aes_ccm_init()
49 assert(M == EVP_AEAD_max_tag_len(ctx->aead)); in aead_aes_ccm_init()
50 assert(15 - L == EVP_AEAD_nonce_length(ctx->aead)); in aead_aes_ccm_init()
52 if (key_len != EVP_AEAD_key_length(ctx->aead)) { in aead_aes_ccm_init()
99 if (nonce_len != EVP_AEAD_nonce_length(ctx->aead)) { in aead_aes_ccm_seal_scatter()
128 if (nonce_len != EVP_AEAD_nonce_length(ctx->aead)) { in aead_aes_ccm_open_gather()
De_tls.c73 if (key_len != EVP_AEAD_key_length(ctx->aead)) { in aead_tls_init()
149 if (nonce_len != EVP_AEAD_nonce_length(ctx->aead)) { in aead_tls_seal_scatter()
266 if (nonce_len != EVP_AEAD_nonce_length(ctx->aead)) { in aead_tls_open()
/external/boringssl/src/include/openssl/
Daead.h155 OPENSSL_EXPORT size_t EVP_AEAD_key_length(const EVP_AEAD *aead);
159 OPENSSL_EXPORT size_t EVP_AEAD_nonce_length(const EVP_AEAD *aead);
163 OPENSSL_EXPORT size_t EVP_AEAD_max_overhead(const EVP_AEAD *aead);
168 OPENSSL_EXPORT size_t EVP_AEAD_max_tag_len(const EVP_AEAD *aead);
181 const EVP_AEAD *aead; member
213 OPENSSL_EXPORT EVP_AEAD_CTX *EVP_AEAD_CTX_new(const EVP_AEAD *aead,
230 OPENSSL_EXPORT int EVP_AEAD_CTX_init(EVP_AEAD_CTX *ctx, const EVP_AEAD *aead,
404 EVP_AEAD_CTX *ctx, const EVP_AEAD *aead, const uint8_t *key, size_t key_len,
/external/boringssl/src/ssl/test/runner/
Dcipher_suites.go87 aead func(version uint16, key, fixedNonce []byte) *tlsAead member
237 aead cipher.AEAD member
241 func (f *fixedNonceAEAD) Overhead() int { return f.aead.Overhead() }
245 return f.aead.Seal(out, f.sealNonce, plaintext, additionalData)
250 return f.aead.Open(out, f.openNonce, plaintext, additionalData)
258 aead, err := cipher.NewGCM(aes)
268 return &tlsAead{&xorNonceAEAD{nonce1, nonce2, aead}, false}
271 return &tlsAead{&fixedNonceAEAD{nonce1, nonce2, aead}, true}
287 aead cipher.AEAD member
291 func (x *xorNonceAEAD) Overhead() int { return x.aead.Overhead() }
[all …]
Dchacha20_poly1305_test.go112 aead, err := newChaCha20Poly1305(key)
117 out, err := aead.Open(nil, nonce, output, ad)
124 out = aead.Seal(nil, nonce, input, ad)
130 _, err = aead.Open(nil, nonce, out, ad)
Dchacha20_poly1305.go128 aead := new(chaCha20Poly1305)
129 copy(aead.key[:], key)
130 return aead, nil
Ddtls.go348 } else if aead, ok := c.out.cipher.(*tlsAead); ok {
349 if aead.explicitNonce {
Dprf.go493 return suite.aead(version, key, iv)
Dhandshake_server.go1837 if hs.suite.aead == nil {
1843 clientCipher = hs.suite.aead(c.vers, clientKey, clientIV)
1844 serverCipher = hs.suite.aead(c.vers, serverKey, serverIV)
/external/boringssl/src/fipstools/
Dcavp_aes_gcm_test.cc32 const EVP_AEAD *aead; member
74 if (!AEADEncrypt(ctx->aead, &ct, &tag, tag_len, key, pt, aad, iv)) { in TestAEADEncrypt()
118 AEADDecrypt(ctx->aead, &pt, pt_len, key, aad, ct, tag, iv); in TestAEADDecrypt()
148 const EVP_AEAD *aead = GetAEAD(argv[2], mode == "enc"); in cavp_aes_gcm_test_main() local
149 if (aead == nullptr) { in cavp_aes_gcm_test_main()
154 TestCtx ctx = {aead}; in cavp_aes_gcm_test_main()
Dcavp_test_util.cc108 bool AEADEncrypt(const EVP_AEAD *aead, std::vector<uint8_t> *ct, in AEADEncrypt() argument
115 if (!EVP_AEAD_CTX_init(ctx.get(), aead, key.data(), key.size(), tag_len, in AEADEncrypt()
121 out.resize(pt.size() + EVP_AEAD_max_overhead(aead)); in AEADEncrypt()
136 bool AEADDecrypt(const EVP_AEAD *aead, std::vector<uint8_t> *pt, size_t pt_len, in AEADDecrypt() argument
143 if (!EVP_AEAD_CTX_init_with_direction(ctx.get(), aead, key.data(), key.size(), in AEADDecrypt()
Dcavp_test_util.h37 bool AEADEncrypt(const EVP_AEAD *aead, std::vector<uint8_t> *ct,
44 bool AEADDecrypt(const EVP_AEAD *aead, std::vector<uint8_t> *pt, size_t pt_len,
/external/boringssl/src/tool/
Dspeed.cc310 static bool SpeedAEADChunk(const EVP_AEAD *aead, std::string name, in SpeedAEADChunk() argument
317 const size_t key_len = EVP_AEAD_key_length(aead); in SpeedAEADChunk()
318 const size_t nonce_len = EVP_AEAD_nonce_length(aead); in SpeedAEADChunk()
319 const size_t overhead_len = EVP_AEAD_max_overhead(aead); in SpeedAEADChunk()
347 if (!EVP_AEAD_CTX_init_with_direction(ctx.get(), aead, key.get(), key_len, in SpeedAEADChunk()
376 if (!EVP_AEAD_CTX_init_with_direction(ctx.get(), aead, key.get(), key_len, in SpeedAEADChunk()
406 static bool SpeedAEAD(const EVP_AEAD *aead, const std::string &name, in SpeedAEAD() argument
413 if (!SpeedAEADChunk(aead, name, chunk_len, ad_len, evp_aead_seal)) { in SpeedAEAD()
420 static bool SpeedAEADOpen(const EVP_AEAD *aead, const std::string &name, in SpeedAEADOpen() argument
427 if (!SpeedAEADChunk(aead, name, chunk_len, ad_len, evp_aead_open)) { in SpeedAEADOpen()
/external/boringssl/src/ssl/
Ddtls_record.cc306 SSLAEADContext *aead = ssl->s3->aead_write_ctx.get(); in dtls_seal_record() local
311 aead = ssl->d1->last_aead_write_ctx.get(); in dtls_seal_record()
331 if (!aead->CiphertextLen(&ciphertext_len, in_len, 0)) { in dtls_seal_record()
340 if (!aead->Seal(out + DTLS1_RT_HEADER_LENGTH, &len_copy, in dtls_seal_record()
Dtls_record.cc379 SSLAEADContext *aead = ssl->s3->aead_write_ctx.get(); in do_seal_record() local
382 if (!aead->is_null_cipher() && in do_seal_record()
383 aead->ProtocolVersion() >= TLS1_3_VERSION) { in do_seal_record()
390 if (!aead->SuffixLen(&suffix_len, in_len, extra_in_len) || in do_seal_record()
391 !aead->CiphertextLen(&ciphertext_len, in_len, extra_in_len)) { in do_seal_record()
406 uint16_t record_version = aead->RecordVersion(); in do_seal_record()
414 if (!aead->SealScatter(out_prefix + SSL3_RT_HEADER_LENGTH, out, out_suffix, in do_seal_record()
Dssl_aead_ctx.cc60 const EVP_AEAD *aead; in Create() local
64 !ssl_cipher_get_evp_aead(&aead, &expected_mac_key_len, in Create()
101 aead_ctx->ctx_.get(), aead, enc_key.data(), enc_key.size(), in Create()
106 assert(EVP_AEAD_nonce_length(aead) <= EVP_AEAD_MAX_NONCE_LENGTH); in Create()
109 aead_ctx->variable_nonce_len_ = (uint8_t)EVP_AEAD_nonce_length(aead); in Create()
Dt1_enc.cc170 const EVP_AEAD *aead = NULL; in get_key_block_lengths() local
171 if (!ssl_cipher_get_evp_aead(&aead, out_mac_secret_len, out_iv_len, cipher, in get_key_block_lengths()
177 *out_key_len = EVP_AEAD_key_length(aead); in get_key_block_lengths()
Dtls13_enc.cc149 const EVP_AEAD *aead; in tls13_set_traffic_key() local
151 if (!ssl_cipher_get_evp_aead(&aead, &discard, &discard, session->cipher, in tls13_set_traffic_key()
159 size_t key_len = EVP_AEAD_key_length(aead); in tls13_set_traffic_key()
167 size_t iv_len = EVP_AEAD_nonce_length(aead); in tls13_set_traffic_key()
/external/linux-kselftest/tools/testing/selftests/net/
Dpmtu.sh217 …xfrm state add src ${veth_a_addr} dst ${veth_b_addr} spi 0x1000 proto esp aead "rfc4106(gcm(aes))"…
218 …xfrm state add src ${veth_b_addr} dst ${veth_a_addr} spi 0x1001 proto esp aead "rfc4106(gcm(aes))"…
222 …xfrm state add src ${veth_a_addr} dst ${veth_b_addr} spi 0x1000 proto esp aead "rfc4106(gcm(aes))"…
223 …xfrm state add src ${veth_b_addr} dst ${veth_a_addr} spi 0x1001 proto esp aead "rfc4106(gcm(aes))"…
/external/boringssl/src/util/
Ddoc.config49 "include/openssl/aead.h",
/external/iproute2/ip/
Dxfrm_state.c461 struct xfrm_algo_aead aead; in xfrm_state_modify() member
527 alg.u.aead.alg_icv_len = icvlen; in xfrm_state_modify()
529 buf = alg.u.aead.alg_key; in xfrm_state_modify()
530 len = sizeof(alg.u.aead); in xfrm_state_modify()
/external/scapy/scapy/layers/tls/crypto/
Dcipher_aead.py29 from cryptography.hazmat.primitives.ciphers.aead import (AESCCM,
/external/syzkaller/pkg/report/testdata/linux/report/
D17245 bind$alg(r0, &(0x7f0000660000-0x58)={0x26, 'aead\x00', 0x4, 0x0, 'gcm(aes)\x00'}, 0x58)

12