/external/boringssl/src/crypto/modes/ |
D | gcm_test.c | 302 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/ |
D | rsa_test.cc | 550 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/ |
D | tls_record.c | 217 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()
|
D | ssl_aead_ctx.c | 133 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()
|
D | dtls_record.c | 215 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/ |
D | e_chacha20poly1305.c | 156 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()
|
D | e_aes.c | 1150 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/ |
D | cipher.c | 272 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/ |
D | p_rsa.c | 308 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()
|