Home
last modified time | relevance | path

Searched refs:plaintext (Results 1 – 25 of 46) sorted by relevance

12

/external/boringssl/src/crypto/fipsmodule/aes/
Daes_test.cc31 std::vector<uint8_t> key, plaintext, ciphertext; in TestRaw() local
33 ASSERT_TRUE(t->GetBytes(&plaintext, "Plaintext")); in TestRaw()
36 ASSERT_EQ(static_cast<unsigned>(AES_BLOCK_SIZE), plaintext.size()); in TestRaw()
44 AES_encrypt(plaintext.data(), block, &aes_key); in TestRaw()
48 OPENSSL_memcpy(block, plaintext.data(), AES_BLOCK_SIZE); in TestRaw()
56 EXPECT_EQ(Bytes(plaintext), Bytes(block)); in TestRaw()
61 EXPECT_EQ(Bytes(plaintext), Bytes(block)); in TestRaw()
73 std::vector<uint8_t> key, plaintext, ciphertext; in TestKeyWrap() local
75 ASSERT_TRUE(t->GetBytes(&plaintext, "Plaintext")); in TestKeyWrap()
78 ASSERT_EQ(plaintext.size() + 8, ciphertext.size()) in TestKeyWrap()
[all …]
/external/protobuf/src/google/protobuf/stubs/
Dstrutil_unittest.cc85 const char* plaintext; member
345 const char* plaintext; member
448 reinterpret_cast<const unsigned char*>(base64_tests[i].plaintext); in TEST()
450 StringPiece plaintext(base64_tests[i].plaintext, in TEST() local
491 EXPECT_EQ(plaintext, decode_str); in TEST()
495 Base64Escape(string(base64_tests[i].plaintext, in TEST()
504 EXPECT_EQ_ARRAY(decoded.size(), decoded, base64_tests[i].plaintext, i); in TEST()
522 EXPECT_EQ_ARRAY(decoded.size(), decoded, base64_tests[i].plaintext, i); in TEST()
533 EXPECT_EQ_ARRAY(decoded.size(), decoded, base64_tests[i].plaintext, i); in TEST()
560 EXPECT_EQ_ARRAY(decoded.size(), decoded, base64_tests[i].plaintext, i); in TEST()
[all …]
/external/boringssl/src/crypto/fipsmodule/modes/
Dgcm_test.cc72 std::vector<uint8_t> key, plaintext, additional_data, nonce, ciphertext, in TEST() local
75 ASSERT_TRUE(t->GetBytes(&plaintext, "Plaintext")); in TEST()
81 ASSERT_EQ(plaintext.size(), ciphertext.size()); in TEST()
85 std::vector<uint8_t> out(plaintext.size()); in TEST()
95 if (!plaintext.empty()) { in TEST()
96 CRYPTO_gcm128_encrypt(&ctx, &aes_key, plaintext.data(), out.data(), in TEST()
97 plaintext.size()); in TEST()
112 EXPECT_EQ(Bytes(plaintext), Bytes(out)); in TEST()
/external/python/cpython2/Lib/test/
Dtest_uu.py12 plaintext = "The smooth-scaled python crept over the sleeping dog\n" variable
23 inp = cStringIO.StringIO(plaintext)
27 inp = cStringIO.StringIO(plaintext)
36 self.assertEqual(out.getvalue(), plaintext)
44 self.assertEqual(out.getvalue(), plaintext)
73 plaintext = "\x33" # 00110011
78 self.assertEqual(out.getvalue(), plaintext)
82 self.assertEqual(decoded, plaintext)
95 sys.stdin = cStringIO.StringIO(plaintext)
107 self.assertEqual(sys.stdout.getvalue(), plaintext)
[all …]
/external/syslinux/gpxe/src/net/
Dtls.c1092 void *plaintext; in tls_assemble_stream() local
1100 plaintext = malloc ( *plaintext_len ); in tls_assemble_stream()
1101 if ( ! plaintext ) in tls_assemble_stream()
1103 content = plaintext; in tls_assemble_stream()
1110 return plaintext; in tls_assemble_stream()
1130 void *plaintext; in tls_assemble_block() local
1144 plaintext = malloc ( *plaintext_len ); in tls_assemble_block()
1145 if ( ! plaintext ) in tls_assemble_block()
1147 iv = plaintext; in tls_assemble_block()
1158 return plaintext; in tls_assemble_block()
[all …]
/external/curl/lib/
Dcurl_ntlm_core.c386 const unsigned char *plaintext, in Curl_ntlm_core_lm_resp() argument
393 DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) results, in Curl_ntlm_core_lm_resp()
397 DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results + 8), in Curl_ntlm_core_lm_resp()
401 DES_ecb_encrypt((DES_cblock*) plaintext, (DES_cblock*) (results + 16), in Curl_ntlm_core_lm_resp()
406 des_encrypt(&des, 8, results, plaintext); in Curl_ntlm_core_lm_resp()
408 des_encrypt(&des, 8, results + 8, plaintext); in Curl_ntlm_core_lm_resp()
410 des_encrypt(&des, 8, results + 16, plaintext); in Curl_ntlm_core_lm_resp()
416 gcry_cipher_encrypt(des, results, 8, plaintext, 8); in Curl_ntlm_core_lm_resp()
421 gcry_cipher_encrypt(des, results + 8, 8, plaintext, 8); in Curl_ntlm_core_lm_resp()
426 gcry_cipher_encrypt(des, results + 16, 8, plaintext, 8); in Curl_ntlm_core_lm_resp()
[all …]
Dcurl_ntlm_core.h64 const unsigned char *plaintext,
/external/boringssl/src/crypto/cipher_extra/
Dcipher_test.cc117 const std::vector<uint8_t> &plaintext, in TestOperation() argument
123 in = &plaintext; in TestOperation()
127 out = &plaintext; in TestOperation()
199 std::vector<uint8_t> key, iv, plaintext, ciphertext, aad, tag; in TestCipher() local
201 ASSERT_TRUE(t->GetBytes(&plaintext, "Plaintext")); in TestCipher()
236 plaintext, ciphertext, aad, tag); in TestCipher()
242 plaintext, ciphertext, aad, tag); in TestCipher()
Daead_test.cc426 const uint8_t plaintext[1] = {'A'}; in TEST_P() local
434 sizeof(ciphertext), nonce, nonce_len, plaintext, in TEST_P()
435 sizeof(plaintext), nullptr /* ad */, 0)); in TEST_P()
443 const size_t overhead_used = ciphertext_len - sizeof(plaintext); in TEST_P()
449 uint8_t plaintext2[sizeof(plaintext) + 16]; in TEST_P()
464 EXPECT_EQ(Bytes(plaintext), Bytes(plaintext2, plaintext2_len)); in TEST_P()
544 alignas(64) uint8_t plaintext[32 + 1]; in TEST_P() local
548 OPENSSL_memset(plaintext, 'P', sizeof(plaintext)); in TEST_P()
563 alignas(64) uint8_t ciphertext[sizeof(plaintext) + EVP_AEAD_MAX_OVERHEAD]; in TEST_P()
567 plaintext + 1, sizeof(plaintext) - 1, ad + 1, in TEST_P()
[all …]
De_chacha20poly1305.c61 const uint8_t *plaintext,
76 const uint8_t *plaintext, in chacha20_poly1305_seal() argument
/external/boringssl/src/ssl/test/runner/
Dchacha20_poly1305.go161 func (c *chaCha20Poly1305) Seal(dst, nonce, plaintext, additionalData []byte) []byte {
166 ret, out := sliceForAppend(dst, len(plaintext)+16)
167 chaCha20(out[:len(plaintext)], plaintext, c.key[:], nonce, 1)
170 c.poly1305(&tag, nonce, out[:len(plaintext)], additionalData)
171 copy(out[len(plaintext):], tag[:])
Dshim_ticket.go181 plaintext, err := DecryptShimTicket(in)
186 tag, session, _, ok := parseDERElement(plaintext)
213 return EncryptShimTicket(plaintext), nil
217 plaintext, err := DecryptShimTicket(in)
222 tag, session, _, ok := parseDERElement(plaintext)
248 return EncryptShimTicket(plaintext), nil
Dcipher_suites.go261 func (f *fixedNonceAEAD) Seal(out, nonce, plaintext, additionalData []byte) []byte {
263 return f.aead.Seal(out, f.sealNonce, plaintext, additionalData)
266 func (f *fixedNonceAEAD) Open(out, nonce, plaintext, additionalData []byte) ([]byte, error) {
268 return f.aead.Open(out, f.openNonce, plaintext, additionalData)
311 func (x *xorNonceAEAD) Seal(out, nonce, plaintext, additionalData []byte) []byte {
313 ret := x.aead.Seal(out, x.sealNonce, plaintext, additionalData)
318 func (x *xorNonceAEAD) Open(out, nonce, plaintext, additionalData []byte) ([]byte, error) {
320 ret, err := x.aead.Open(out, x.openNonce, plaintext, additionalData)
Dticket.go203 plaintext := make([]byte, len(ciphertext))
204 cipher.NewCTR(block, iv).XORKeyStream(plaintext, ciphertext)
207 ok := state.unmarshal(plaintext)
/external/boringssl/src/crypto/rsa_extra/
Drsa_test.cc410 uint8_t plaintext[256]; in TEST_P() local
412 ASSERT_TRUE(RSA_decrypt(key.get(), &plaintext_len, plaintext, in TEST_P()
413 sizeof(plaintext), ciphertext, ciphertext_len, in TEST_P()
415 EXPECT_EQ(Bytes(kPlaintext, kPlaintextLen), Bytes(plaintext, plaintext_len)); in TEST_P()
425 ASSERT_TRUE(RSA_decrypt(key.get(), &plaintext_len, plaintext, in TEST_P()
426 sizeof(plaintext), ciphertext, ciphertext_len, in TEST_P()
428 EXPECT_EQ(Bytes(kPlaintext, kPlaintextLen), Bytes(plaintext, plaintext_len)); in TEST_P()
432 ASSERT_TRUE(RSA_decrypt(key.get(), &plaintext_len, plaintext, in TEST_P()
433 sizeof(plaintext), param.oaep_ciphertext, in TEST_P()
435 EXPECT_EQ(Bytes(kPlaintext, kPlaintextLen), Bytes(plaintext, plaintext_len)); in TEST_P()
[all …]
/external/webrtc/webrtc/base/
Dbase64_unittest.cc25 const char* plaintext; member
283 const char* plaintext;
371 reinterpret_cast<const unsigned char*>(base64_tests[i].plaintext); in TEST()
410 EXPECT_EQ(0, memcmp(decode_buffer, base64_tests[i].plaintext, decode_length)); in TEST()
427 EXPECT_EQ_ARRAY(decoded2.size(), decoded2.data(), base64_tests[i].plaintext, i); in TEST()
442 EXPECT_EQ_ARRAY(decoded2.size(), decoded2, base64_tests[i].plaintext, i); in TEST()
/external/boringssl/src/crypto/pkcs8/
Dpkcs8.c445 uint8_t *plaintext = NULL, *salt_buf = NULL; in PKCS8_marshal_encrypted_private_key() local
473 !CBB_finish(&plaintext_cbb, &plaintext, &plaintext_len)) { in PKCS8_marshal_encrypted_private_key()
506 !EVP_CipherUpdate(&ctx, ptr, &n1, plaintext, plaintext_len) || in PKCS8_marshal_encrypted_private_key()
516 if (plaintext != NULL) { in PKCS8_marshal_encrypted_private_key()
517 OPENSSL_cleanse(plaintext, plaintext_len); in PKCS8_marshal_encrypted_private_key()
518 OPENSSL_free(plaintext); in PKCS8_marshal_encrypted_private_key()
/external/boringssl/src/crypto/cipher_extra/test/
Dcipher_tests.txt127 # AES-bits-ECB:key::plaintext:ciphertext:encdec
173 # AES-bits-CBC:key:IV/ciphertext':plaintext:ciphertext:encdec
393 # 48 bytes plaintext
402 # 80 bytes plaintext
411 # 128 bytes plaintext
420 # 192 bytes plaintext, iv is chosen so that initial counter LSB is 0xFF
429 # 288 bytes plaintext, iv is chosen so that initial counter LSB is 0xFF
438 # 80 bytes plaintext, submitted by Intel
Daes_128_gcm_tests.txt485 # 48 bytes plaintext
493 # 80 bytes plaintext
501 # 128 bytes plaintext
509 # 192 bytes plaintext, iv is chosen so that initial counter LSB is 0xFF
517 # 288 bytes plaintext, iv is chosen so that initial counter LSB is 0xFF
525 # 80 bytes plaintext, submitted by Intel
/external/ImageMagick/MagickCore/
Dcipher.c282 const unsigned int *key,unsigned int *plaintext) in AddRoundKey() argument
291 plaintext[i]=key[i] ^ ciphertext[i]; in AddRoundKey()
320 const unsigned int *key,unsigned char *plaintext) in FinalizeRoundKey() argument
335 p=plaintext; in FinalizeRoundKey()
349 const unsigned int *key,unsigned int *plaintext) in InitializeRoundKey() argument
367 plaintext[i]=key[i] ^ value; in InitializeRoundKey()
380 static void EncipherAESBlock(AESInfo *aes_info,const unsigned char *plaintext, in EncipherAESBlock() argument
462 InitializeRoundKey(plaintext,aes_info->encipher_key,text); in EncipherAESBlock()
/external/wpa_supplicant_8/src/crypto/
Dcrypto_module_tests.c38 u8 plaintext[] = { in test_siv() local
96 if (aes_siv_encrypt(key, sizeof(key), plaintext, sizeof(plaintext), in test_siv()
112 if (os_memcmp(out, plaintext, sizeof(plaintext)) != 0) { in test_siv()
422 char *plaintext; in test_ecb() member
481 hexstr2bin(tv->plaintext, plain, sizeof(plain)) || in test_ecb()
/external/boringssl/src/ssl/
Dt1_lib.cc3108 bssl::UniquePtr<uint8_t> plaintext((uint8_t *)OPENSSL_malloc(ciphertext_len)); in ssl_decrypt_ticket_with_cipher_ctx() local
3109 if (!plaintext) { in ssl_decrypt_ticket_with_cipher_ctx()
3114 OPENSSL_memcpy(plaintext.get(), ciphertext, ciphertext_len); in ssl_decrypt_ticket_with_cipher_ctx()
3121 if (!EVP_DecryptUpdate(cipher_ctx.get(), plaintext.get(), &len1, ciphertext, in ssl_decrypt_ticket_with_cipher_ctx()
3123 !EVP_DecryptFinal_ex(cipher_ctx.get(), plaintext.get() + len1, &len2)) { in ssl_decrypt_ticket_with_cipher_ctx()
3130 *out = plaintext.release(); in ssl_decrypt_ticket_with_cipher_ctx()
3138 uint8_t *plaintext = (uint8_t *)OPENSSL_malloc(ticket_len); in ssl_decrypt_ticket_with_method() local
3139 if (plaintext == NULL) { in ssl_decrypt_ticket_with_method()
3147 ssl, plaintext, &plaintext_len, ticket_len, ticket, ticket_len); in ssl_decrypt_ticket_with_method()
3150 *out = plaintext; in ssl_decrypt_ticket_with_method()
[all …]
/external/netperf/doc/
DMakefile.am17 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) --plaintext -I $(srcdir) \
/external/v8/benchmarks/
DREADME.txt18 decryption stage was given plaintext as input, which resulted in an
21 plaintext. For this to give the correct results the crypto objects
/external/openssh/
Dcipher.c61 int plaintext; member
224 return cc->plaintext; in cipher_ctx_is_plaintext()
346 cc->plaintext = (cipher->number == SSH_CIPHER_NONE); in cipher_init()

12