/third_party/openssl/test/ |
D | igetest.c | 222 unsigned char ciphertext[BIG_TEST_SIZE]; in test_ige_enc_dec() local 227 AES_ige_encrypt(plaintext, ciphertext, TEST_SIZE, &key, iv, AES_ENCRYPT); in test_ige_enc_dec() 231 AES_ige_encrypt(ciphertext, checktext, TEST_SIZE, &key, iv, AES_DECRYPT); in test_ige_enc_dec() 240 unsigned char ciphertext[BIG_TEST_SIZE]; in test_ige_enc_chaining() local 245 AES_ige_encrypt(plaintext, ciphertext, TEST_SIZE / 2, &key, iv, in test_ige_enc_chaining() 248 ciphertext + TEST_SIZE / 2, TEST_SIZE / 2, in test_ige_enc_chaining() 253 AES_ige_encrypt(ciphertext, checktext, TEST_SIZE, &key, iv, AES_DECRYPT); in test_ige_enc_chaining() 262 unsigned char ciphertext[BIG_TEST_SIZE]; in test_ige_dec_chaining() local 267 AES_ige_encrypt(plaintext, ciphertext, TEST_SIZE / 2, &key, iv, in test_ige_dec_chaining() 270 ciphertext + TEST_SIZE / 2, TEST_SIZE / 2, in test_ige_dec_chaining() [all …]
|
D | evp_extra_test.c | 386 unsigned char ciphertext[32], plaintext[16]; in test_EVP_Enveloped() local 394 || !TEST_true(EVP_SealUpdate(ctx, ciphertext, &ciphertext_len, in test_EVP_Enveloped() 396 || !TEST_true(EVP_SealFinal(ctx, ciphertext + ciphertext_len, in test_EVP_Enveloped() 404 ciphertext, ciphertext_len)) in test_EVP_Enveloped() 696 uint8_t ciphertext[128]; in test_EVP_SM2() local 697 size_t ctext_len = sizeof(ciphertext); in test_EVP_SM2() 783 if (!TEST_true(EVP_PKEY_encrypt(cctx, ciphertext, &ctext_len, kMsg, sizeof(kMsg)))) in test_EVP_SM2() 789 if (!TEST_true(EVP_PKEY_decrypt(cctx, plaintext, &ptext_len, ciphertext, ctext_len))) in test_EVP_SM2() 1086 unsigned char ciphertext[80]; in test_decrypt_null_chunks() local 1096 || !TEST_true(EVP_EncryptUpdate(ctx, ciphertext, &ctlen, msg, in test_decrypt_null_chunks() [all …]
|
D | modes_internal_test.c | 188 unsigned char cleartext[64], ciphertext[64], vector[64]; in execute_cts128() local 197 if (!TEST_size_t_eq(fixture->encrypt_block(test_input, ciphertext, len, in execute_cts128() 200 || !TEST_mem_eq(ciphertext, len, vector, len) in execute_cts128() 206 size = fixture->decrypt_block(ciphertext, cleartext, len, in execute_cts128() 216 if (!TEST_size_t_eq(fixture->encrypt_stream(test_input, ciphertext, len, in execute_cts128() 220 || !TEST_mem_eq(ciphertext, len, vector, len) in execute_cts128() 226 if (!TEST_size_t_eq(fixture->decrypt_stream(ciphertext, cleartext, len, in execute_cts128()
|
/third_party/boringssl/src/crypto/hrss/ |
D | hrss_test.cc | 189 uint8_t ciphertext[HRSS_CIPHERTEXT_BYTES]; in TEST() local 191 HRSS_encap(ciphertext, shared_key, &pub2, encap_entropy); in TEST() 194 HRSS_decap(shared_key2, &priv, ciphertext, sizeof(ciphertext)); in TEST() 214 uint8_t ciphertext[HRSS_CIPHERTEXT_BYTES]; in TEST() local 216 HRSS_encap(ciphertext, shared_key, &pub, encap_entropy); in TEST() 219 HRSS_decap(shared_key2, &priv, ciphertext, sizeof(ciphertext)); in TEST() 226 ciphertext[offset % sizeof(ciphertext)] ^= (1 << (bit & 7)); in TEST() 227 HRSS_decap(shared_key2, &priv, ciphertext, sizeof(ciphertext)); in TEST() 357 uint8_t ciphertext[HRSS_CIPHERTEXT_BYTES]; in TEST() local 359 HRSS_encap(ciphertext, shared_key, &pub, encap_entropy); in TEST() [all …]
|
/third_party/boringssl/src/crypto/fipsmodule/aes/ |
D | aes_test.cc | 36 std::vector<uint8_t> key, plaintext, ciphertext; in TestRaw() local 39 ASSERT_TRUE(t->GetBytes(&ciphertext, "Ciphertext")); in TestRaw() 42 ASSERT_EQ(static_cast<unsigned>(AES_BLOCK_SIZE), ciphertext.size()); in TestRaw() 50 EXPECT_EQ(Bytes(ciphertext), Bytes(block)); in TestRaw() 55 EXPECT_EQ(Bytes(ciphertext), Bytes(block)); in TestRaw() 60 AES_decrypt(ciphertext.data(), block, &aes_key); in TestRaw() 64 OPENSSL_memcpy(block, ciphertext.data(), AES_BLOCK_SIZE); in TestRaw() 78 std::vector<uint8_t> key, plaintext, ciphertext; in TestKeyWrap() local 81 ASSERT_TRUE(t->GetBytes(&ciphertext, "Ciphertext")); in TestKeyWrap() 83 ASSERT_EQ(plaintext.size() + 8, ciphertext.size()) in TestKeyWrap() [all …]
|
/third_party/boringssl/src/third_party/wycheproof_testvectors/ |
D | aes_cbc_pkcs5_test.txt | 209 # The ciphertext in this test vector is the message encrypted with an invalid or 220 # The ciphertext in this test vector is the message encrypted with an invalid or 231 # The ciphertext in this test vector is the message encrypted with an invalid or 242 # The ciphertext in this test vector is the message encrypted with an invalid or 253 # The ciphertext in this test vector is the message encrypted with an invalid or 264 # The ciphertext in this test vector is the message encrypted with an invalid or 275 # The ciphertext in this test vector is the message encrypted with an invalid or 286 # The ciphertext in this test vector is the message encrypted with an invalid or 297 # The ciphertext in this test vector is the message encrypted with an invalid or 308 # The ciphertext in this test vector is the message encrypted with an invalid or [all …]
|
/third_party/openssl/crypto/camellia/ |
D | cmll_local.h | 35 u8 ciphertext[]); 36 void Camellia_DecryptBlock_Rounds(int grandRounds, const u8 ciphertext[], 40 const KEY_TABLE_TYPE keyTable, u8 ciphertext[]); 41 void Camellia_DecryptBlock(int keyBitLength, const u8 ciphertext[],
|
D | camellia.c | 399 u8 ciphertext[]) in Camellia_EncryptBlock_Rounds() argument 437 PUTU32(ciphertext, s2); in Camellia_EncryptBlock_Rounds() 438 PUTU32(ciphertext + 4, s3); in Camellia_EncryptBlock_Rounds() 439 PUTU32(ciphertext + 8, s0); in Camellia_EncryptBlock_Rounds() 440 PUTU32(ciphertext + 12, s1); in Camellia_EncryptBlock_Rounds() 444 const KEY_TABLE_TYPE keyTable, u8 ciphertext[]) in Camellia_EncryptBlock() argument 447 plaintext, keyTable, ciphertext); in Camellia_EncryptBlock() 450 void Camellia_DecryptBlock_Rounds(int grandRounds, const u8 ciphertext[], in Camellia_DecryptBlock_Rounds() argument 457 s0 = GETU32(ciphertext) ^ k[0]; in Camellia_DecryptBlock_Rounds() 458 s1 = GETU32(ciphertext + 4) ^ k[1]; in Camellia_DecryptBlock_Rounds() [all …]
|
/third_party/openssl/doc/man7/ |
D | des_modes.pod | 31 The same plaintext block always produces the same ciphertext block 36 An error will only affect one ciphertext block. 54 The CBC mode produces the same ciphertext whenever the same 59 The chaining operation makes the ciphertext blocks dependent on the 66 enciphering to the same ciphertext. 70 An error will affect the current and the following ciphertext blocks. 86 The CFB mode produces the same ciphertext whenever the same 91 The chaining operation makes the ciphertext variables dependent on the 98 enciphering to the same ciphertext. 117 An error will affect the current and the following ciphertext variables. [all …]
|
/third_party/mbedtls/tests/suites/ |
D | test_suite_nist_kw.function | 154 unsigned char *ciphertext = NULL; 169 ciphertext = mbedtls_calloc( 1, output_len ); 170 TEST_ASSERT( ciphertext != NULL ); 177 ciphertext, &output_len, 193 mbedtls_free( ciphertext ); 205 unsigned char *ciphertext = NULL; 220 ciphertext = mbedtls_calloc( 1, in_len ); 221 TEST_ASSERT( ciphertext != NULL ); 226 unwrap_ret = mbedtls_nist_kw_unwrap( &ctx, mode, ciphertext, in_len, 238 mbedtls_free( ciphertext );
|
/third_party/grpc/src/core/tsi/alts/crypt/ |
D | aes_gcm.cc | 318 uint8_t* ciphertext = static_cast<uint8_t*>(ciphertext_vec.iov_base); in gsec_aes_gcm_aead_crypter_encrypt_iovec() local 320 if (ciphertext == nullptr) { in gsec_aes_gcm_aead_crypter_encrypt_iovec() 342 if (!EVP_EncryptUpdate(aes_gcm_crypter->ctx, ciphertext, &bytes_written, in gsec_aes_gcm_aead_crypter_encrypt_iovec() 351 ciphertext += bytes_written; in gsec_aes_gcm_aead_crypter_encrypt_iovec() 372 kAesGcmTagLength, ciphertext)) { in gsec_aes_gcm_aead_crypter_encrypt_iovec() 376 ciphertext += kAesGcmTagLength; in gsec_aes_gcm_aead_crypter_encrypt_iovec() 477 const uint8_t* ciphertext = nullptr; in gsec_aes_gcm_aead_crypter_decrypt_iovec() local 482 ciphertext = static_cast<uint8_t*>(ciphertext_vec[i].iov_base); in gsec_aes_gcm_aead_crypter_decrypt_iovec() 484 if (ciphertext == nullptr) { in gsec_aes_gcm_aead_crypter_decrypt_iovec() 505 reinterpret_cast<int*>(&bytes_written), ciphertext, in gsec_aes_gcm_aead_crypter_decrypt_iovec() [all …]
|
/third_party/boringssl/src/crypto/fipsmodule/modes/ |
D | gcm_test.cc | 68 std::vector<uint8_t> key, plaintext, additional_data, nonce, ciphertext, in TEST() local 74 ASSERT_TRUE(t->GetBytes(&ciphertext, "Ciphertext")); in TEST() 77 ASSERT_EQ(plaintext.size(), ciphertext.size()); in TEST() 100 EXPECT_EQ(Bytes(ciphertext), Bytes(out)); in TEST() 107 if (!ciphertext.empty()) { in TEST() 108 CRYPTO_gcm128_decrypt(&ctx, &aes_key, ciphertext.data(), out.data(), in TEST() 109 ciphertext.size()); in TEST()
|
/third_party/boringssl/src/crypto/cipher_extra/ |
D | cipher_test.cc | 157 const std::vector<uint8_t> &ciphertext, in TestOperation() argument 163 out = &ciphertext; in TestOperation() 165 in = &ciphertext; in TestOperation() 227 std::vector<uint8_t> key, iv, plaintext, ciphertext, aad, tag; in TestCipher() local 230 ASSERT_TRUE(t->GetBytes(&ciphertext, "Ciphertext")); in TestCipher() 264 chunk_size, key, iv, plaintext, ciphertext, aad, tag); in TestCipher() 266 key, iv, plaintext, ciphertext, aad, tag); in TestCipher() 272 chunk_size, key, iv, plaintext, ciphertext, aad, tag); in TestCipher() 274 key, iv, plaintext, ciphertext, aad, tag); in TestCipher()
|
D | aead_test.cc | 431 uint8_t ciphertext[128]; in TEST_P() local 434 OPENSSL_memset(ciphertext, kSentinel, sizeof(ciphertext)); in TEST_P() 436 ASSERT_TRUE(EVP_AEAD_CTX_seal(ctx.get(), ciphertext, &ciphertext_len, in TEST_P() 437 sizeof(ciphertext), nonce, nonce_len, plaintext, in TEST_P() 440 for (size_t i = ciphertext_len; i < sizeof(ciphertext); i++) { in TEST_P() 442 EXPECT_EQ(kSentinel, ciphertext[i]) in TEST_P() 458 nonce_len, ciphertext, ciphertext_len, nullptr /* ad */, 0)) in TEST_P() 566 alignas(64) uint8_t ciphertext[sizeof(plaintext) + EVP_AEAD_MAX_OVERHEAD]; in TEST_P() local 568 ASSERT_TRUE(EVP_AEAD_CTX_seal(ctx.get(), ciphertext + 1, &ciphertext_len, in TEST_P() 569 sizeof(ciphertext) - 1, nonce + 1, nonce_len, in TEST_P() [all …]
|
/third_party/ffmpeg/libavutil/tests/ |
D | blowfish.c | 117 static const uint8_t ciphertext[8] = { variable 158 test_blowfish(ctx, tmp, plaintext, ciphertext, 1, NULL, 0, "encryption"); in main() 159 test_blowfish(ctx, tmp, ciphertext, plaintext, 1, NULL, 1, "decryption"); in main() 160 test_blowfish(ctx, tmp, tmp, ciphertext, 1, NULL, 0, "Inplace encryption"); in main()
|
/third_party/mbedtls/library/ |
D | ccm.c | 504 unsigned char ciphertext[CCM_SELFTEST_CT_MAX_LEN]; in mbedtls_ccm_self_test() local 524 memset( ciphertext, 0, CCM_SELFTEST_CT_MAX_LEN ); in mbedtls_ccm_self_test() 529 plaintext, ciphertext, in mbedtls_ccm_self_test() 530 ciphertext + msg_len[i], tag_len[i] ); in mbedtls_ccm_self_test() 533 memcmp( ciphertext, res[i], msg_len[i] + tag_len[i] ) != 0 ) in mbedtls_ccm_self_test() 544 ciphertext, plaintext, in mbedtls_ccm_self_test() 545 ciphertext + msg_len[i], tag_len[i] ); in mbedtls_ccm_self_test()
|
/third_party/boringssl/src/crypto/pkcs8/ |
D | pkcs8.c | 422 CBS epki, algorithm, ciphertext; in PKCS8_parse_encrypted_private_key() local 425 !CBS_get_asn1(&epki, &ciphertext, CBS_ASN1_OCTETSTRING) || in PKCS8_parse_encrypted_private_key() 434 CBS_data(&ciphertext), CBS_len(&ciphertext))) { in PKCS8_parse_encrypted_private_key() 511 CBB ciphertext; in PKCS8_marshal_encrypted_private_key() local 514 if (!CBB_add_asn1(&epki, &ciphertext, CBS_ASN1_OCTETSTRING) || in PKCS8_marshal_encrypted_private_key() 515 !CBB_reserve(&ciphertext, &ptr, max_out) || in PKCS8_marshal_encrypted_private_key() 518 !CBB_did_write(&ciphertext, n1 + n2) || in PKCS8_marshal_encrypted_private_key()
|
/third_party/node/test/parallel/ |
D | test-crypto-des3-wrap.js | 20 const ciphertext = cipher.update(test.plaintext, 'utf8'); constant 23 const msg = decipher.update(ciphertext, 'buffer', 'utf8');
|
D | test-crypto-authenticated-stream.js | 32 const ciphertext = Buffer.concat([c.update(expected), c.final()]); 37 const actual = Buffer.concat([d.update(ciphertext), d.final()]); 94 const ciphertext = fs.readFileSync(filename('b')); 98 const actual = Buffer.concat([d.update(ciphertext), d.final()]);
|
D | test-crypto-aes-wrap.js | 53 const ciphertext = cipher.update(data.text, 'utf8'); constant 59 const msg = decipher.update(ciphertext, 'buffer', 'utf8');
|
/third_party/boringssl/src/crypto/ |
D | impl_dispatch_test.cc | 105 uint8_t ciphertext[sizeof(kPlaintext) + 16]; in TEST_F() local 112 ctx.get(), ciphertext, &ciphertext_len, sizeof(ciphertext), kZeros, in TEST_F()
|
/third_party/openssl/doc/man3/ |
D | RSA_public_encrypt.pod | 20 session key) using the public key B<rsa> and stores the ciphertext in 55 RSA_public_encrypt() will include some random bytes into the ciphertext 56 and therefore the ciphertext will be different each time, even if the 58 The returned ciphertext in B<to> will always be zero padded to exactly 65 bytes are in the ciphertext. Those are not important and may be removed,
|
/third_party/boringssl/src/crypto/rsa_extra/ |
D | rsa_test.cc | 406 uint8_t ciphertext[256]; in TEST_P() local 410 ASSERT_TRUE(RSA_encrypt(key.get(), &ciphertext_len, ciphertext, in TEST_P() 411 sizeof(ciphertext), kPlaintext, kPlaintextLen, in TEST_P() 418 sizeof(plaintext), ciphertext, ciphertext_len, in TEST_P() 424 ASSERT_TRUE(RSA_encrypt(key.get(), &ciphertext_len, ciphertext, in TEST_P() 425 sizeof(ciphertext), kPlaintext, kPlaintextLen, in TEST_P() 431 sizeof(plaintext), ciphertext, ciphertext_len, in TEST_P() 443 OPENSSL_memcpy(ciphertext, param.oaep_ciphertext, param.oaep_ciphertext_len); in TEST_P() 446 ciphertext[i] ^= 1; in TEST_P() 448 key.get(), &plaintext_len, plaintext, sizeof(plaintext), ciphertext, in TEST_P() [all …]
|
/third_party/boringssl/src/decrepit/cfb/ |
D | cfb_test.cc | 27 uint8_t ciphertext[16*4]; member 101 EXPECT_EQ(Bytes(test.ciphertext), Bytes(out.get(), input_len)); in TEST()
|
/third_party/boringssl/src/ssl/ |
D | ssl_key_share.cc | 258 uint8_t ciphertext[HRSS_CIPHERTEXT_BYTES]; in Accept() local 261 HRSS_encap(ciphertext, secret.data() + 32, &peer_public_key, entropy); in Accept() 265 !CBB_add_bytes(out_public_key, ciphertext, sizeof(ciphertext))) { in Accept()
|