Home
last modified time | relevance | path

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

12

/freebsd/sys/contrib/openzfs/module/icp/io/
H A Daes.c321 ASSERT(ciphertext != NULL); in aes_encrypt()
372 ciphertext->cd_offset = ciphertext->cd_length; in aes_encrypt()
373 ciphertext->cd_length = saved_length - ciphertext->cd_length; in aes_encrypt()
381 ciphertext->cd_length = in aes_encrypt()
393 ciphertext->cd_offset = ciphertext->cd_length; in aes_encrypt()
394 ciphertext->cd_length = saved_length - ciphertext->cd_length; in aes_encrypt()
403 ciphertext->cd_length = in aes_encrypt()
542 ASSERT(ciphertext != NULL); in aes_encrypt_update()
587 ciphertext->cd_length = in aes_encrypt_update()
843 ASSERT(ciphertext != NULL); in aes_encrypt_atomic()
[all …]
/freebsd/crypto/openssl/test/
H A Digetest.c227 unsigned char ciphertext[BIG_TEST_SIZE]; in test_ige_enc_dec() local
245 unsigned char ciphertext[BIG_TEST_SIZE]; in test_ige_enc_chaining() local
267 unsigned char ciphertext[BIG_TEST_SIZE]; in test_ige_dec_chaining() local
293 unsigned char ciphertext[BIG_TEST_SIZE]; in test_ige_garble_forwards() local
306 ++ciphertext[sizeof(ciphertext) / 2]; in test_ige_garble_forwards()
331 unsigned char ciphertext[BIG_TEST_SIZE]; in test_bi_ige_enc_dec() local
352 unsigned char ciphertext[BIG_TEST_SIZE]; in test_bi_ige_garble1() local
364 ++ciphertext[sizeof(ciphertext) / 2]; in test_bi_ige_garble1()
383 unsigned char ciphertext[BIG_TEST_SIZE]; in test_bi_ige_garble2() local
395 ++ciphertext[sizeof(ciphertext) - 1]; in test_bi_ige_garble2()
[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()
H A Dtls13encryptiontest.c28 const char *ciphertext[3]; member
283 refd = multihexstr2buf(recd->ciphertext, &refdatalen); in test_record()
H A Devp_extra_test.c1295 unsigned char ciphertext[32], plaintext[16]; in test_EVP_Enveloped() local
1322 ciphertext, ciphertext_len)) in test_EVP_Enveloped()
2027 uint8_t ciphertext[128]; in test_EVP_SM2() local
2028 size_t ctext_len = sizeof(ciphertext); in test_EVP_SM2()
2977 unsigned char ciphertext[80]; in test_decrypt_null_chunks() local
3015 ciphertext + dec_offset, in test_decrypt_null_chunks()
3271 unsigned char ciphertext[32], oiv[16], iv[16]; in test_evp_iv_aes() local
3287 int len = sizeof(ciphertext); in test_evp_iv_aes()
3370 || !TEST_true(EVP_EncryptFinal_ex(ctx, ciphertext, &len))) in test_evp_iv_aes()
3412 unsigned char ciphertext[32], oiv[8], iv[8]; in test_evp_iv_des() local
[all …]
/freebsd/crypto/openssh/
H A Dkexsntrup761x25519.c80 u_char *kem_key, *ciphertext, *server_pub; in kex_kem_sntrup761x25519_enc() local
118 if ((r = sshbuf_reserve(server_blob, need, &ciphertext)) != 0) in kex_kem_sntrup761x25519_enc()
121 crypto_kem_sntrup761_enc(ciphertext, kem_key, client_pub); in kex_kem_sntrup761x25519_enc()
123 server_pub = ciphertext + crypto_kem_sntrup761_CIPHERTEXTBYTES; in kex_kem_sntrup761x25519_enc()
133 dump_digest("server cipher text:", ciphertext, in kex_kem_sntrup761x25519_enc()
165 const u_char *ciphertext, *server_pub; in kex_kem_sntrup761x25519_dec() local
177 ciphertext = sshbuf_ptr(server_blob); in kex_kem_sntrup761x25519_dec()
178 server_pub = ciphertext + crypto_kem_sntrup761_CIPHERTEXTBYTES; in kex_kem_sntrup761x25519_dec()
180 dump_digest("server cipher text:", ciphertext, in kex_kem_sntrup761x25519_dec()
192 decoded = crypto_kem_sntrup761_dec(kem_key, ciphertext, in kex_kem_sntrup761x25519_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.c377 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()
424 decode(ciphertext, nonce, origsiz, cred) == 0) in try_rp()
466 if (decode_cbor_blob(ciphertext, v[i].value) < 0) in decode_blob_entry()
489 struct blob ciphertext, nonce; in print_blob_entry() local
495 memset(&ciphertext, 0, sizeof(ciphertext)); in print_blob_entry()
[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()
453 plaintext, keyTable, ciphertext); in Camellia_EncryptBlock()
463 s0 = GETU32(ciphertext) ^ k[0]; in Camellia_DecryptBlock_Rounds()
464 s1 = GETU32(ciphertext + 4) ^ k[1]; in Camellia_DecryptBlock_Rounds()
465 s2 = GETU32(ciphertext + 8) ^ k[2]; in Camellia_DecryptBlock_Rounds()
466 s3 = GETU32(ciphertext + 12) ^ k[3]; 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
98 enciphering to the same ciphertext.
133 The OFB mode produces the same ciphertext whenever the same
146 plaintext enciphering to the same ciphertext, by producing different
[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()
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))
883 free(ciphertext); in ocf_eta()
954 char *buffer, *cleartext, *ciphertext; in run_eta_test()
774 char *buffer, *cleartext, *ciphertext; run_cipher_test() local
929 char *buffer, *cleartext, *ciphertext; run_eta_test() local
1488 char *aad, *buffer, *cleartext, *ciphertext; run_aead_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/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/heimdal/lib/hx509/
H A Dcrypto.c1711 ciphertext->data = NULL; in _hx509_public_encrypt()
1712 ciphertext->length = 0; in _hx509_public_encrypt()
1747 ciphertext->data = to; in _hx509_public_encrypt()
1783 ret = RSA_private_decrypt(ciphertext->length, ciphertext->data, in hx509_private_key_private_decrypt()
2597 *ciphertext = NULL; in hx509_crypto_encrypt()
2616 *ciphertext = calloc(1, sizeof(**ciphertext)); in hx509_crypto_encrypt()
2652 (*ciphertext)->data, in hx509_crypto_encrypt()
2662 if (*ciphertext) { in hx509_crypto_encrypt()
2664 free((*ciphertext)->data); in hx509_crypto_encrypt()
2666 free(*ciphertext); in hx509_crypto_encrypt()
[all …]
/freebsd/sys/contrib/openzfs/module/icp/include/sys/crypto/
H A Dimpl.h301 #define KCF_PROV_ENCRYPT_ATOMIC(pd, mech, key, plaintext, ciphertext, \ argument
305 mech, key, plaintext, ciphertext, template) : \
308 #define KCF_PROV_DECRYPT_ATOMIC(pd, mech, key, ciphertext, plaintext, \ argument
312 mech, key, ciphertext, plaintext, template) : \
/freebsd/crypto/openssl/include/crypto/
H A Daes_platform.h108 … aes_gcm_enc_128_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext,
110 … aes_gcm_enc_192_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext,
112 … aes_gcm_enc_256_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext,
114 size_t aes_gcm_dec_128_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plai…
116 size_t aes_gcm_dec_192_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plai…
118 size_t aes_gcm_dec_256_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plai…
H A Dsm2.h80 const uint8_t *ciphertext, size_t ciphertext_len,
/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
/freebsd/crypto/heimdal/lib/krb5/
H A Dmit_glue.c235 input->ciphertext.data, input->ciphertext.length, in krb5_c_decrypt()
276 &output->ciphertext, in krb5_c_encrypt()

12