Home
last modified time | relevance | path

Searched refs:secretlen (Results 1 – 25 of 35) sorted by relevance

12

/openssl/demos/keyexch/
H A Decdh.c33 size_t secretlen; member
109 size_t secretlen = 0; in generate_secret() local
149 if (EVP_PKEY_derive(derivectx, NULL, &secretlen) <= 0) in generate_secret()
151 secret = (unsigned char *)OPENSSL_malloc(secretlen); in generate_secret()
160 if (EVP_PKEY_derive(derivectx, secret, &secretlen) <= 0) in generate_secret()
163 peerA->secretlen = secretlen; in generate_secret()
166 BIO_dump_indent_fp(stdout, peerA->secret, peerA->secretlen, 2); in generate_secret()
206 if (peer1.secretlen != peer2.secretlen in main()
207 || CRYPTO_memcmp(peer1.secret, peer2.secret, peer1.secretlen) != 0) { in main()
/openssl/providers/implementations/kem/
H A Dec_kem.c525 size_t secretlen = (EC_GROUP_get_degree(group) + 7) / 8; in generate_ecdhkm() local
527 if (secretlen != secretsz || secretlen > maxout) { in generate_ecdhkm()
644 unsigned char *secret, size_t *secretlen) in dhkem_encap() argument
654 if (enclen == NULL && secretlen == NULL) in dhkem_encap()
658 if (secretlen != NULL) in dhkem_encap()
659 *secretlen = info->Nsecret; in dhkem_encap()
663 if (*secretlen < info->Nsecret) { in dhkem_encap()
697 *secretlen = info->Nsecret; in dhkem_encap()
732 *secretlen = info->Nsecret; in dhkem_decap()
736 if (*secretlen < info->Nsecret) { in dhkem_decap()
[all …]
H A Drsa_kem.c279 unsigned char *secret, size_t *secretlen) in rsasve_generate() argument
292 if (outlen == NULL && secretlen == NULL) in rsasve_generate()
296 if (secretlen != NULL) in rsasve_generate()
297 *secretlen = nlen; in rsasve_generate()
324 if (secretlen != NULL) in rsasve_generate()
325 *secretlen = nlen; in rsasve_generate()
399 unsigned char *secret, size_t *secretlen) in rsakem_generate() argument
408 return rsasve_generate(prsactx, out, outlen, secret, secretlen); in rsakem_generate()
H A Decx_kem.c547 unsigned char *secret, size_t *secretlen) in dhkem_encap() argument
555 if (enclen == NULL && secretlen == NULL) in dhkem_encap()
559 if (secretlen != NULL) in dhkem_encap()
560 *secretlen = info->Nsecret; in dhkem_encap()
564 if (*secretlen < info->Nsecret) { in dhkem_encap()
590 *secretlen = info->Nsecret; in dhkem_encap()
614 unsigned char *secret, size_t *secretlen, in dhkem_decap() argument
624 *secretlen = info->Nsecret; in dhkem_decap()
627 if (*secretlen < info->Nsecret) { in dhkem_decap()
651 *secretlen = info->Nsecret; in dhkem_decap()
[all …]
H A Dtemplate_kem.c134 unsigned char *secret, size_t *secretlen) in template_encapsulate() argument
142 if (secretlen != NULL) in template_encapsulate()
143 *secretlen = 0; /* replace with real shared secret length */ in template_encapsulate()
146 debug_print("encaps outlens set to %d and %d\n", *outlen, *secretlen); in template_encapsulate()
/openssl/test/
H A Devp_libctx_test.c579 size_t ctlen = 0, unwraplen = 0, secretlen = 0; in kem_rsa_gen_recover() local
590 &secretlen), 1) in kem_rsa_gen_recover()
591 && TEST_int_eq(ctlen, secretlen) in kem_rsa_gen_recover()
594 &secretlen), 1) in kem_rsa_gen_recover()
604 && TEST_mem_eq(unwrap, unwraplen, secret, secretlen); in kem_rsa_gen_recover()
610 &secretlen), 0)) in kem_rsa_gen_recover()
666 size_t ctlen = 0, secretlen = 0; in kem_rsa_params() local
684 && TEST_int_eq(EVP_PKEY_decapsulate(pubctx, secret, &secretlen, ct, in kem_rsa_params()
701 && TEST_int_eq(EVP_PKEY_encapsulate(pubctx, NULL, NULL, NULL, &secretlen), 1) in kem_rsa_params()
717 && TEST_int_eq(secretlen, 256) in kem_rsa_params()
[all …]
H A Devp_pkey_dhkem_test.c188 size_t secretlen = sizeof(secret); in test_ikm_small() local
202 secret, &secretlen), 0); in test_ikm_small()
605 size_t secretlen = sizeof(secret); in test_ec_badpublic() local
626 secret, &secretlen), 0 )) in test_ec_badpublic()
631 if (!TEST_int_eq(EVP_PKEY_decapsulate(ctx, secret, &secretlen, in test_ec_badpublic()
654 size_t secretlen = sizeof(secret); in test_ec_badauth() local
669 secret, &secretlen), 0)) in test_ec_badauth()
673 || !TEST_int_eq(EVP_PKEY_decapsulate(ctx, secret, &secretlen, in test_ec_badauth()
691 size_t secretlen = sizeof(secret); in test_ec_invalid_decap_enc_buffer() local
698 && TEST_int_eq(EVP_PKEY_decapsulate(ctx, secret, &secretlen, in test_ec_invalid_decap_enc_buffer()
H A Devp_extra_test2.c468 size_t outlen, secretlen, secretlen2; in test_new_keytype() local
485 || !TEST_int_eq(EVP_PKEY_encapsulate(ctx, NULL, &outlen, NULL, &secretlen), 1)) in test_new_keytype()
488 secret = OPENSSL_malloc(secretlen); in test_new_keytype()
489 secret2 = OPENSSL_malloc(secretlen); in test_new_keytype()
491 || !TEST_int_eq(EVP_PKEY_encapsulate(ctx, out, &outlen, secret, &secretlen), 1) in test_new_keytype()
494 || !TEST_mem_eq(secret, secretlen, secret2, secretlen2)) in test_new_keytype()
H A Ddhkem_test.inc656 size_t secretlen = 0, enclen = 0;
677 &secretlen), 1)
679 &secretlen), 1)
681 && TEST_mem_eq(secret, secretlen,
694 size_t secretlen = 0;
706 ret = TEST_int_eq(EVP_PKEY_decapsulate(recipctx, NULL, &secretlen,
709 && TEST_int_eq(EVP_PKEY_decapsulate(recipctx, secret, &secretlen,
712 && TEST_mem_eq(secret, secretlen,
/openssl/doc/man3/
H A DEVP_PKEY_decapsulate.pod66 size_t secretlen = 0;
80 if (EVP_PKEY_decapsulate(ctx, NULL, &secretlen, in, inlen) <= 0)
83 secret = OPENSSL_malloc(secretlen);
87 /* Decapsulated secret data is secretlen bytes long */
88 if (EVP_PKEY_decapsulate(ctx, secret, &secretlen, in, inlen) <= 0)
H A DEVP_PKEY_encapsulate.pod72 size_t secretlen = 0, outlen = 0;
85 if (EVP_PKEY_encapsulate(ctx, NULL, &outlen, NULL, &secretlen) <= 0)
89 secret = OPENSSL_malloc(secretlen);
98 if (EVP_PKEY_encapsulate(ctx, out, &outlen, secret, &secretlen) <= 0)
/openssl/crypto/ec/
H A Decx_key.c108 unsigned char *secret, size_t *secretlen, size_t outlen) in ossl_ecx_compute_key() argument
124 *secretlen = keylen; in ossl_ecx_compute_key()
161 *secretlen = keylen; in ossl_ecx_compute_key()
/openssl/providers/implementations/exchange/
H A Ddh_exch.c176 unsigned char *secret, size_t *secretlen, in dh_plain_derive() argument
191 *secretlen = dhsize; in dh_plain_derive()
207 *secretlen = ret; in dh_plain_derive()
212 size_t *secretlen, size_t outlen) in dh_X9_42_kdf_derive() argument
220 *secretlen = pdhctx->kdf_outlen; in dh_X9_42_kdf_derive()
246 *secretlen = pdhctx->kdf_outlen; in dh_X9_42_kdf_derive()
H A Dkdf_exch.c98 static int kdf_derive(void *vpkdfctx, unsigned char *secret, size_t *secretlen, in kdf_derive() argument
111 *secretlen = kdfsize; in kdf_derive()
127 *secretlen = outlen; in kdf_derive()
H A Decx_exch.c130 static int ecx_derive(void *vecxctx, unsigned char *secret, size_t *secretlen, in ecx_derive() argument
138 secret, secretlen, outlen); in ecx_derive()
/openssl/crypto/evp/
H A Dkem.c217 unsigned char *secret, size_t *secretlen) in EVP_PKEY_encapsulate() argument
236 out, outlen, secret, secretlen); in EVP_PKEY_encapsulate()
253 unsigned char *secret, size_t *secretlen, in EVP_PKEY_decapsulate() argument
258 || (secret == NULL && secretlen == NULL)) in EVP_PKEY_decapsulate()
271 secret, secretlen, in, inlen); in EVP_PKEY_decapsulate()
/openssl/apps/
H A Dpkeyutl.c143 size_t buf_outlen = 0, secretlen = 0; in pkeyutl_main() local
535 buf_in, (size_t)buf_inlen, NULL, (size_t *)&secretlen); in pkeyutl_main()
539 if (secretlen > 0) in pkeyutl_main()
540 secret = app_malloc(secretlen, "secret output"); in pkeyutl_main()
543 buf_in, (size_t)buf_inlen, secret, (size_t *)&secretlen); in pkeyutl_main()
564 if (secretlen > 0) in pkeyutl_main()
565 BIO_write(secout, secret, secretlen); in pkeyutl_main()
/openssl/crypto/hpke/
H A Dhpke.c657 size_t secretlen = OSSL_HPKE_MAXSIZE; in hpke_do_middle() local
731 secretlen = kdf_info->Nh; in hpke_do_middle()
732 if (secretlen > OSSL_HPKE_MAXSIZE) { in hpke_do_middle()
736 if (ossl_hpke_labeled_extract(kctx, secret, secretlen, in hpke_do_middle()
752 secret, secretlen, OSSL_HPKE_SEC51LABEL, in hpke_do_middle()
764 secret, secretlen, OSSL_HPKE_SEC51LABEL, in hpke_do_middle()
777 secret, secretlen, OSSL_HPKE_SEC51LABEL, in hpke_do_middle()
1236 unsigned char *secret, size_t secretlen, in OSSL_HPKE_export() argument
1245 if (ctx == NULL || secret == NULL || secretlen == 0) { in OSSL_HPKE_export()
1279 erv = ossl_hpke_labeled_expand(kctx, secret, secretlen, in OSSL_HPKE_export()
/openssl/providers/implementations/kdfs/
H A Dargon2.c165 uint32_t secretlen; member
696 store32((uint8_t *) &value, ctx->secretlen); in initial_hash()
701 if (EVP_DigestUpdate(mdctx, ctx->secret, ctx->secretlen) != 1) in initial_hash()
704 OPENSSL_cleanse(ctx->secret, ctx->secretlen); in initial_hash()
705 ctx->secretlen = 0; in initial_hash()
999 OPENSSL_clear_free(ctx->secret, ctx->secretlen); in kdf_argon2_free()
1140 OPENSSL_clear_free(ctx->secret, ctx->secretlen); in kdf_argon2_reset()
1240 OPENSSL_clear_free(ctx->secret, ctx->secretlen); in kdf_argon2_ctx_set_secret()
1242 ctx->secretlen = 0U; in kdf_argon2_ctx_set_secret()
1251 ctx->secretlen = 0U; in kdf_argon2_ctx_set_secret()
[all …]
/openssl/include/internal/
H A Drecordmethod.h128 size_t secretlen,
/openssl/include/openssl/
H A Dhpke.h136 size_t secretlen,
/openssl/include/crypto/
H A Decx.h86 unsigned char *secret, size_t *secretlen,
/openssl/ssl/record/
H A Drecord.h176 unsigned char *secret, size_t secretlen,
/openssl/doc/man7/
H A Dprovider-kem.pod32 unsigned char *secret, size_t *secretlen);
152 I<*secretlen>.
156 written to I<*secretlen>.
H A Dprovider-keyexch.pod29 int OSSL_FUNC_keyexch_derive(void *ctx, unsigned char *secret, size_t *secretlen,
132 The length of the shared secret should be written to I<*secretlen>.
134 written to I<*secretlen>.

Completed in 83 milliseconds

12