Home
last modified time | relevance | path

Searched refs:publen (Results 1 – 22 of 22) sorted by relevance

/freebsd/crypto/openssl/providers/implementations/keymgmt/
H A Dmlx_kmgmt.c154 size_t publen; member
176 if (OSSL_PARAM_get_octet_string(p, &pub, sub_arg->publen, &len) != 1) in export_sub_cb()
178 if (len != sub_arg->publen) { in export_sub_cb()
182 sub_arg->publen); in export_sub_cb()
197 (unsigned long)sub_arg->publen); in export_sub_cb()
227 sub_arg->publen = key->minfo->pubkey_bytes; in export_sub()
234 sub_arg->publen = key->xinfo->pubkey_bytes; in export_sub()
249 size_t publen; in mlx_kem_export() local
265 publen = key->minfo->pubkey_bytes + key->xinfo->pubkey_bytes; in mlx_kem_export()
270 sub_arg.pubenc = OPENSSL_malloc(publen); in mlx_kem_export()
[all …]
H A Dml_kem_kmgmt.c385 size_t publen = 0, prvlen = 0, seedlen = 0, puboff; in ml_kem_key_fromdata() local
424 && OSSL_PARAM_get_octet_string_ptr(p, &pubenc, &publen) != 1) in ml_kem_key_fromdata()
426 if (publen != 0 && publen != v->pubkey_bytes) { in ml_kem_key_fromdata()
432 if (seedlen == 0 && publen == 0 && prvlen == 0) { in ml_kem_key_fromdata()
438 if (publen > 0 && prvlen > 0) { in ml_kem_key_fromdata()
440 puboff = prvlen - ML_KEM_RANDOM_BYTES - ML_KEM_PKHASH_BYTES - publen; in ml_kem_key_fromdata()
441 if (memcmp(pubenc, (unsigned char *)prvenc + puboff, publen) != 0) { in ml_kem_key_fromdata()
460 return ossl_ml_kem_parse_public_key(pubenc, publen, key); in ml_kem_key_fromdata()
653 size_t publen = 0; in ml_kem_set_params() local
660 && (OSSL_PARAM_get_octet_string_ptr(p, &pubenc, &publen) != 1 in ml_kem_set_params()
[all …]
/freebsd/crypto/openssl/providers/implementations/encode_decode/
H A Dml_kem_codecs.c235 ossl_ml_kem_d2i_PUBKEY(const uint8_t *pubenc, int publen, int evp_type, in ossl_ml_kem_d2i_PUBKEY() argument
248 if (publen != ML_COMMON_SPKI_OVERHEAD + (ossl_ssize_t)v->pubkey_bytes in ossl_ml_kem_d2i_PUBKEY()
251 publen -= ML_COMMON_SPKI_OVERHEAD; in ossl_ml_kem_d2i_PUBKEY()
257 if (!ossl_ml_kem_parse_public_key(pubenc, (size_t)publen, ret)) { in ossl_ml_kem_d2i_PUBKEY()
410 size_t publen; in ossl_ml_kem_i2d_pubkey() local
418 publen = key->vinfo->pubkey_bytes; in ossl_ml_kem_i2d_pubkey()
421 && (*out = OPENSSL_malloc(publen)) == NULL) in ossl_ml_kem_i2d_pubkey()
423 if (!ossl_ml_kem_encode_public_key(*out, publen, key)) { in ossl_ml_kem_i2d_pubkey()
431 return (int)publen; in ossl_ml_kem_i2d_pubkey()
561 size_t publen, prvlen; in ossl_ml_kem_key_to_text() local
[all …]
H A Dml_dsa_codecs.h20 __owur ML_DSA_KEY *ossl_ml_dsa_d2i_PUBKEY(const uint8_t *pubenc, int publen,
H A Dml_kem_codecs.h20 __owur ML_KEM_KEY *ossl_ml_kem_d2i_PUBKEY(const uint8_t *pubenc, int publen,
/freebsd/crypto/openssl/test/
H A Dhpke_test.c74 const unsigned char *pub, size_t publen) in cmpkey() argument
80 if (!TEST_true(publen <= sizeof(pubbuf))) in cmpkey()
87 if (pub != NULL && !TEST_mem_eq(pubbuf, pubbuflen, pub, publen)) in cmpkey()
106 size_t publen = sizeof(pub); in do_testhpke() local
118 if (!TEST_true(OSSL_HPKE_keygen(base->suite, pub, &publen, &privE, in do_testhpke()
1087 size_t publen = OSSL_HPKE_TSTSIZE; in test_hpke_modes_suites() local
1098 pub, &publen, &privp, in test_hpke_modes_suites()
1119 pub, publen, in test_hpke_modes_suites()
1215 size_t publen = sizeof(pub); in test_hpke_export() local
1234 if (!TEST_true(OSSL_HPKE_keygen(hpke_suite, pub, &publen, &privp, in test_hpke_export()
[all …]
H A Dml_kem_evp_extra_test.c101 size_t publen; in test_ml_kem() local
113 publen = EVP_PKEY_get1_encoded_public_key(akey, &rawpub); in test_ml_kem()
114 if (!TEST_size_t_gt(publen, 0)) in test_ml_kem()
130 if (!TEST_true(EVP_PKEY_set1_encoded_public_key(bkey, rawpub, publen))) in test_ml_kem()
238 size_t publen; in test_non_derandomised_ml_kem() local
270 publen = EVP_PKEY_get1_encoded_public_key(akey, &rawpub); in test_non_derandomised_ml_kem()
271 if (!TEST_size_t_eq(publen, v->pubkey_bytes)) in test_non_derandomised_ml_kem()
287 if (!TEST_true(EVP_PKEY_set1_encoded_public_key(bkey, rawpub, publen))) in test_non_derandomised_ml_kem()
H A Ddhkem_test.inc17 size_t publen;
552 const unsigned char *pub, size_t publen)
590 (char *)pub, publen))
615 const unsigned char *pub, size_t publen)
634 (char *)pub, publen);
H A Devp_pkey_dhkem_test.c504 && TEST_mem_eq(pubkey, pubkeylen, t->pub, t->publen); in test_ec_dhkem_derivekey()
766 && TEST_mem_eq(t->pub, t->publen, pubkey, pubkeylen) in test_ecx_dhkem_derivekey()
H A Devp_extra_test.c3077 int publen; member
3188 inlen = keys[tst].publen; in test_set_get_raw_keys_int()
6119 pubkeylen = keys[tst].publen; in test_ecx_not_private_key()
/freebsd/crypto/openssl/include/openssl/
H A Dhpke.h114 const unsigned char *pub, size_t publen,
122 unsigned char *pub, size_t *publen, EVP_PKEY **priv,
143 size_t publen);
H A Devp.h1501 const unsigned char *pub, size_t publen);
/freebsd/crypto/openssl/crypto/hpke/
H A Dhpke.c449 const unsigned char *pub, size_t publen) in hpke_encap() argument
459 || pub == NULL || publen == 0) { in hpke_encap()
476 pub, publen); in hpke_encap()
480 ctx->propq, pub, publen); in hpke_encap()
972 const unsigned char *pub, size_t publen) in OSSL_HPKE_CTX_set1_authpub() argument
980 if (ctx == NULL || pub == NULL || publen == 0) { in OSSL_HPKE_CTX_set1_authpub()
1000 pub, publen); in OSSL_HPKE_CTX_set1_authpub()
1005 pub, publen); in OSSL_HPKE_CTX_set1_authpub()
1069 const unsigned char *pub, size_t publen, in OSSL_HPKE_encap() argument
1076 || pub == NULL || publen == 0) { in OSSL_HPKE_encap()
[all …]
/freebsd/crypto/openssl/crypto/ec/
H A Dec_ameth.c287 size_t privlen = 0, publen = 0; in do_EC_KEY_print() local
297 publen = EC_KEY_key2buf(x, EC_KEY_get_conv_form(x), &pub, NULL); in do_EC_KEY_print()
298 if (publen == 0) in do_EC_KEY_print()
329 if (publen != 0) { in do_EC_KEY_print()
332 if (ASN1_buf_print(bp, pub, publen, off + 4) == 0) in do_EC_KEY_print()
H A Dec_asn1.c1010 size_t privlen = 0, publen = 0; in i2d_ECPrivateKey() local
1052 publen = EC_KEY_key2buf(a, a->conv_form, &pub, NULL); in i2d_ECPrivateKey()
1054 if (publen == 0) { in i2d_ECPrivateKey()
1060 ASN1_STRING_set0(priv_key->publicKey, pub, publen); in i2d_ECPrivateKey()
/freebsd/crypto/openssl/doc/man3/
H A DOSSL_HPKE_CTX_new.pod33 const unsigned char *pub, size_t publen,
41 unsigned char *pub, size_t *publen, EVP_PKEY **priv,
59 unsigned char *pub, size_t publen);
257 I<pub> of size I<publen>, and an optional I<info> parameter of size I<infolen>,
299 for the private value I<priv> and a encoded public key I<pub> of size I<publen>.
300 On input I<publen> should contain the maximum size of the I<pub> buffer, and
301 returns the output size. An error will occur if the input I<publen> is too small.
363 encoded pub key I<pub> of size I<publen> into the B<OSSL_HPKE_CTX> I<ctx> before
497 size_t publen = sizeof(pub);
515 if (OSSL_HPKE_keygen(hpke_suite, pub, &publen, &priv,
[all …]
H A DEVP_PKEY_set1_encoded_public_key.pod14 const unsigned char *pub, size_t publen);
50 key is pointed to be B<pub>. The length of the buffer is supplied in B<publen>.
/freebsd/crypto/openssl/crypto/x509/
H A Dx_pubkey.c135 size_t publen; in x509_pubkey_ex_d2i_ex() local
158 publen = *in - in_saved; in x509_pubkey_ex_d2i_ex()
159 if (!ossl_assert(publen > 0)) { in x509_pubkey_ex_d2i_ex()
189 size_t slen = publen; in x509_pubkey_ex_d2i_ex()
196 tmpbuf = OPENSSL_memdup(in_saved, publen); in x509_pubkey_ex_d2i_ex()
/freebsd/crypto/openssl/include/crypto/
H A Dml_kem.h243 __owur int ossl_ml_kem_genkey(uint8_t *pubenc, size_t publen, ML_KEM_KEY *key);
/freebsd/crypto/openssl/crypto/evp/
H A Dp_lib.c1429 size_t publen) in EVP_PKEY_set1_encoded_public_key() argument
1438 (unsigned char *)pub, publen); in EVP_PKEY_set1_encoded_public_key()
1441 if (publen > INT_MAX) in EVP_PKEY_set1_encoded_public_key()
1444 if (evp_pkey_asn1_ctrl(pkey, ASN1_PKEY_CTRL_SET1_TLS_ENCPT, publen, in EVP_PKEY_set1_encoded_public_key()
/freebsd/contrib/wpa/src/crypto/
H A Dcrypto_openssl.c972 size_t publen, privlen; in dh5_init() local
997 publen = BN_num_bytes(dh->pub_key); in dh5_init()
998 pubkey = wpabuf_alloc(publen); in dh5_init()
1006 BN_bn2bin(dh->pub_key, wpabuf_put(pubkey, publen)); in dh5_init()
1072 size_t publen, privlen; in dh5_init()
1098 publen = BN_num_bytes(pub_key); in dh5_init()
1099 pubkey = wpabuf_alloc(publen); in dh5_init()
1107 BN_bn2bin(pub_key, wpabuf_put(pubkey, publen)); in dh5_init()
/freebsd/crypto/openssl/crypto/ml_kem/
H A Dml_kem.c2155 int ossl_ml_kem_genkey(uint8_t *pubenc, size_t publen, ML_KEM_KEY *key) in ossl_ml_kem_genkey() argument
2168 if (pubenc != NULL && publen != vinfo->pubkey_bytes) in ossl_ml_kem_genkey()