Home
last modified time | relevance | path

Searched refs:plaintext_len (Results 1 – 9 of 9) sorted by relevance

/external/boringssl/src/crypto/modes/
Dgcm_test.c302 size_t key_len, plaintext_len, additional_data_len, nonce_len, ciphertext_len, in run_test_case() local
311 !decode_hex(&plaintext, &plaintext_len, test->plaintext, test_num, in run_test_case()
322 if (plaintext_len != ciphertext_len) { in run_test_case()
338 out = OPENSSL_malloc(plaintext_len); in run_test_case()
349 memset(out, 0, plaintext_len); in run_test_case()
354 CRYPTO_gcm128_encrypt(&ctx, &aes_key, plaintext, out, plaintext_len); in run_test_case()
357 (ciphertext && memcmp(out, ciphertext, plaintext_len) != 0)) { in run_test_case()
359 hexdump(stderr, "got :", out, plaintext_len); in run_test_case()
360 hexdump(stderr, "want:", ciphertext, plaintext_len); in run_test_case()
365 memset(out, 0, plaintext_len); in run_test_case()
[all …]
/external/boringssl/src/crypto/rsa/
Drsa_test.cc550 size_t plaintext_len = 0; in TestRSA() local
551 if (!RSA_decrypt(key.get(), &plaintext_len, plaintext, sizeof(plaintext), in TestRSA()
553 plaintext_len != kPlaintextLen || in TestRSA()
554 memcmp(plaintext, kPlaintext, plaintext_len) != 0) { in TestRSA()
567 plaintext_len = 0; in TestRSA()
568 if (!RSA_decrypt(key.get(), &plaintext_len, plaintext, sizeof(plaintext), in TestRSA()
570 plaintext_len != kPlaintextLen || in TestRSA()
571 memcmp(plaintext, kPlaintext, plaintext_len) != 0) { in TestRSA()
577 plaintext_len = 0; in TestRSA()
578 if (!RSA_decrypt(key.get(), &plaintext_len, plaintext, sizeof(plaintext), in TestRSA()
[all …]
/external/boringssl/src/ssl/
Dtls_record.c217 size_t plaintext_len; in tls_open_record() local
218 if (!SSL_AEAD_CTX_open(ssl->aead_read_ctx, out, &plaintext_len, max_out, in tls_open_record()
231 if (plaintext_len > SSL3_RT_MAX_PLAIN_LENGTH) { in tls_open_record()
238 if (plaintext_len == 0) { in tls_open_record()
252 *out_len = plaintext_len; in tls_open_record()
Dssl_aead_ctx.c133 size_t plaintext_len) { in ssl_aead_ctx_get_ad() argument
142 out[len++] = (uint8_t)(plaintext_len >> 8); in ssl_aead_ctx_get_ad()
143 out[len++] = (uint8_t)plaintext_len; in ssl_aead_ctx_get_ad()
165 size_t plaintext_len = 0; in SSL_AEAD_CTX_open() local
173 plaintext_len = in_len - overhead; in SSL_AEAD_CTX_open()
177 plaintext_len); in SSL_AEAD_CTX_open()
Ddtls_record.c215 size_t plaintext_len; in dtls_open_record() local
216 if (!SSL_AEAD_CTX_open(ssl->aead_read_ctx, out, &plaintext_len, max_out, in dtls_open_record()
231 if (plaintext_len > SSL3_RT_MAX_PLAIN_LENGTH) { in dtls_open_record()
243 *out_len = plaintext_len; in dtls_open_record()
/external/boringssl/src/crypto/cipher/
De_chacha20poly1305.c156 size_t plaintext_len; in open_impl() local
175 plaintext_len = in_len - c20_ctx->tag_len; in open_impl()
178 plaintext_len); in open_impl()
179 if (CRYPTO_memcmp(tag, in + plaintext_len, c20_ctx->tag_len) != 0) { in open_impl()
184 CRYPTO_chacha_20(out, in, plaintext_len, c20_ctx->key, nonce, 1); in open_impl()
185 *out_len = plaintext_len; in open_impl()
De_aes.c1150 size_t plaintext_len; in aead_aes_gcm_open() local
1158 plaintext_len = in_len - gcm_ctx->tag_len; in aead_aes_gcm_open()
1160 if (max_out_len < plaintext_len) { in aead_aes_gcm_open()
1186 if (CRYPTO_memcmp(tag, in + plaintext_len, gcm_ctx->tag_len) != 0) { in aead_aes_gcm_open()
1191 *out_len = plaintext_len; in aead_aes_gcm_open()
1687 size_t plaintext_len; in aead_aes_ctr_hmac_sha256_open() local
1694 plaintext_len = in_len - aes_ctx->tag_len; in aead_aes_ctr_hmac_sha256_open()
1696 if (max_out_len < plaintext_len) { in aead_aes_ctr_hmac_sha256_open()
1709 plaintext_len); in aead_aes_ctr_hmac_sha256_open()
1710 if (CRYPTO_memcmp(hmac_result, in + plaintext_len, aes_ctx->tag_len) != 0) { in aead_aes_ctr_hmac_sha256_open()
[all …]
/external/srtp/crypto/cipher/
Dcipher.c272 int plaintext_len; in cipher_type_self_test() local
314 plaintext_len = length; in cipher_type_self_test()
347 if (length != plaintext_len) in cipher_type_self_test()
350 for (i=0; i < plaintext_len; i++) in cipher_type_self_test()
/external/boringssl/src/crypto/evp/
Dp_rsa.c308 size_t plaintext_len; in pkey_rsa_decrypt() local
312 !RSA_decrypt(rsa, &plaintext_len, rctx->tbuf, key_len, in, inlen, in pkey_rsa_decrypt()
318 out, key_len, rctx->tbuf, plaintext_len, rctx->oaep_label, in pkey_rsa_decrypt()