Home
last modified time | relevance | path

Searched refs:ciphertext (Results 1 – 25 of 56) sorted by relevance

123

/freebsd/crypto/openssl/test/
H A Digetest.c227 unsigned char ciphertext[BIG_TEST_SIZE]; in test_ige_enc_dec() local
232 AES_ige_encrypt(plaintext, ciphertext, TEST_SIZE, &key, iv, AES_ENCRYPT); in test_ige_enc_dec()
236 AES_ige_encrypt(ciphertext, checktext, TEST_SIZE, &key, iv, AES_DECRYPT); in test_ige_enc_dec()
245 unsigned char ciphertext[BIG_TEST_SIZE]; in test_ige_enc_chaining() local
250 AES_ige_encrypt(plaintext, ciphertext, TEST_SIZE / 2, &key, iv, in test_ige_enc_chaining()
253 ciphertext + TEST_SIZE / 2, TEST_SIZE / 2, in test_ige_enc_chaining()
258 AES_ige_encrypt(ciphertext, checktext, TEST_SIZE, &key, iv, AES_DECRYPT); in test_ige_enc_chaining()
267 unsigned char ciphertext[BIG_TEST_SIZE]; in test_ige_dec_chaining() local
272 AES_ige_encrypt(plaintext, ciphertext, TEST_SIZE / 2, &key, iv, in test_ige_dec_chaining()
275 ciphertext + TEST_SIZE / 2, TEST_SIZE / 2, in test_ige_dec_chaining()
[all …]
H A Dmodes_internal_test.c194 unsigned char cleartext[64], ciphertext[64], vector[64]; in execute_cts128() local
203 if (!TEST_size_t_eq(fixture->encrypt_block(test_input, ciphertext, len, in execute_cts128()
206 || !TEST_mem_eq(ciphertext, len, vector, len) in execute_cts128()
212 size = fixture->decrypt_block(ciphertext, cleartext, len, in execute_cts128()
222 if (!TEST_size_t_eq(fixture->encrypt_stream(test_input, ciphertext, len, in execute_cts128()
226 || !TEST_mem_eq(ciphertext, len, vector, len) in execute_cts128()
232 if (!TEST_size_t_eq(fixture->decrypt_stream(ciphertext, cleartext, len, in execute_cts128()
/freebsd/sys/contrib/openzfs/module/icp/io/
H A Daes.c173 crypto_key_t *key, crypto_data_t *plaintext, crypto_data_t *ciphertext, in aes_encrypt_atomic() argument
184 ASSERT(ciphertext != NULL); in aes_encrypt_atomic()
206 if (ciphertext->cd_length < length_needed) { in aes_encrypt_atomic()
207 ciphertext->cd_length = length_needed; in aes_encrypt_atomic()
212 saved_offset = ciphertext->cd_offset; in aes_encrypt_atomic()
213 saved_length = ciphertext->cd_length; in aes_encrypt_atomic()
220 ret = crypto_update_iov(&aes_ctx, plaintext, ciphertext, in aes_encrypt_atomic()
224 ret = crypto_update_uio(&aes_ctx, plaintext, ciphertext, in aes_encrypt_atomic()
234 ciphertext, AES_BLOCK_LEN, aes_encrypt_block, in aes_encrypt_atomic()
241 ciphertext, AES_BLOCK_LEN, aes_encrypt_block, in aes_encrypt_atomic()
[all …]
/freebsd/crypto/openssh/regress/misc/fuzz-harness/
H A Dsntrup761_dec_fuzz.cc55 unsigned char ciphertext[crypto_kem_sntrup761_CIPHERTEXTBYTES]; in LLVMFuzzerTestOneInput() local
63 memset(&ciphertext, 0, sizeof(ciphertext)); in LLVMFuzzerTestOneInput()
64 if (len > sizeof(ciphertext)) { in LLVMFuzzerTestOneInput()
65 len = sizeof(ciphertext); in LLVMFuzzerTestOneInput()
67 memcpy(ciphertext, input, len); in LLVMFuzzerTestOneInput()
69 (void)crypto_kem_sntrup761_dec(secret, ciphertext, zero_sk); in LLVMFuzzerTestOneInput()
70 (void)crypto_kem_sntrup761_dec(secret, ciphertext, rnd_sk); in LLVMFuzzerTestOneInput()
H A Dmkcorpus_sntrup761.c59 unsigned char ciphertext[crypto_kem_sntrup761_CIPHERTEXTBYTES]; in main() local
73 if (crypto_kem_sntrup761_enc(ciphertext, secret, pk) != 0) in main()
76 ciphertext, sizeof(ciphertext)); in main()
H A Dsntrup761_enc_fuzz.cc41 unsigned char ciphertext[crypto_kem_sntrup761_CIPHERTEXTBYTES]; in LLVMFuzzerTestOneInput() local
51 (void)crypto_kem_sntrup761_enc(ciphertext, secret, pk); in LLVMFuzzerTestOneInput()
53 (void)crypto_kem_sntrup761_enc(ciphertext, secret, pk); in LLVMFuzzerTestOneInput()
/freebsd/crypto/openssh/
H A Dkexsntrup761x25519.c84 u_char *kem_key, *ciphertext, *server_pub; in kex_kem_sntrup761x25519_enc() local
122 if ((r = sshbuf_reserve(server_blob, need, &ciphertext)) != 0) in kex_kem_sntrup761x25519_enc()
125 crypto_kem_sntrup761_enc(ciphertext, kem_key, client_pub); in kex_kem_sntrup761x25519_enc()
127 server_pub = ciphertext + crypto_kem_sntrup761_CIPHERTEXTBYTES; in kex_kem_sntrup761x25519_enc()
137 dump_digest("server cipher text:", ciphertext, in kex_kem_sntrup761x25519_enc()
169 const u_char *ciphertext, *server_pub; in kex_kem_sntrup761x25519_dec() local
181 ciphertext = sshbuf_ptr(server_blob); in kex_kem_sntrup761x25519_dec()
182 server_pub = ciphertext + crypto_kem_sntrup761_CIPHERTEXTBYTES; in kex_kem_sntrup761x25519_dec()
184 dump_digest("server cipher text:", ciphertext, in kex_kem_sntrup761x25519_dec()
196 decoded = crypto_kem_sntrup761_dec(kem_key, ciphertext, in kex_kem_sntrup761x25519_dec()
H A Dkexmlkem768x25519.c196 const u_char *ciphertext, *server_pub; in kex_kem_mlkem768x25519_dec() local
212 ciphertext = sshbuf_ptr(server_blob); in kex_kem_mlkem768x25519_dec()
213 server_pub = ciphertext + crypto_kem_mlkem768_CIPHERTEXTBYTES; in kex_kem_mlkem768x25519_dec()
221 memcpy(mlkem_ciphertext.value, ciphertext, in kex_kem_mlkem768x25519_dec()
/freebsd/sys/contrib/libsodium/test/default/
H A Daead_aes256gcm.c3083 unsigned char *ciphertext; in tv() local
3135 ciphertext = (unsigned char *) sodium_malloc(ciphertext_len); in tv()
3150 ciphertext, ciphertext_len); in tv()
3155 crypto_aead_aes256gcm_encrypt(ciphertext, &found_ciphertext_len, in tv()
3160 if (memcmp(ciphertext, expected_ciphertext, ciphertext_len) != 0) { in tv()
3164 ciphertext, ciphertext_len); in tv()
3172 NULL, ciphertext, in tv()
3189 NULL, ciphertext, ciphertext_len, in tv()
3194 NULL, ciphertext, ciphertext_len, in tv()
3216 sodium_free(ciphertext); in tv()
/freebsd/contrib/libfido2/tools/
H A Dlargeblob.c359 decode(const struct blob *ciphertext, const struct blob *nonce, in decode() argument
377 if (ciphertext->len > UINT_MAX || in decode()
378 ciphertext->len > SIZE_MAX - 16 || in decode()
379 ciphertext->len < 16) in decode()
381 plaintext.len = ciphertext->len - 16; in decode()
390 ciphertext->ptr + ciphertext->len - 16) == 0) in decode()
399 EVP_Cipher(ctx, plaintext.ptr, ciphertext->ptr, in decode()
417 try_rp(const fido_credman_rk_t *rk, const struct blob *ciphertext, in try_rp() argument
424 decode(ciphertext, nonce, origsiz, cred) == 0) in try_rp()
446 decode_blob_entry(const cbor_item_t *item, struct blob *ciphertext, in decode_blob_entry() argument
[all …]
/freebsd/secure/lib/libcrypt/
H A Dcrypt-blowfish.c142 u_int8_t ciphertext[4 * BCRYPT_BLOCKS] = "OrpheanBeholderScryDoubt"; in crypt_blowfish() local
228 cdata[i] = Blowfish_stream2word(ciphertext, 4 * BCRYPT_BLOCKS, &j); in crypt_blowfish()
235 ciphertext[4 * i + 3] = cdata[i] & 0xff; in crypt_blowfish()
237 ciphertext[4 * i + 2] = cdata[i] & 0xff; in crypt_blowfish()
239 ciphertext[4 * i + 1] = cdata[i] & 0xff; in crypt_blowfish()
241 ciphertext[4 * i + 0] = cdata[i] & 0xff; in crypt_blowfish()
256 encode_base64((u_int8_t *)buffer, ciphertext, 4 * BCRYPT_BLOCKS - 1); in crypt_blowfish()
258 memset(ciphertext, 0, sizeof(ciphertext)); in crypt_blowfish()
/freebsd/crypto/openssl/crypto/camellia/
H A Dcmll_local.h35 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[],
H A Dcamellia.c405 u8 ciphertext[]) in Camellia_EncryptBlock_Rounds() argument
443 PUTU32(ciphertext, s2); in Camellia_EncryptBlock_Rounds()
444 PUTU32(ciphertext + 4, s3); in Camellia_EncryptBlock_Rounds()
445 PUTU32(ciphertext + 8, s0); in Camellia_EncryptBlock_Rounds()
446 PUTU32(ciphertext + 12, s1); in Camellia_EncryptBlock_Rounds()
450 const KEY_TABLE_TYPE keyTable, u8 ciphertext[]) in Camellia_EncryptBlock() argument
453 plaintext, keyTable, ciphertext); in Camellia_EncryptBlock()
456 void Camellia_DecryptBlock_Rounds(int grandRounds, const u8 ciphertext[], in Camellia_DecryptBlock_Rounds() argument
463 s0 = GETU32(ciphertext) ^ k[0]; in Camellia_DecryptBlock_Rounds()
464 s1 = GETU32(ciphertext + 4) ^ k[1]; in Camellia_DecryptBlock_Rounds()
[all …]
/freebsd/crypto/openssl/doc/man7/
H A Ddes_modes.pod31 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 …]
/freebsd/crypto/openssh/openbsd-compat/
H A Dbcrypt_pbkdf.c76 uint8_t ciphertext[BCRYPT_HASHSIZE] = in bcrypt_hash() local
94 cdata[i] = Blowfish_stream2word(ciphertext, sizeof(ciphertext), in bcrypt_hash()
108 explicit_bzero(ciphertext, sizeof(ciphertext)); in bcrypt_hash()
/freebsd/sys/contrib/openzfs/module/icp/api/
H A Dkcf_cipher.c69 crypto_key_t *key, crypto_ctx_template_t tmpl, crypto_data_t *ciphertext) in crypto_encrypt() argument
93 plaintext, ciphertext, spi_ctx_tmpl); in crypto_encrypt()
139 crypto_decrypt(crypto_mechanism_t *mech, crypto_data_t *ciphertext, in crypto_decrypt() argument
165 ciphertext, plaintext, spi_ctx_tmpl); in crypto_decrypt()
/freebsd/tools/tools/crypto/
H A Dcryptocheck.c793 char *buffer, *cleartext, *ciphertext; in run_cipher_test() local
827 ciphertext = malloc(size); in run_cipher_test()
830 if (!openssl_cipher(alg, cipher, key, iv, cleartext, ciphertext, size, in run_cipher_test()
833 if (size > 0 && memcmp(cleartext, ciphertext, size) == 0) { in run_cipher_test()
838 if (!openssl_cipher(alg, cipher, key, iv, ciphertext, buffer, size, 0)) in run_cipher_test()
855 if (memcmp(ciphertext, buffer, size) != 0) { in run_cipher_test()
858 hexdump(ciphertext, size, NULL, 0); in run_cipher_test()
865 if (!ocf_cipher(&ses, alg, iv, ciphertext, buffer, size, COP_DECRYPT)) in run_cipher_test()
883 free(ciphertext); in run_cipher_test()
954 char *buffer, *cleartext, *ciphertext; in run_eta_test() local
[all …]
H A Dcryptotest.c250 char *cleartext, *ciphertext, *originaltext, *key; in runtest() local
312 ciphertext = cleartext+size; in runtest()
339 cop.dst = ciphertext; in runtest()
349 if (verify && bcmp(ciphertext, cleartext, size) == 0) { in runtest()
351 hexdump(ciphertext, size); in runtest()
359 cop.src = ciphertext; in runtest()
386 cop.mac = ciphertext; in runtest()
/freebsd/sys/contrib/openzfs/module/icp/include/sys/crypto/
H A Dimpl.h263 #define KCF_PROV_ENCRYPT_ATOMIC(pd, mech, key, plaintext, ciphertext, \ argument
267 mech, key, plaintext, ciphertext, template) : \
270 #define KCF_PROV_DECRYPT_ATOMIC(pd, mech, key, ciphertext, plaintext, \ argument
274 mech, key, ciphertext, plaintext, template) : \
/freebsd/crypto/heimdal/lib/hx509/
H A Dcrypto.c1701 heim_octet_string *ciphertext) in _hx509_public_encrypt() argument
1711 ciphertext->data = NULL; in _hx509_public_encrypt()
1712 ciphertext->length = 0; in _hx509_public_encrypt()
1746 ciphertext->length = ret; in _hx509_public_encrypt()
1747 ciphertext->data = to; in _hx509_public_encrypt()
1751 der_free_octet_string(ciphertext); in _hx509_public_encrypt()
1761 const heim_octet_string *ciphertext, in hx509_private_key_private_decrypt() argument
1783 ret = RSA_private_decrypt(ciphertext->length, ciphertext->data, in hx509_private_key_private_decrypt()
2591 heim_octet_string **ciphertext) in hx509_crypto_encrypt() argument
2597 *ciphertext = NULL; in hx509_crypto_encrypt()
[all …]
/freebsd/sys/contrib/openzfs/include/sys/crypto/
H A Dapi.h66 crypto_key_t *key, crypto_ctx_template_t tmpl, crypto_data_t *ciphertext);
67 extern int crypto_decrypt(crypto_mechanism_t *mech, crypto_data_t *ciphertext,
/freebsd/crypto/openssl/doc/man3/
H A DRSA_public_encrypt.pod29 session key) using the public key B<rsa> and stores the ciphertext in
59 RSA_public_encrypt() will include some random bytes into the ciphertext
60 and therefore the ciphertext will be different each time, even if the
62 The returned ciphertext in B<to> will always be zero padded to exactly
69 bytes are in the ciphertext. Those are not important and may be removed,
/freebsd/crypto/openssl/include/crypto/
H A Daes_platform.h110 … aes_gcm_enc_128_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext,
112 … aes_gcm_enc_192_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext,
114 … aes_gcm_enc_256_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext,
116 size_t aes_gcm_dec_128_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plai…
118 size_t aes_gcm_dec_192_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plai…
120 size_t aes_gcm_dec_256_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plai…
/freebsd/contrib/libfido2/src/
H A Dlargeblob.c19 fido_blob_t ciphertext; member
32 fido_blob_reset(&blob->ciphertext); in largeblob_reset()
79 if (aes256_gcm_dec(key, &blob->nonce, aad, &blob->ciphertext, in largeblob_decrypt()
142 &blob->ciphertext) < 0) { in largeblob_seal()
290 if (fido_blob_decode(val, &blob->ciphertext) < 0 || in largeblob_do_decode()
291 blob->ciphertext.len < LARGEBLOB_TAG_LENGTH) in largeblob_do_decode()
322 if (fido_blob_is_empty(&blob->ciphertext) || in largeblob_decode()
343 if ((argv[0] = fido_blob_encode(&blob->ciphertext)) == NULL || in largeblob_encode()
/freebsd/crypto/openssl/test/recipes/30-test_evp_data/
H A Devpciph_camellia.txt17 # CAMELLIA-bits-ECB:key::plaintext:ciphertext:encdec
120 # CAMELLIA-bits-CBC:key:IV/ciphertext':plaintext:ciphertext:encdec
213 # CAMELLIA-bits-CFB:key:IV/ciphertext':plaintext:ciphertext:encdec
419 # CAMELLIA-bits-OFB:key:IV/output':plaintext:ciphertext:encdec

123