Home
last modified time | relevance | path

Searched refs:ctlen (Results 1 – 14 of 14) sorted by relevance

/openssl/test/
H A Daesgcmtest.c97 int ctlen = 0, taglen = 0; in kat_test() local
99 return do_encrypt(NULL, ct, &ctlen, tag, &taglen) in kat_test()
100 && TEST_mem_eq(gcm_ct, sizeof(gcm_ct), ct, ctlen) in kat_test()
102 && do_decrypt(gcm_iv, ct, ctlen, tag, taglen); in kat_test()
124 int ctlen = 0, taglen = 0; in ivgen_test() local
126 return do_encrypt(iv_gen, ct, &ctlen, tag, &taglen) in ivgen_test()
127 && do_decrypt(iv_gen, ct, ctlen, tag, taglen); in ivgen_test()
H A Devp_libctx_test.c579 size_t ctlen = 0, unwraplen = 0, secretlen = 0; in kem_rsa_gen_recover() local
589 && TEST_int_eq(EVP_PKEY_encapsulate(dctx, NULL, &ctlen, NULL, in kem_rsa_gen_recover()
591 && TEST_int_eq(ctlen, secretlen) in kem_rsa_gen_recover()
592 && TEST_int_eq(ctlen, bits / 8) in kem_rsa_gen_recover()
593 && TEST_int_eq(EVP_PKEY_encapsulate(dctx, ct, &ctlen, secret, in kem_rsa_gen_recover()
601 ct, ctlen), 1) in kem_rsa_gen_recover()
603 ct, ctlen), 1) in kem_rsa_gen_recover()
608 ctlen = 1; in kem_rsa_gen_recover()
609 if (!TEST_int_eq(EVP_PKEY_encapsulate(dctx, ct, &ctlen, secret, in kem_rsa_gen_recover()
614 ctlen), 0)) in kem_rsa_gen_recover()
[all …]
H A Dhpke_test.c104 size_t ctlen = sizeof(ct); in do_testhpke() local
159 ctlen = sizeof(ct); in do_testhpke()
160 memset(ct, 0, ctlen); in do_testhpke()
161 if (!TEST_true(OSSL_HPKE_seal(sealctx, ct, &ctlen, in do_testhpke()
165 if (!TEST_mem_eq(ct, ctlen, aead[i].expected_ct, in do_testhpke()
234 if (!TEST_false(OSSL_HPKE_seal(sealctx, ct, &ctlen, in do_testhpke()
1653 size_t ctlen = sizeof(ct); in test_hpke_random_suites() local
1669 enc, &enclen, ct, ctlen, in test_hpke_random_suites()
1676 ct, ctlen, in test_hpke_random_suites()
1687 ctlen = 2; /* too-short cttext (can't fit an aead tag) */ in test_hpke_random_suites()
[all …]
H A Devp_fetch_prov_test.c265 int ret = 0, ctlen, ptlen; in encrypt_decrypt() local
273 || !TEST_true(EVP_CipherUpdate(ctx, ct, &ctlen, msg, len)) in encrypt_decrypt()
274 || !TEST_true(EVP_CipherFinal_ex(ctx, ct, &ctlen)) in encrypt_decrypt()
276 || !TEST_true(EVP_CipherUpdate(ctx, pt, &ptlen, ct, ctlen)) in encrypt_decrypt()
H A Dthreadstest.c898 size_t ptlen, ctlen = sizeof(ctbuf); in thread_shared_evp_pkey() local
913 || !TEST_int_ge(EVP_PKEY_encrypt(ctx, ctbuf, &ctlen, in thread_shared_evp_pkey()
926 || !TEST_int_gt(EVP_PKEY_decrypt(ctx, ptbuf, &ptlen, ctbuf, ctlen), in thread_shared_evp_pkey()
H A Dtls-provider.c564 unsigned char *ct, size_t *ctlen, in xor_encapsulate() argument
583 if (ctlen == NULL && sslen == NULL) in xor_encapsulate()
585 if (ctlen != NULL) in xor_encapsulate()
586 *ctlen = XOR_KEY_SIZE; in xor_encapsulate()
602 *ctlen = XOR_KEY_SIZE; in xor_encapsulate()
623 const unsigned char *ct, size_t ctlen) in xor_decapsulate() argument
644 if (ctlen != XOR_KEY_SIZE) in xor_decapsulate()
H A Devp_extra_test.c3444 int ctlen, ptlen, tmp = 99; in test_decrypt_null_chunks() local
3452 || !TEST_true(EVP_EncryptUpdate(ctx, ciphertext, &ctlen, msg, in test_decrypt_null_chunks()
3455 || !TEST_true(EVP_EncryptUpdate(ctx, ciphertext + ctlen, &tmp, NULL, in test_decrypt_null_chunks()
3458 || !TEST_true(EVP_EncryptUpdate(ctx, ciphertext + ctlen, &tmp, in test_decrypt_null_chunks()
3461 || !TEST_int_eq(ctlen += tmp, sizeof(msg)) in test_decrypt_null_chunks()
3462 || !TEST_true(EVP_EncryptFinal(ctx, ciphertext + ctlen, &tmp)) in test_decrypt_null_chunks()
3480 ctlen - dec_offset)) in test_decrypt_null_chunks()
/openssl/crypto/hpke/
H A Dhpke.c152 if (ctlen <= taglen || *ptlen < ctlen - taglen) { in hpke_aead_dec()
229 if (*ctlen <= taglen || ptlen > *ctlen - taglen) { in hpke_aead_enc()
266 *ctlen = len; in hpke_aead_enc()
272 *ctlen += len; in hpke_aead_enc()
278 memcpy(ct + *ctlen, tag, taglen); in hpke_aead_enc()
279 *ctlen += taglen; in hpke_aead_enc()
284 OPENSSL_cleanse(ct, *ctlen); in hpke_aead_enc()
1160 if (ctx == NULL || ct == NULL || ctlen == NULL || *ctlen == 0 in OSSL_HPKE_seal()
1203 || ct == NULL || ctlen == 0) { in OSSL_HPKE_open()
1395 if (aead_info->taglen >= ctlen) { in OSSL_HPKE_get_grease_value()
[all …]
/openssl/include/openssl/
H A Dhpke.h117 unsigned char *ct, size_t *ctlen,
132 const unsigned char *ct, size_t ctlen);
158 unsigned char *ct, size_t ctlen,
/openssl/doc/man3/
H A DOSSL_HPKE_CTX_new.pod36 unsigned char *ct, size_t *ctlen,
51 const unsigned char *ct, size_t ctlen);
74 unsigned char *ct, size_t ctlen,
270 I<aad> of size I<aadlen>, and returns the ciphertext I<ct> of size I<ctlen>.
271 On input I<ctlen> should contain the maximum size of the I<ct> buffer, and returns
272 the output size. An error will occur if the input I<ctlen> is
320 size I<ctlen> using the I<ctx> and additional authenticated data I<aad> of
501 size_t ctlen = sizeof(ct);
526 if (OSSL_HPKE_seal(sctx, ct, &ctlen, aad, aadlen, pt, ptlen) != 1)
536 if (OSSL_HPKE_open(rctx, clear, &clearlen, aad, aadlen, ct, ctlen) != 1)
/openssl/ssl/
H A Ds3_lib.c4981 const unsigned char *ct, size_t ctlen, in ssl_decapsulate() argument
4998 || EVP_PKEY_decapsulate(pctx, NULL, &pmslen, ct, ctlen) <= 0) { in ssl_decapsulate()
5009 if (EVP_PKEY_decapsulate(pctx, pms, &pmslen, ct, ctlen) <= 0) { in ssl_decapsulate()
5037 size_t pmslen = 0, ctlen = 0; in ssl_encapsulate() local
5049 || EVP_PKEY_encapsulate(pctx, NULL, &ctlen, NULL, &pmslen) <= 0 in ssl_encapsulate()
5050 || pmslen == 0 || ctlen == 0) { in ssl_encapsulate()
5056 ct = OPENSSL_malloc(ctlen); in ssl_encapsulate()
5062 if (EVP_PKEY_encapsulate(pctx, ct, &ctlen, pms, &pmslen) <= 0) { in ssl_encapsulate()
5081 *ctlenp = ctlen; in ssl_encapsulate()
H A Dssl_local.h2590 const unsigned char *ct, size_t ctlen,
/openssl/ssl/statem/
H A Dextensions_srvr.c1733 size_t ctlen = 0; in tls_construct_stoc_key_share() local
1741 if (ssl_encapsulate(s, ckey, &ct, &ctlen, 0) == 0) { in tls_construct_stoc_key_share()
1746 if (ctlen == 0) { in tls_construct_stoc_key_share()
1752 if (!WPACKET_sub_memcpy_u16(pkt, ct, ctlen) in tls_construct_stoc_key_share()
H A Dextensions_clnt.c1957 size_t ctlen = PACKET_remaining(&encoded_pt); in tls_parse_stoc_key_share() local
1959 if (ssl_decapsulate(s, ckey, ct, ctlen, 1) == 0) { in tls_parse_stoc_key_share()

Completed in 84 milliseconds