Home
last modified time | relevance | path

Searched refs:pubkey (Results 1 – 25 of 87) sorted by relevance

1234

/openssl/crypto/ec/
H A Decx_backend.c32 ossl_x25519_public_from_private(key->pubkey, key->privkey); in ossl_ecx_public_from_private()
35 if (!ossl_ed25519_public_from_private(key->libctx, key->pubkey, in ossl_ecx_public_from_private()
42 ossl_x448_public_from_private(key->pubkey, key->privkey); in ossl_ecx_public_from_private()
45 if (!ossl_ed448_public_from_private(key->libctx, key->pubkey, in ossl_ecx_public_from_private()
60 unsigned char *pubkey; in ossl_ecx_key_fromdata() local
91 pubkey = ecx->pubkey; in ossl_ecx_key_fromdata()
94 (void **)&pubkey, in ossl_ecx_key_fromdata()
132 memcpy(ret->pubkey, key->pubkey, sizeof(ret->pubkey)); in ossl_ecx_key_dup()
160 unsigned char *privkey, *pubkey; in ossl_ecx_key_op() local
191 pubkey = key->pubkey; in ossl_ecx_key_op()
[all …]
H A Decx_meth.c81 return CRYPTO_memcmp(akey->pubkey, bkey->pubkey, KEYLEN(a)) == 0; in ecx_pub_cmp()
332 memcpy(pub, key->pubkey, *len); in ecx_get_pub_key()
745 *pubkey = peerkey->pubkey; in validate_ecx_derive()
753 const unsigned char *privkey, *pubkey; in pkey_ecx_derive25519() local
766 const unsigned char *privkey, *pubkey; in pkey_ecx_derive448() local
955 pubkey = key->pubkey; in s390x_pkey_ecx_keygen25519()
998 pubkey = key->pubkey; in s390x_pkey_ecx_keygen448()
1047 pubkey = key->pubkey; in s390x_pkey_ecd_keygen25519()
1071 if (s390x_ed25519_mul(x_dst, pubkey, in s390x_pkey_ecd_keygen25519()
1113 pubkey = key->pubkey; in s390x_pkey_ecd_keygen448()
[all …]
H A Decx_key.c136 if (s390x_x25519_mul(secret, peer->pubkey, priv->privkey) == 0) { in ossl_ecx_compute_key()
142 if (ossl_x25519(secret, priv->privkey, peer->pubkey) == 0) { in ossl_ecx_compute_key()
150 if (s390x_x448_mul(secret, peer->pubkey, priv->privkey) == 0) { in ossl_ecx_compute_key()
156 if (ossl_x448(secret, priv->privkey, peer->pubkey) == 0) { in ossl_ecx_compute_key()
/openssl/crypto/x509/
H A Dx_pubkey.c88 X509_PUBKEY *pubkey; in x509_pubkey_ex_free() local
95 OPENSSL_free(pubkey); in x509_pubkey_ex_free()
138 X509_PUBKEY *pubkey; in x509_pubkey_ex_d2i_ex() local
164 pubkey->pkey = NULL; in x509_pubkey_ex_d2i_ex()
177 if ((ret = x509_pubkey_decode(&pubkey->pkey, pubkey)) == -1) { in x509_pubkey_ex_d2i_ex()
274 pubkey = NULL; in IMPLEMENT_EXTERN_ASN1()
276 return pubkey; in IMPLEMENT_EXTERN_ASN1()
285 X509_PUBKEY *pubkey = OPENSSL_zalloc(sizeof(*pubkey)); in X509_PUBKEY_dup() local
287 if (pubkey == NULL) in X509_PUBKEY_dup()
311 if (x509_pubkey_decode(&pubkey->pkey, pubkey) <= 0) { in X509_PUBKEY_dup()
[all …]
H A Dx509_r2x.c25 EVP_PKEY *pubkey = NULL; in X509_REQ_to_X509() local
56 pubkey = X509_REQ_get0_pubkey(r); in X509_REQ_to_X509()
57 if (pubkey == NULL || !X509_set_pubkey(ret, pubkey)) in X509_REQ_to_X509()
H A Dv3_skid.c55 ASN1_OCTET_STRING *ossl_x509_pubkey_hash(X509_PUBKEY *pubkey) in ossl_x509_pubkey_hash() argument
66 if (pubkey == NULL) { in ossl_x509_pubkey_hash()
70 if (!ossl_x509_PUBKEY_get0_libctx(&libctx, &propq, pubkey)) in ossl_x509_pubkey_hash()
79 X509_PUBKEY_get0_param(NULL, &pk, &pklen, NULL, pubkey); in ossl_x509_pubkey_hash()
110 ctx->subject_req->req_info.pubkey); in s2i_skey_id()
H A Dx_req.c71 if (old->req_info.pubkey != NULL) { in req_cb()
72 EVP_PKEY *pkey = X509_PUBKEY_get0(old->req_info.pubkey); in req_cb()
80 if (!X509_PUBKEY_set(&ret->req_info.pubkey, pkey)) { in req_cb()
112 ASN1_SIMPLE(X509_REQ_INFO, pubkey, X509_PUBKEY),
H A Dv3_akid.c184 X509_PUBKEY *pubkey = NULL; in v2i_AUTHORITY_KEYID() local
186 if (X509_PUBKEY_set(&pubkey, ctx->issuer_pkey)) in v2i_AUTHORITY_KEYID()
187 ikeyid = ossl_x509_pubkey_hash(pubkey); in v2i_AUTHORITY_KEYID()
188 X509_PUBKEY_free(pubkey); in v2i_AUTHORITY_KEYID()
H A Dx509spki.c18 return X509_PUBKEY_set(&(x->spkac->pubkey), pkey); in NETSCAPE_SPKI_set_pubkey()
25 return X509_PUBKEY_get(x->spkac->pubkey); in NETSCAPE_SPKI_get_pubkey()
/openssl/providers/implementations/keymgmt/
H A Decx_kmgmt.c419 void *buf = ecxkey->pubkey; in ecx_set_params()
1037 unsigned char *privkey = NULL, *pubkey; in MAKE_KEYMGMT_FUNCTIONS() local
1048 pubkey = key->pubkey; in MAKE_KEYMGMT_FUNCTIONS()
1094 unsigned char *privkey = NULL, *pubkey; in s390x_ecx_keygen448() local
1105 pubkey = key->pubkey; in s390x_ecx_keygen448()
1154 unsigned char *privkey = NULL, *pubkey; in s390x_ecd_keygen25519() local
1168 pubkey = key->pubkey; in s390x_ecd_keygen25519()
1191 if (s390x_ed25519_mul(x_dst, pubkey, in s390x_ecd_keygen25519()
1195 pubkey[31] |= ((x_dst[0] & 0x01) << 7); in s390x_ecd_keygen25519()
1235 pubkey = key->pubkey; in s390x_ecd_keygen448()
[all …]
/openssl/crypto/ec/curve448/
H A Ded448.h43 uint8_t pubkey [EDDSA_448_PUBLIC_BYTES],
68 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES],
94 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES],
123 pubkey[EDDSA_448_PUBLIC_BYTES],
150 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES],
H A Deddsa.c109 uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in ossl_c448_ed448_derive_public_key()
144 ossl_curve448_point_mul_by_ratio_and_encode_like_eddsa(pubkey, p); in ossl_c448_ed448_derive_public_key()
158 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in ossl_c448_ed448_sign()
234 || !EVP_DigestUpdate(hashctx, pubkey, EDDSA_448_PUBLIC_BYTES) in ossl_c448_ed448_sign()
267 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in ossl_c448_ed448_sign_prehash()
271 return ossl_c448_ed448_sign(ctx, signature, privkey, pubkey, hash, 64, 1, in ossl_c448_ed448_sign_prehash()
290 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in ossl_c448_ed448_verify()
325 ossl_curve448_point_decode_like_eddsa_and_mul_by_ratio(pk_point, pubkey); in ossl_c448_ed448_verify()
344 || !EVP_DigestUpdate(hashctx, pubkey, EDDSA_448_PUBLIC_BYTES) in ossl_c448_ed448_verify()
374 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in ossl_c448_ed448_verify_prehash()
[all …]
/openssl/crypto/cms/
H A Dcms_dh.c21 X509_ALGOR *alg, ASN1_BIT_STRING *pubkey) in dh_cms_set_peerkey() argument
46 plen = ASN1_STRING_length(pubkey); in dh_cms_set_peerkey()
47 p = ASN1_STRING_get0_data(pubkey); in dh_cms_set_peerkey()
171 ASN1_BIT_STRING *pubkey; in dh_cms_decrypt() local
173 if (!CMS_RecipientInfo_kari_get0_orig_id(ri, &alg, &pubkey, in dh_cms_decrypt()
176 if (alg == NULL || pubkey == NULL) in dh_cms_decrypt()
178 if (!dh_cms_set_peerkey(pctx, alg, pubkey)) { in dh_cms_decrypt()
199 ASN1_BIT_STRING *pubkey; in dh_cms_encrypt() local
214 if (!CMS_RecipientInfo_kari_get0_orig_id(ri, &talg, &pubkey, in dh_cms_encrypt()
237 ASN1_STRING_set0(pubkey, penc, penclen); in dh_cms_encrypt()
[all …]
H A Dcms_ec.c74 X509_ALGOR *alg, ASN1_BIT_STRING *pubkey) in ecdh_cms_set_peerkey() argument
109 plen = ASN1_STRING_length(pubkey); in ecdh_cms_set_peerkey()
110 p = ASN1_STRING_get0_data(pubkey); in ecdh_cms_set_peerkey()
230 ASN1_BIT_STRING *pubkey; in ecdh_cms_decrypt() local
232 if (!CMS_RecipientInfo_kari_get0_orig_id(ri, &alg, &pubkey, in ecdh_cms_decrypt()
235 if (alg == NULL || pubkey == NULL) in ecdh_cms_decrypt()
237 if (!ecdh_cms_set_peerkey(pctx, alg, pubkey)) { in ecdh_cms_decrypt()
258 ASN1_BIT_STRING *pubkey; in ecdh_cms_encrypt() local
272 if (!CMS_RecipientInfo_kari_get0_orig_id(ri, &talg, &pubkey, in ecdh_cms_encrypt()
284 ASN1_STRING_set0(pubkey, penc, (int)enckeylen); in ecdh_cms_encrypt()
[all …]
/openssl/test/
H A Dx509_test.c20 static EVP_PKEY *pubkey = NULL; variable
100 && TEST_int_eq(X509_verify(x, pubkey), 1); in test_x509_tbs_cache()
118 && TEST_int_eq(X509_CRL_verify(crl, pubkey), 1); in test_x509_crl_tbs_cache()
193 pubkey = d2i_PUBKEY(NULL, &p, sizeof(pubkeydata)); in setup_tests()
198 if (pubkey == NULL || privkey == NULL) { in setup_tests()
219 EVP_PKEY_free(pubkey); in cleanup_tests()
H A Dalgorithmid_test.c23 static int test_spki_aid(X509_PUBKEY *pubkey, const char *filename) in test_spki_aid() argument
43 if (!TEST_true(X509_PUBKEY_get0_param(NULL, NULL, NULL, &alg, pubkey)) in test_spki_aid()
44 || !TEST_ptr(pkey = X509_PUBKEY_get0(pubkey))) in test_spki_aid()
105 X509_PUBKEY *pubkey = X509_get_X509_PUBKEY(cert); in test_x509_spki_aid() local
107 return test_spki_aid(pubkey, filename); in test_x509_spki_aid()
190 X509_PUBKEY *pubkey = NULL; in test_spki_file() local
200 if ((pubkey = PEM_read_bio_X509_PUBKEY(b, NULL, NULL, NULL)) == NULL) { in test_spki_file()
207 ret = test_spki_aid(pubkey, pubkey_filename); in test_spki_file()
210 X509_PUBKEY_free(pubkey); in test_spki_file()
H A Denginetest.c362 X509_PUBKEY *pubkey, *duppubkey = NULL; in test_x509_dup_w_engine() local
377 if (!TEST_ptr(pubkey = X509_get_X509_PUBKEY(cert)) in test_x509_dup_w_engine()
378 || !TEST_ptr(duppubkey = X509_PUBKEY_dup(pubkey)) in test_x509_dup_w_engine()
379 || !TEST_ptr_ne(duppubkey, pubkey) in test_x509_dup_w_engine()
380 || !TEST_ptr_ne(X509_PUBKEY_get0(duppubkey), X509_PUBKEY_get0(pubkey))) in test_x509_dup_w_engine()
411 if (!TEST_ptr(pubkey = X509_get_X509_PUBKEY(cert)) in test_x509_dup_w_engine()
412 || !TEST_ptr(duppubkey = X509_PUBKEY_dup(pubkey)) in test_x509_dup_w_engine()
413 || !TEST_ptr_ne(duppubkey, pubkey) in test_x509_dup_w_engine()
414 || !TEST_ptr_ne(X509_PUBKEY_get0(duppubkey), X509_PUBKEY_get0(pubkey))) in test_x509_dup_w_engine()
H A Devp_pkey_dparams_test.c30 struct pubkey { struct
218 struct pubkey keys[NUM_KEYS];
279 const struct pubkey *keys = pkey_params[id].keys; in set_enc_pubkey_test()
/openssl/test/recipes/
H A D20-test_dgst.t25 my $pubkey = shift;
43 ok(run(app(['openssl', 'dgst', '-verify', $pubkey,
48 ok(!run(app(['openssl', 'dgst', '-verify', $pubkey,
57 my $pubkey = shift;
70 ok(run(app(['openssl', 'sha512', '-verify', $pubkey,
80 ok(run(app(['openssl', 'dgst', '-sha512', '-verify', $pubkey,
85 ok(!run(app(['openssl', 'dgst', '-sha512', '-verify', $pubkey,
H A D20-test_pkeyutl.t102 my $pubkey = shift;
139 '-inkey', $pubkey, '-pubin',
147 '-inkey', $pubkey, '-pubin',
/openssl/providers/implementations/encode_decode/
H A Dencode_key2blob.c92 unsigned char *pubkey = NULL; in key2blob_encode() local
94 pubkey_len = i2o_ECPublicKey(key, &pubkey); in key2blob_encode()
95 if (pubkey_len > 0 && pubkey != NULL) in key2blob_encode()
96 ok = write_blob(vctx, cout, pubkey, pubkey_len); in key2blob_encode()
97 OPENSSL_free(pubkey); in key2blob_encode()
/openssl/crypto/dh/
H A Ddh_key.c391 BIGNUM *pubkey = NULL; in ossl_dh_buf2key() local
395 if ((pubkey = BN_bin2bn(buf, len, NULL)) == NULL) in ossl_dh_buf2key()
403 if (!ossl_dh_check_pub_key_partial(dh, pubkey, &ret)) { in ossl_dh_buf2key()
407 if (DH_set0_key(dh, pubkey, NULL) != 1) in ossl_dh_buf2key()
412 BN_free(pubkey); in ossl_dh_buf2key()
419 const BIGNUM *pubkey; in ossl_dh_key2buf() local
425 DH_get0_key(dh, &pubkey, NULL); in ossl_dh_key2buf()
426 if (p == NULL || pubkey == NULL in ossl_dh_key2buf()
428 || BN_num_bytes(pubkey) == 0) { in ossl_dh_key2buf()
449 if (BN_bn2binpad(pubkey, pbuf, p_size) < 0) { in ossl_dh_key2buf()
/openssl/apps/lib/
H A Dengine_loader.c118 EVP_PKEY *pkey = NULL, *pubkey = NULL; in engine_load() local
130 pubkey = in engine_load()
139 if (pubkey != NULL) in engine_load()
140 info = OSSL_STORE_INFO_new_PUBKEY(pubkey); in engine_load()
145 EVP_PKEY_free(pubkey); in engine_load()
/openssl/crypto/ct/
H A Dct_sct_ctx.c250 int SCT_CTX_set1_issuer_pubkey(SCT_CTX *sctx, X509_PUBKEY *pubkey) in SCT_CTX_set1_issuer_pubkey() argument
252 return ct_public_key_hash(sctx, pubkey, &sctx->ihash, &sctx->ihashlen); in SCT_CTX_set1_issuer_pubkey()
255 int SCT_CTX_set1_pubkey(SCT_CTX *sctx, X509_PUBKEY *pubkey) in SCT_CTX_set1_pubkey() argument
257 EVP_PKEY *pkey = X509_PUBKEY_get(pubkey); in SCT_CTX_set1_pubkey()
262 if (!ct_public_key_hash(sctx, pubkey, &sctx->pkeyhash, &sctx->pkeyhashlen)) { in SCT_CTX_set1_pubkey()
/openssl/crypto/asn1/
H A Dt_spki.c28 X509_PUBKEY_get0_param(&spkioid, NULL, NULL, NULL, spki->spkac->pubkey); in NETSCAPE_SPKI_print()
32 pkey = X509_PUBKEY_get(spki->spkac->pubkey); in NETSCAPE_SPKI_print()

Completed in 85 milliseconds

1234