Home
last modified time | relevance | path

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

12

/openbsd/regress/lib/libcrypto/mlkem/
H A Dmlkem1024_decap_tests.txt1459 # Random ciphertext
1465 # Random ciphertext
1471 # Random ciphertext
1477 # Random ciphertext
1483 # Random ciphertext
1489 # Random ciphertext
1495 # Random ciphertext
1501 # Random ciphertext
1507 # Random ciphertext
1513 # Random ciphertext
[all …]
H A Dmlkem768_decap_tests.txt1269 ciphertext: d9f3ef33
1459 # Random ciphertext
1465 # Random ciphertext
1471 # Random ciphertext
1477 # Random ciphertext
1483 # Random ciphertext
1489 # Random ciphertext
1495 # Random ciphertext
1501 # Random ciphertext
1507 # Random ciphertext
[all …]
H A Dmlkem1024_encap_tests.txt705 ciphertext:
712 ciphertext:
719 ciphertext:
726 ciphertext:
733 ciphertext:
740 ciphertext:
747 ciphertext:
754 ciphertext:
761 ciphertext:
768 ciphertext:
[all …]
H A Dmlkem768_encap_tests.txt705 ciphertext:
712 ciphertext:
719 ciphertext:
726 ciphertext:
733 ciphertext:
740 ciphertext:
747 ciphertext:
754 ciphertext:
761 ciphertext:
768 ciphertext:
[all …]
H A Dmlkem_unittest.c37 uint8_t *ciphertext; member
163 ctx->encap(ctx->ciphertext, shared_secret1, ctx->pub); in MlKemUnitTest()
164 ctx->decap(shared_secret2, ctx->ciphertext, ctx->ciphertext_len, in MlKemUnitTest()
172 ctx->decap(shared_secret2, ctx->ciphertext, ctx->ciphertext_len, in MlKemUnitTest()
199 .ciphertext = mlkem768_ciphertext, in mlkem768_unittest()
228 .ciphertext = mlkem1024_ciphertext, in mlkem1024_unittest()
H A Dmlkem_iteration_tests.c69 uint8_t *ciphertext; member
142 ctx->encap_external_entropy(ctx->ciphertext, shared_secret, in MlkemIterativeTest()
146 shake_update(&results, ctx->ciphertext, ctx->ciphertext_len); in MlkemIterativeTest()
179 .ciphertext = ciphertext768, in main()
204 .ciphertext = ciphertext1024, in main()
H A Dmlkem_tests.c106 CBS ciphertext, shared_secret, private_key; in MlkemDecapFileTest() local
110 parse_get_cbs(p, DECAP_CIPHERTEXT, &ciphertext); in MlkemDecapFileTest()
121 CBS_data(&ciphertext), CBS_len(&ciphertext), decap->private_key)) { in MlkemDecapFileTest()
282 uint8_t *ciphertext; member
353 CBS entropy, public_key, ciphertext, shared_secret; in MlkemEncapFileTest() local
359 parse_get_cbs(p, ENCAP_CIPHERTEXT, &ciphertext); in MlkemEncapFileTest()
368 encap->encap_external_entropy(encap->ciphertext, shared_secret_buf, in MlkemEncapFileTest()
373 failed |= !parse_data_equal(p, "ciphertext", &ciphertext, in MlkemEncapFileTest()
374 encap->ciphertext, encap->ciphertext_len); in MlkemEncapFileTest()
409 .ciphertext = ciphertext768, in mlkem_encap_tests()
[all …]
H A Dmlkem_tests_util.c153 const uint8_t *ciphertext, size_t ciphertext_len, const void *private_key) in mlkem768_decap() argument
155 return MLKEM768_decap(out_shared_secret, ciphertext, ciphertext_len, in mlkem768_decap()
212 const uint8_t *ciphertext, size_t ciphertext_len, const void *private_key) in mlkem1024_decap() argument
214 return MLKEM1024_decap(out_shared_secret, ciphertext, ciphertext_len, in mlkem1024_decap()
H A Dmlkem_tests_util.h43 const uint8_t *ciphertext, size_t ciphertext_len, const void *priv);
58 const uint8_t *ciphertext, size_t ciphertext_len, const void *priv);
/openbsd/regress/lib/libcrypto/ige/
H A Digetest.c183 unsigned char ciphertext[BIG_TEST_SIZE]; in main() local
202 AES_ige_encrypt(plaintext, ciphertext, TEST_SIZE, &key, iv, in main()
207 AES_ige_encrypt(ciphertext, checktext, TEST_SIZE, &key, iv, in main()
224 ciphertext+TEST_SIZE/2, TEST_SIZE/2, in main()
229 AES_ige_encrypt(ciphertext, checktext, TEST_SIZE, &key, iv, in main()
246 ciphertext+TEST_SIZE/2, TEST_SIZE/2, in main()
253 AES_ige_encrypt(ciphertext+TEST_SIZE/2, in main()
272 ++ciphertext[sizeof ciphertext/2]; in main()
302 ++ciphertext[sizeof ciphertext/2]; in main()
326 ++ciphertext[sizeof ciphertext-1]; in main()
[all …]
/openbsd/regress/lib/libcrypto/evp/
H A Devptest.c136 const unsigned char *ciphertext, int cn, int encdec) in test1() argument
150 hexdump(stdout, "Ciphertext",ciphertext,cn); in test1()
192 if (memcmp(out, ciphertext, cn)) { in test1()
195 hexdump(stderr, "Expected",ciphertext,cn); in test1()
260 const unsigned char *ciphertext, unsigned int cn) in test_digest() argument
274 hexdump(stdout, "Digest",ciphertext,cn); in test_digest()
305 if (memcmp(md, ciphertext, cn)) { in test_digest()
308 hexdump(stderr, "Expected",ciphertext,cn); in test_digest()
349 unsigned char *iv, *key, *plaintext, *ciphertext; in main() local
362 ciphertext=ustrsep(&p, ":"); in main()
[all …]
H A Devptests.txt2 #cipher:key:iv:plaintext:ciphertext:0/1(decrypt/encrypt)
76 # AES-bits-ECB:key::plaintext:ciphertext:encdec
93 # AES-bits-CBC:key:IV/ciphertext':plaintext:ciphertext:encdec
111 # AES-bits-CFB:key:IV/ciphertext':plaintext:ciphertext:encdec
143 # AES-bits-CFB:key:IV/output':plaintext:ciphertext:encdec
222 # CAMELLIA-bits-ECB:key::plaintext:ciphertext:encdec
251 # CAMELLIA-bits-CBC:key:IV/ciphertext':plaintext:ciphertext:encdec
272 # CAMELLIA-bits-CFB:key:IV/ciphertext':plaintext:ciphertext:encdec
310 # CAMELLIA-bits-OFB:key:IV/output':plaintext:ciphertext:encdec
/openbsd/usr.bin/ssh/
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()
H A Dkexmlkem768x25519.c188 const u_char *ciphertext, *server_pub; in kex_kem_mlkem768x25519_dec() local
204 ciphertext = sshbuf_ptr(server_blob); in kex_kem_mlkem768x25519_dec()
205 server_pub = ciphertext + crypto_kem_mlkem768_CIPHERTEXTBYTES; in kex_kem_mlkem768x25519_dec()
213 memcpy(mlkem_ciphertext.value, ciphertext, in kex_kem_mlkem768x25519_dec()
/openbsd/regress/sys/crypto/aes/
H A Daestest.c142 u_char *plaintext, u_char *ciphertext, u_int textlen) in do_tests() argument
151 } else if (!match(result, ciphertext, textlen)) { in do_tests()
157 if (docrypt(key, keylen, ciphertext, result, textlen, 0) < 0) { in do_tests()
175 u_char *key, *plaintext, *ciphertext; in run_file() local
183 key = ciphertext = plaintext = NULL; in run_file()
226 if (ciphertext != NULL) in run_file()
227 free(ciphertext); in run_file()
228 parsehex(cp, &ciphertext, &tmp); in run_file()
247 if (plaintext == NULL || ciphertext == NULL || in run_file()
256 plaintext, ciphertext, textlen); in run_file()
/openbsd/lib/libc/crypt/
H A Dbcrypt.c100 u_int8_t ciphertext[4 * BCRYPT_WORDS] = "OrpheanBeholderScryDoubt"; in bcrypt_hashpass() local
171 cdata[i] = Blowfish_stream2word(ciphertext, 4 * BCRYPT_WORDS, &j); in bcrypt_hashpass()
178 ciphertext[4 * i + 3] = cdata[i] & 0xff; in bcrypt_hashpass()
180 ciphertext[4 * i + 2] = cdata[i] & 0xff; in bcrypt_hashpass()
182 ciphertext[4 * i + 1] = cdata[i] & 0xff; in bcrypt_hashpass()
184 ciphertext[4 * i + 0] = cdata[i] & 0xff; in bcrypt_hashpass()
190 encode_base64(encrypted + 7 + 22, ciphertext, 4 * BCRYPT_WORDS - 1); in bcrypt_hashpass()
192 explicit_bzero(ciphertext, sizeof(ciphertext)); in bcrypt_hashpass()
/openbsd/lib/libcrypto/camellia/
H A Dcamellia.c99 const KEY_TABLE_TYPE keyTable, u8 ciphertext[]);
517 PUTU32(ciphertext, s2); in Camellia_EncryptBlock_Rounds()
518 PUTU32(ciphertext + 4, s3); in Camellia_EncryptBlock_Rounds()
519 PUTU32(ciphertext + 8, s0); in Camellia_EncryptBlock_Rounds()
520 PUTU32(ciphertext + 12, s1); in Camellia_EncryptBlock_Rounds()
528 plaintext, keyTable, ciphertext); in Camellia_EncryptBlock()
538 s0 = GETU32(ciphertext) ^ k[0]; in Camellia_DecryptBlock_Rounds()
539 s1 = GETU32(ciphertext+4) ^ k[1]; in Camellia_DecryptBlock_Rounds()
540 s2 = GETU32(ciphertext+8) ^ k[2]; in Camellia_DecryptBlock_Rounds()
541 s3 = GETU32(ciphertext+12) ^ k[3]; in Camellia_DecryptBlock_Rounds()
[all …]
/openbsd/sys/lib/libsa/
H A Dbcrypt_pbkdf.c58 uint8_t ciphertext[BCRYPT_HASHSIZE] = in bcrypt_hash() local
76 cdata[i] = Blowfish_stream2word(ciphertext, sizeof(ciphertext), in bcrypt_hash()
90 explicit_bzero(ciphertext, sizeof(ciphertext)); in bcrypt_hash()
/openbsd/lib/libutil/
H A Dbcrypt_pbkdf.c60 uint8_t ciphertext[BCRYPT_HASHSIZE] = in bcrypt_hash() local
78 cdata[i] = Blowfish_stream2word(ciphertext, sizeof(ciphertext), in bcrypt_hash()
92 explicit_bzero(ciphertext, sizeof(ciphertext)); in bcrypt_hash()
/openbsd/regress/lib/libcrypto/sm2/
H A Dsm2evptest.c120 uint8_t ciphertext[128]; in test_EVP_SM2() local
121 size_t ctext_len = sizeof(ciphertext); in test_EVP_SM2()
214 CHECK_GOTO(EVP_PKEY_encrypt(cctx, ciphertext, &ctext_len, kMsg, sizeof(kMsg))); in test_EVP_SM2()
218 CHECK_GOTO(EVP_PKEY_decrypt(cctx, plaintext, &ptext_len, ciphertext, ctext_len)); in test_EVP_SM2()
/openbsd/regress/sys/crypto/aesxts/
H A Daes_xts.c56 u_int8_t ciphertext[512]; member
1793 if (!match(result, tv->ciphertext, tv->text_len)) { in main()
1800 if (do_aes_xts(tv->key, tv->key_len, tv->seqno, tv->ciphertext, in main()
/openbsd/lib/libcrypto/mlkem/
H A Dmlkem.h130 const uint8_t *ciphertext, size_t ciphertext_len,
250 const uint8_t *ciphertext, size_t ciphertext_len,
H A Dmlkem1024.c992 const uint8_t ciphertext[MLKEM1024_CIPHERTEXT_BYTES]) in decrypt_cpa()
997 vector_decode(&u, ciphertext, kDU1024); in decrypt_cpa()
1000 scalar_decode(&v, ciphertext + kCompressedVectorSize, kDV1024); in decrypt_cpa()
1012 const uint8_t *ciphertext, size_t ciphertext_len, in MLKEM1024_decap() argument
1029 decrypt_cpa(decrypted, priv, ciphertext); in MLKEM1024_decap()
1035 kdf(failure_key, priv->fo_failure_secret, ciphertext, ciphertext_len); in MLKEM1024_decap()
1036 mask = constant_time_eq_int_8(memcmp(ciphertext, expected_ciphertext, in MLKEM1024_decap()
H A Dmlkem768.c991 const uint8_t ciphertext[MLKEM768_CIPHERTEXT_BYTES]) in decrypt_cpa()
996 vector_decode(&u, ciphertext, kDU768); in decrypt_cpa()
999 scalar_decode(&v, ciphertext + kCompressedVectorSize, kDV768); in decrypt_cpa()
1011 const uint8_t *ciphertext, size_t ciphertext_len, in MLKEM768_decap() argument
1028 decrypt_cpa(decrypted, priv, ciphertext); in MLKEM768_decap()
1034 kdf(failure_key, priv->fo_failure_secret, ciphertext, ciphertext_len); in MLKEM768_decap()
1035 mask = constant_time_eq_int_8(memcmp(ciphertext, expected_ciphertext, in MLKEM768_decap()
/openbsd/lib/libfido2/src/
H A Dlargeblob.c18 fido_blob_t ciphertext; member
31 fido_blob_reset(&blob->ciphertext); in largeblob_reset()
78 if (aes256_gcm_dec(key, &blob->nonce, aad, &blob->ciphertext, in largeblob_decrypt()
141 &blob->ciphertext) < 0) { in largeblob_seal()
278 if (fido_blob_decode(val, &blob->ciphertext) < 0 || in largeblob_do_decode()
279 blob->ciphertext.len < LARGEBLOB_TAG_LENGTH) in largeblob_do_decode()
310 if (fido_blob_is_empty(&blob->ciphertext) || in largeblob_decode()
331 if ((argv[0] = fido_blob_encode(&blob->ciphertext)) == NULL || in largeblob_encode()

12