/external/boringssl/src/crypto/modes/ |
D | gcm_test.c | 313 size_t key_len, plaintext_len, additional_data_len, nonce_len, ciphertext_len, in run_test_case() local 322 !decode_hex(&plaintext, &plaintext_len, test->plaintext, test_num, in run_test_case() 333 if (plaintext_len != ciphertext_len) { in run_test_case() 349 out = OPENSSL_malloc(plaintext_len); in run_test_case() 360 memset(out, 0, plaintext_len); in run_test_case() 365 CRYPTO_gcm128_encrypt(&ctx, plaintext, out, plaintext_len); in run_test_case() 368 (ciphertext && memcmp(out, ciphertext, plaintext_len) != 0)) { in run_test_case() 370 hexdump("got ", out, plaintext_len); in run_test_case() 371 hexdump("want", ciphertext, plaintext_len); in run_test_case() 376 memset(out, 0, plaintext_len); in run_test_case() [all …]
|
/external/boringssl/src/crypto/cipher/ |
D | e_chacha20poly1305.c | 154 size_t plaintext_len; in aead_chacha20_poly1305_open() local 180 plaintext_len = in_len - c20_ctx->tag_len; in aead_chacha20_poly1305_open() 182 if (max_out_len < plaintext_len) { in aead_chacha20_poly1305_open() 194 poly1305_update_with_length(&poly1305, in, plaintext_len); in aead_chacha20_poly1305_open() 197 if (CRYPTO_memcmp(mac, in + plaintext_len, c20_ctx->tag_len) != 0) { in aead_chacha20_poly1305_open() 202 CRYPTO_chacha_20(out, in, plaintext_len, c20_ctx->key, nonce, 1); in aead_chacha20_poly1305_open() 203 *out_len = plaintext_len; in aead_chacha20_poly1305_open()
|
D | e_rc4.c | 279 size_t plaintext_len; in aead_rc4_md5_tls_open() local 295 plaintext_len = in_len - rc4_ctx->tag_len; in aead_rc4_md5_tls_open() 317 ad_extra[0] = (uint8_t)(plaintext_len >> 8); in aead_rc4_md5_tls_open() 318 ad_extra[1] = (uint8_t)(plaintext_len & 0xff); in aead_rc4_md5_tls_open() 360 MD5_Update(&md, out + md5_off, plaintext_len - md5_off); in aead_rc4_md5_tls_open() 368 if (CRYPTO_memcmp(out + plaintext_len, digest, rc4_ctx->tag_len)) { in aead_rc4_md5_tls_open() 373 *out_len = plaintext_len; in aead_rc4_md5_tls_open()
|
D | e_aes.c | 1151 size_t plaintext_len; in aead_aes_gcm_open() local 1159 plaintext_len = in_len - gcm_ctx->tag_len; in aead_aes_gcm_open() 1161 if (max_out_len < plaintext_len) { in aead_aes_gcm_open() 1187 if (CRYPTO_memcmp(tag, in + plaintext_len, gcm_ctx->tag_len) != 0) { in aead_aes_gcm_open() 1192 *out_len = plaintext_len; in aead_aes_gcm_open() 1703 size_t plaintext_len; in aead_aes_ctr_hmac_sha256_open() local 1711 plaintext_len = in_len - aes_ctx->tag_len; in aead_aes_ctr_hmac_sha256_open() 1713 if (max_out_len < plaintext_len) { in aead_aes_ctr_hmac_sha256_open() 1728 plaintext_len); in aead_aes_ctr_hmac_sha256_open() 1729 if (CRYPTO_memcmp(hmac_result, in + plaintext_len, aes_ctx->tag_len) != 0) { in aead_aes_ctr_hmac_sha256_open() [all …]
|
/external/boringssl/src/ssl/ |
D | ssl_aead_ctx.c | 127 size_t plaintext_len) { in ssl_aead_ctx_get_ad() argument 136 out[len++] = (uint8_t)(plaintext_len >> 8); in ssl_aead_ctx_get_ad() 137 out[len++] = (uint8_t)plaintext_len; in ssl_aead_ctx_get_ad() 159 size_t plaintext_len = 0; in SSL_AEAD_CTX_open() local 167 plaintext_len = in_len - overhead; in SSL_AEAD_CTX_open() 171 plaintext_len); in SSL_AEAD_CTX_open()
|
D | d1_pkt.c | 216 size_t plaintext_len; in dtls1_process_record() local 217 if (!SSL_AEAD_CTX_open(s->aead_read_ctx, rr->data, &plaintext_len, rr->length, in dtls1_process_record() 227 if (plaintext_len > SSL3_RT_MAX_PLAIN_LENGTH) { in dtls1_process_record() 232 assert(plaintext_len < (1u << 16)); in dtls1_process_record() 233 rr->length = plaintext_len; in dtls1_process_record()
|
D | s3_pkt.c | 352 size_t plaintext_len; in ssl3_get_record() local 353 if (!SSL_AEAD_CTX_open(s->aead_read_ctx, rr->data, &plaintext_len, rr->length, in ssl3_get_record() 364 if (plaintext_len > SSL3_RT_MAX_PLAIN_LENGTH + extra) { in ssl3_get_record() 369 assert(plaintext_len <= (1u << 16)); in ssl3_get_record() 370 rr->length = plaintext_len; in ssl3_get_record()
|
/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()
|