Home
last modified time | relevance | path

Searched refs:pub (Results 1 – 25 of 75) sorted by relevance

123

/openssl/demos/signature/
H A DEVP_ED_Signature_demo.c87 static int demo_verify(EVP_PKEY *pub, in demo_verify() argument
106 libctx, NULL, pub, NULL)) { in demo_verify()
131 EVP_PKEY *priv = NULL, *pub = NULL; in create_key() local
154 pub = EVP_PKEY_new_raw_public_key_ex(libctx, "ED25519", NULL, pubdata, pubdata_len); in create_key()
155 if (pub == NULL) { in create_key()
162 *pubout = pub; in create_key()
176 EVP_PKEY *priv = NULL, *pub = NULL; in main() local
183 if (!create_key(libctx, &priv, &pub)) { in main()
193 if (!demo_verify(pub, hamlet, sizeof(hamlet), in main()
203 EVP_PKEY_free(pub); in main()
/openssl/test/
H A Dffc_internal_test.c445 BIGNUM *pub = NULL; in ffc_public_validate_test() local
448 if (!TEST_ptr(pub = BN_new())) in ffc_public_validate_test()
455 if (!TEST_true(BN_set_word(pub, 1))) in ffc_public_validate_test()
457 BN_set_negative(pub, 1); in ffc_public_validate_test()
463 if (!TEST_true(BN_set_word(pub, 0))) in ffc_public_validate_test()
475 if (!TEST_true(BN_add_word(pub, 2))) in ffc_public_validate_test()
481 if (!TEST_ptr(BN_copy(pub, params->p))) in ffc_public_validate_test()
489 if (!TEST_true(BN_sub_word(pub, 1))) in ffc_public_validate_test()
497 if (!TEST_true(BN_sub_word(pub, 1))) in ffc_public_validate_test()
505 if (!TEST_true(BN_sub_word(pub, 5))) in ffc_public_validate_test()
[all …]
H A Dhpke_test.c87 if (pub != NULL && !TEST_mem_eq(pubbuf, pubbuflen, pub, publen)) in cmpkey()
105 unsigned char pub[OSSL_HPKE_TSTSIZE]; in do_testhpke() local
106 size_t publen = sizeof(pub); in do_testhpke()
112 size_t rpublen = sizeof(pub); in do_testhpke()
1121 unsigned char pub[OSSL_HPKE_TSTSIZE]; in test_hpke_export() local
1122 size_t publen = sizeof(pub); in test_hpke_export()
1310 unsigned char pub[OSSL_HPKE_TSTSIZE]; in test_hpke_oddcalls() local
1311 size_t publen = sizeof(pub); in test_hpke_oddcalls()
1391 publen = sizeof(pub); in test_hpke_oddcalls()
1799 size_t publen = sizeof(pub); in test_hpke_compressed()
[all …]
H A Ddsatest.c332 BIGNUM *p = NULL, *q = NULL, *g = NULL, *priv = NULL, *pub = NULL, *priv2 = NULL; in test_dsa_sig_infinite_loop() local
357 || !TEST_ptr(pub = BN_bin2bn(out_pub, sizeof(out_pub), NULL)) in test_dsa_sig_infinite_loop()
371 if (!TEST_true(DSA_set0_key(dsa, pub, priv))) in test_dsa_sig_infinite_loop()
373 pub = priv = NULL; in test_dsa_sig_infinite_loop()
409 BN_free(pub); in test_dsa_sig_infinite_loop()
423 BIGNUM *p = NULL, *q = NULL, *g = NULL, *priv = NULL, *pub = NULL; in test_dsa_sig_neg_param() local
446 || !TEST_ptr(pub = BN_bin2bn(out_pub, sizeof(out_pub), NULL)) in test_dsa_sig_neg_param()
455 if (!TEST_true(DSA_set0_key(dsa, pub, priv))) in test_dsa_sig_neg_param()
457 pub = priv = NULL; in test_dsa_sig_neg_param()
481 BN_free(pub); in test_dsa_sig_neg_param()
H A Ddhtest.c266 BIGNUM *p = NULL, *q = NULL, *g = NULL, *pub = NULL, *priv = NULL; in dh_computekey_range_test() local
279 || !TEST_ptr(pub = BN_new()) in dh_computekey_range_test()
287 if (!TEST_true(BN_set_word(pub, 1))) in dh_computekey_range_test()
293 if (!TEST_int_le(ossl_dh_compute_key(buf, pub, dh), 0)) in dh_computekey_range_test()
296 if (!TEST_ptr(BN_copy(pub, DH_get0_p(dh))) in dh_computekey_range_test()
297 || !TEST_int_le(ossl_dh_compute_key(buf, pub, dh), 0)) in dh_computekey_range_test()
300 if (!TEST_true(BN_sub_word(pub, 1)) in dh_computekey_range_test()
301 || !TEST_int_le(ossl_dh_compute_key(buf, pub, dh), 0)) in dh_computekey_range_test()
304 if (!TEST_true(BN_sub_word(pub, 1)) in dh_computekey_range_test()
305 || !TEST_int_eq(ossl_dh_compute_key(buf, pub, dh), sz)) in dh_computekey_range_test()
[all …]
H A Dacvp_test.c491 unsigned char *priv = NULL, *pub = NULL; in eddsa_keygen_test() local
505 test_output_memory("q", pub, pub_len); in eddsa_keygen_test()
512 OPENSSL_free(pub); in eddsa_keygen_test()
580 OPENSSL_free(pub); in dsa_keygen_test()
582 pub = priv = NULL; in dsa_keygen_test()
587 OPENSSL_free(pub); in dsa_keygen_test()
691 if (pub != NULL) { in dsa_create_pkey()
1156 if (pub != NULL) { in dh_create_pkey()
1192 unsigned char *pub = NULL; in dh_safe_prime_keygen_test() local
1212 test_output_memory("y", pub, pub_len); in dh_safe_prime_keygen_test()
[all …]
H A Devp_libctx_test.c544 static int rsa_keygen(int bits, EVP_PKEY **pub, EVP_PKEY **priv) in rsa_keygen() argument
561 if (!TEST_ptr(d2i_PublicKey(EVP_PKEY_RSA, pub, &pp, len))) in rsa_keygen()
573 EVP_PKEY *pub = NULL; in kem_rsa_gen_recover() local
582 ret = TEST_true(rsa_keygen(bits, &pub, &priv)) in kem_rsa_gen_recover()
583 && TEST_ptr(sctx = EVP_PKEY_CTX_new_from_pkey(libctx, pub, NULL)) in kem_rsa_gen_recover()
618 EVP_PKEY_free(pub); in kem_rsa_gen_recover()
661 EVP_PKEY *pub = NULL; in kem_rsa_params() local
668 ret = TEST_true(rsa_keygen(2048, &pub, &priv)) in kem_rsa_params()
669 && TEST_ptr(pubctx = EVP_PKEY_CTX_new_from_pkey(libctx, pub, NULL)) in kem_rsa_params()
724 EVP_PKEY_free(pub); in kem_rsa_params()
H A Devp_pkey_provided_test.c906 BIGNUM *pub = NULL, *priv = NULL; in test_fromdata_dh_named_group() local
952 || !TEST_ptr(pub = BN_bin2bn(pub_data, sizeof(pub_data), NULL)) in test_fromdata_dh_named_group()
1020 || !TEST_BN_eq(pub, pub_out) in test_fromdata_dh_named_group()
1099 BN_free(pub); in test_fromdata_dh_named_group()
1120 BIGNUM *pub = NULL, *priv = NULL; in test_fromdata_dh_fips186_4() local
1203 || !TEST_BN_eq(pub, pub_out) in test_fromdata_dh_fips186_4()
1277 BN_free(pub); in test_fromdata_dh_fips186_4()
1852 BIGNUM *pub = NULL, *priv = NULL; in test_fromdata_dsa_fips186_4() local
1985 pub)) in test_fromdata_dsa_fips186_4()
2014 || !TEST_BN_eq(pub, pub_out) in test_fromdata_dsa_fips186_4()
[all …]
H A Devp_pkey_dhkem_test.c495 && TEST_mem_eq(pubkey, pubkeylen, t->pub, t->publen); in test_ec_dhkem_derivekey()
604 unsigned char pub[256]; in test_ec_badpublic() local
611 pub[0] = 0; in test_ec_badpublic()
613 pub, 1))) in test_ec_badpublic()
652 unsigned char pub[256]; in test_ec_badauth() local
661 pub[0] = 0; in test_ec_badauth()
663 pub, 1))) in test_ec_badauth()
746 && TEST_mem_eq(t->pub, t->publen, pubkey, pubkeylen) in test_ecx_dhkem_derivekey()
/openssl/test/recipes/30-test_evp_data/
H A Devppkey_ffdhe.txt47 PublicKey=ffdhe2048-1-pub
63 PublicKey=ffdhe2048-2-pub
84 PeerKey=ffdhe2048-2-pub
88 PeerKey=ffdhe2048-1-pub
92 PeerKey=ffdhe2048-2-pub
100 PeerKey=ffdhe2048-2-pub
111 PeerKey=ffdhe2048-1-pub
194 PeerKey=ffdhe3072-2-pub
198 PeerKey=ffdhe3072-1-pub
294 PeerKey=ffdhe4096-2-pub
[all …]
/openssl/demos/keyexch/
H A Decdh.c31 EVP_PKEY *pub; /* public key to send to other peer */ member
65 && (EVP_PKEY_fromdata(ctx, &peer->pub, EVP_PKEY_PUBLIC_KEY, in get_peer_public_key()
102 EVP_PKEY_free(peer->pub); in destroy_peer()
199 if (!generate_secret(&peer1, peer2.pub, libctx) in main()
200 || !generate_secret(&peer2, peer1.pub, libctx)) { in main()
/openssl/doc/man3/
H A DX509_PUBKEY_new.pod41 void X509_PUBKEY_set0_public_key(X509_PUBKEY *pub,
43 int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,
48 X509_ALGOR **pa, const X509_PUBKEY *pub);
99 X509_PUBKEY_set0_public_key() sets the public-key encoding of I<pub>
101 Any earlier public-key encoding in I<pub> is freed.
103 Ownership of the I<penc> argument is passed to I<pub>.
105 X509_PUBKEY_set0_param() sets the public-key parameters of I<pub>.
110 any earlier public-key encoding in I<pub> is freed.
111 On success ownership of all the supplied arguments is passed to I<pub>
114 X509_PUBKEY_get0_param() retrieves the public key parameters from I<pub>,
/openssl/include/crypto/
H A Dasn1.h29 int (*pub_decode) (EVP_PKEY *pk, const X509_PUBKEY *pub);
30 int (*pub_encode) (X509_PUBKEY *pub, const EVP_PKEY *pk);
73 int (*set_pub_key) (EVP_PKEY *pk, const unsigned char *pub, size_t len);
75 int (*get_pub_key) (const EVP_PKEY *pk, unsigned char *pub, size_t *len);
/openssl/crypto/dh/
H A Ddh_backend.c106 const BIGNUM *priv = NULL, *pub = NULL; in ossl_dh_key_todata() local
111 DH_get0_key(dh, &pub, &priv); in ossl_dh_key_todata()
116 if (pub != NULL in ossl_dh_key_todata()
117 && !ossl_param_build_set_bn(bld, params, OSSL_PKEY_PARAM_PUB_KEY, pub)) in ossl_dh_key_todata()
/openssl/include/openssl/
H A Dhpke.h114 const unsigned char *pub, size_t publen,
122 unsigned char *pub, size_t *publen, EVP_PKEY **priv,
142 const unsigned char *pub,
/openssl/apps/
H A Dtestdsa.h191 unsigned char *pub; member
205 st.pub = dsa##bits##_pub; \
243 pub_key = BN_bin2bn(dsa_t.pub, dsa_t.pub_l, NULL); in get_dsa()
/openssl/providers/implementations/kem/
H A Dec_kem.c72 const EC_POINT *pub = EC_KEY_get0_public_key(ec); in eckey_check() local
75 if (pub == NULL) { in eckey_check()
183 const EC_POINT *pub; in ecpubkey_todata() local
187 pub = EC_KEY_get0_public_key(ec); in ecpubkey_todata()
188 *outlen = EC_POINT_point2oct(group, pub, POINT_CONVERSION_UNCOMPRESSED, in ecpubkey_todata()
498 static int check_publickey(const EC_KEY *pub) in check_publickey() argument
501 BN_CTX *bnctx = BN_CTX_new_ex(ossl_ec_key_get_libctx(pub)); in check_publickey()
505 ret = ossl_ec_key_public_check(pub, bnctx); in check_publickey()
/openssl/crypto/x509/
H A Dx_pubkey.c1010 void X509_PUBKEY_set0_public_key(X509_PUBKEY *pub, in X509_PUBKEY_set0_public_key() argument
1013 ASN1_STRING_set0(pub->public_key, penc, penclen); in X509_PUBKEY_set0_public_key()
1014 ossl_asn1_string_set_bits_left(pub->public_key, 0); in X509_PUBKEY_set0_public_key()
1017 int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj, in X509_PUBKEY_set0_param() argument
1021 if (!X509_ALGOR_set0(pub->algor, aobj, ptype, pval)) in X509_PUBKEY_set0_param()
1024 X509_PUBKEY_set0_public_key(pub, penc, penclen); in X509_PUBKEY_set0_param()
1030 X509_ALGOR **pa, const X509_PUBKEY *pub) in X509_PUBKEY_get0_param() argument
1033 *ppkalg = pub->algor->algorithm; in X509_PUBKEY_get0_param()
1035 *pk = pub->public_key->data; in X509_PUBKEY_get0_param()
1036 *ppklen = pub->public_key->length; in X509_PUBKEY_get0_param()
[all …]
/openssl/crypto/hpke/
H A Dhpke.c447 const unsigned char *pub, size_t publen) in hpke_encap() argument
457 || pub == NULL || publen == 0) { in hpke_encap()
474 pub, publen); in hpke_encap()
478 ctx->propq, pub, publen); in hpke_encap()
969 if (ctx == NULL || pub == NULL || publen == 0) { in OSSL_HPKE_CTX_set1_authpub()
989 pub, publen); in OSSL_HPKE_CTX_set1_authpub()
994 pub, publen); in OSSL_HPKE_CTX_set1_authpub()
1058 const unsigned char *pub, size_t publen, in OSSL_HPKE_encap() argument
1065 || pub == NULL || publen == 0) { in OSSL_HPKE_encap()
1091 if (hpke_encap(ctx, enc, enclen, pub, publen) != 1) { in OSSL_HPKE_encap()
[all …]
/openssl/crypto/ct/
H A Dct_sct.c286 X509_PUBKEY *pub = NULL, *log_pkey = NULL; in SCT_validate() local
326 if (X509_PUBKEY_set(&pub, issuer_pkey) != 1) in SCT_validate()
328 if (SCT_CTX_set1_issuer_pubkey(sctx, pub) != 1) in SCT_validate()
361 X509_PUBKEY_free(pub); in SCT_validate()
/openssl/crypto/ec/
H A Decx_meth.c278 static int ecx_set_pub_key(EVP_PKEY *pkey, const unsigned char *pub, size_t len) in ecx_set_pub_key() argument
286 ecx = ossl_ecx_key_op(NULL, pub, len, pkey->ameth->pkey_id, in ecx_set_pub_key()
317 static int ecx_get_pub_key(const EVP_PKEY *pkey, unsigned char *pub, in ecx_get_pub_key() argument
322 if (pub == NULL) { in ecx_get_pub_key()
332 memcpy(pub, key->pubkey, *len); in ecx_get_pub_key()
1288 unsigned char pub[32]; in s390x_pkey_ecd_digestverify25519() member
1305 s390x_flip_endian32(param.ed25519.pub, edkey->pubkey); in s390x_pkey_ecd_digestverify25519()
1320 unsigned char pub[64]; in s390x_pkey_ecd_digestverify448() member
1339 memcpy(param.ed448.pub, edkey->pubkey, 57); in s390x_pkey_ecd_digestverify448()
1340 s390x_flip_endian64(param.ed448.pub, param.ed448.pub); in s390x_pkey_ecd_digestverify448()
/openssl/crypto/asn1/
H A Dameth_lib.c281 const X509_PUBKEY *pub), in EVP_PKEY_asn1_set_public() argument
282 int (*pub_encode) (X509_PUBKEY *pub, in EVP_PKEY_asn1_set_public()
414 const unsigned char *pub, in EVP_PKEY_asn1_set_set_pub_key() argument
430 unsigned char *pub, in EVP_PKEY_asn1_set_get_pub_key() argument
/openssl/crypto/ec/curve448/
H A Deddsa.c276 c448_ed448_pubkey_verify(const uint8_t *pub, size_t pub_len) in c448_ed448_pubkey_verify() argument
283 return ossl_curve448_point_decode_like_eddsa_and_mul_by_ratio(pk_point, pub); in c448_ed448_pubkey_verify()
400 ossl_ed448_pubkey_verify(const uint8_t *pub, size_t pub_len) in ossl_ed448_pubkey_verify() argument
402 return c448_ed448_pubkey_verify(pub, pub_len); in ossl_ed448_pubkey_verify()
/openssl/doc/man7/
H A DEVP_PKEY-X25519.pod13 support the associated key, containing the public key I<pub> and the
53 =item "pub" (B<OSSL_PKEY_PARAM_PUB_KEY>) <octet string>
61 =item "encoded-pub-key" (B<OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY>) <octet string>
/openssl/test/recipes/30-test_evp_pkey_provided/
H A DED25519.pub.txt2 pub:

Completed in 75 milliseconds

123