Home
last modified time | relevance | path

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

1234567

/freebsd/contrib/libfido2/tools/
H A Dtest.sh62 verify_cred "--" u2f u2f-cred u2f-pubkey
73 verify_cred "--" wrap wrap-cred wrap-pubkey
84 verify_cred "-h" wrap-hs wrap-hs-cred wrap-hs-pubkey
94 verify_cred "--" rk rk-cred rk-pubkey
104 ! verify_cred "--" rk-hs rk-hs-cred rk-hs-pubkey
117 verify_assert "--" u2f-pubkey u2f-assert
118 verify_assert "-p" u2f-pubkey u2f-assert
123 verify_assert "--" wrap-pubkey wrap-assert
125 verify_assert "--" wrap-pubkey wrap-assert
126 verify_assert "-v" wrap-pubkey wrap-assert
[all …]
/freebsd/crypto/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()
95 sizeof(ecx->pubkey), &pubkeylen)) in ossl_ecx_key_fromdata()
138 memcpy(ret->pubkey, key->pubkey, sizeof(ret->pubkey)); in ossl_ecx_key_dup()
164 unsigned char *privkey, *pubkey; in ossl_ecx_key_op() local
[all …]
H A Decx_meth.c41 penc = OPENSSL_memdup(ecxkey->pubkey, KEYLEN(pkey)); in ecx_pub_encode()
56 static int ecx_pub_decode(EVP_PKEY *pkey, const X509_PUBKEY *pubkey) in ecx_pub_decode() argument
64 if (!X509_PUBKEY_get0_param(NULL, &p, &pklen, &palg, pubkey)) in ecx_pub_decode()
83 return CRYPTO_memcmp(akey->pubkey, bkey->pubkey, KEYLEN(a)) == 0; in ecx_pub_cmp()
199 if (ASN1_buf_print(bp, ecxkey->pubkey, KEYLEN(pkey), in ecx_key_print()
235 *ppt = OPENSSL_memdup(pkey->pkey.ecx->pubkey, KEYLEN(pkey)); in ecx_ctrl()
334 memcpy(pub, key->pubkey, *len); in ecx_get_pub_key()
363 key->pubkey, key->keylen)) in ecx_pkey_export_to()
727 const unsigned char **pubkey) in validate_ecx_derive() argument
746 *pubkey = peerkey->pubkey; in validate_ecx_derive()
[all …]
/freebsd/crypto/openssl/crypto/x509/
H A Dx_pubkey.c87 X509_PUBKEY *pubkey; in x509_pubkey_ex_free() local
89 if (pval != NULL && (pubkey = (X509_PUBKEY *)*pval) != NULL) { in x509_pubkey_ex_free()
90 X509_ALGOR_free(pubkey->algor); in x509_pubkey_ex_free()
91 ASN1_BIT_STRING_free(pubkey->public_key); in x509_pubkey_ex_free()
92 EVP_PKEY_free(pubkey->pkey); in x509_pubkey_ex_free()
93 OPENSSL_free(pubkey->propq); in x509_pubkey_ex_free()
94 OPENSSL_free(pubkey); in x509_pubkey_ex_free()
101 X509_PUBKEY *pubkey = (X509_PUBKEY *)*pval; in x509_pubkey_ex_populate() local
103 return (pubkey->algor != NULL in x509_pubkey_ex_populate()
104 || (pubkey->algor = X509_ALGOR_new()) != NULL) in x509_pubkey_ex_populate()
[all …]
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 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()
/freebsd/crypto/libecc/src/wycheproof_tests/
H A Dlibecc_wycheproof_tests.h36 .pubkey = ecdsa_brainpoolp224r1_sha224_0_pubkey,
62 .pubkey = ecdsa_brainpoolp224r1_sha224_1_pubkey,
88 .pubkey = ecdsa_brainpoolp224r1_sha224_2_pubkey,
114 .pubkey = ecdsa_brainpoolp224r1_sha224_3_pubkey,
140 .pubkey = ecdsa_brainpoolp224r1_sha224_4_pubkey,
166 .pubkey = ecdsa_brainpoolp224r1_sha224_5_pubkey,
192 .pubkey = ecdsa_brainpoolp224r1_sha224_6_pubkey,
218 .pubkey = ecdsa_brainpoolp224r1_sha224_7_pubkey,
244 .pubkey = ecdsa_brainpoolp224r1_sha224_8_pubkey,
270 .pubkey = ecdsa_brainpoolp224r1_sha224_9_pubkey,
[all …]
/freebsd/crypto/openssh/regress/misc/fuzz-harness/
H A Dkex_fuzz.cc123 store_key(struct shared_state *st, struct sshkey *pubkey, in store_key() argument
126 if (st == NULL || pubkey->type < 0 || pubkey->type > INT_MAX || in store_key()
127 privkey->type != pubkey->type || in store_key()
128 ((size_t)pubkey->type < st->nkeys && in store_key()
129 st->pubkeys[pubkey->type] != NULL)) in store_key()
131 if ((size_t)pubkey->type >= st->nkeys) { in store_key()
133 st->nkeys, pubkey->type + 1, sizeof(*st->pubkeys)); in store_key()
138 debug_f("store %s at %d", sshkey_ssh_name(pubkey), pubkey->type); in store_key()
139 st->pubkeys[pubkey->type] = pubkey; in store_key()
178 struct sshkey *privkey = NULL, *pubkey = NULL; in do_kex_with_key() local
[all …]
H A Dauthkeys_fuzz.cc17 const char *pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDPQXmEVMVLmeFRyafKMVWgPDkv8/uRBTwmcEDatZ… variable
32 char *tmp, *o, *cp = (char *)malloc(size + 1 + strlen(pubkey) + 1); in LLVMFuzzerTestOneInput()
41 if ((o = tmp = strdup(pubkey)) == NULL || in LLVMFuzzerTestOneInput()
59 memcpy(cp + size + 1, pubkey, strlen(pubkey) + 1); in LLVMFuzzerTestOneInput()
/freebsd/contrib/unbound/validator/
H A Dval_secalgo.c1238 nss_setup_key_digest(int algo, SECKEYPublicKey** pubkey, HASH_HashType* htype, in nss_setup_key_digest() argument
1267 *pubkey = nss_buf2dsa(key, keylen); in nss_setup_key_digest()
1268 if(!*pubkey) { in nss_setup_key_digest()
1286 *pubkey = nss_buf2rsa(key, keylen); in nss_setup_key_digest()
1287 if(!*pubkey) { in nss_setup_key_digest()
1323 *pubkey = nss_buf2rsa(key, keylen); in nss_setup_key_digest()
1324 if(!*pubkey) { in nss_setup_key_digest()
1335 *pubkey = nss_buf2ecdsa(key, keylen, in nss_setup_key_digest()
1337 if(!*pubkey) { in nss_setup_key_digest()
1345 *pubkey = nss_buf2ecdsa(key, keylen, in nss_setup_key_digest()
[all …]
/freebsd/contrib/wpa/src/crypto/
H A Dcrypto_internal-modexp.c17 u8 *pubkey) in crypto_dh_init() argument
30 pubkey, &pubkey_len) < 0) in crypto_dh_init()
34 os_memmove(pubkey + pad, pubkey, pubkey_len); in crypto_dh_init()
35 os_memset(pubkey, 0, pad); in crypto_dh_init()
45 const u8 *pubkey, size_t pubkey_len, in crypto_dh_derive_secret() argument
53 os_memcmp(pubkey, prime, prime_len) >= 0)) in crypto_dh_derive_secret()
57 if (!pub || bignum_set_unsigned_bin(pub, pubkey, pubkey_len) < 0 || in crypto_dh_derive_secret()
81 res = crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len, in crypto_dh_derive_secret()
/freebsd/contrib/libfido2/regress/
H A Dcred.c293 const unsigned char pubkey[64] = {
1533 assert(fido_cred_pubkey_len(c) == sizeof(pubkey)); in valid_cred()
1534 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in valid_cred()
1557 assert(fido_cred_pubkey_len(c) == sizeof(pubkey)); in no_cdh()
1558 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in no_cdh()
1581 assert(fido_cred_pubkey_len(c) == sizeof(pubkey)); in no_rp_id()
1582 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) in no_rp_id()
291 const unsigned char pubkey[64] = { global() variable
[all...]
/freebsd/crypto/openssl/providers/implementations/keymgmt/
H A Decx_kmgmt.c158 const unsigned char *pa = key1->haspubkey ? key1->pubkey : NULL; in ecx_match()
159 const unsigned char *pb = key2->haspubkey ? key2->pubkey : NULL; in ecx_match()
217 key->pubkey, key->keylen)) in key_to_params()
299 if (!OSSL_PARAM_set_octet_string(p, ecx->pubkey, ecx->keylen)) in ecx_get_params()
405 void *buf = ecxkey->pubkey; in ecx_set_params()
408 || !OSSL_PARAM_get_octet_string(p, &buf, sizeof(ecxkey->pubkey), in ecx_set_params()
607 ossl_x25519_public_from_private(key->pubkey, privkey); in ecx_gen()
612 ossl_x448_public_from_private(key->pubkey, privkey); in ecx_gen()
615 if (!ossl_ed25519_public_from_private(gctx->libctx, key->pubkey, privkey, in ecx_gen()
620 if (!ossl_ed448_public_from_private(gctx->libctx, key->pubkey, privkey, in ecx_gen()
[all …]
/freebsd/contrib/wpa/src/wps/
H A Dwps_attr_build.c23 struct wpabuf *pubkey = NULL; in wps_build_public_key() local
39 pubkey = wpabuf_dup(wps->wps->dh_pubkey); in wps_build_public_key()
62 pubkey = wpabuf_dup(wps->wps->ap_nfc_dh_pubkey); in wps_build_public_key()
63 if (wps->dh_privkey && pubkey) in wps_build_public_key()
64 wps->dh_ctx = dh5_init_fixed(wps->dh_privkey, pubkey); in wps_build_public_key()
69 wps->dh_ctx = dh5_init(&wps->dh_privkey, &pubkey); in wps_build_public_key()
70 pubkey = wpabuf_zeropad(pubkey, 192); in wps_build_public_key()
72 if (wps->dh_ctx == NULL || wps->dh_privkey == NULL || pubkey == NULL) { in wps_build_public_key()
75 wpabuf_free(pubkey); in wps_build_public_key()
79 wpa_hexdump_buf(MSG_DEBUG, "WPS: DH own Public Key", pubkey); in wps_build_public_key()
[all …]
/freebsd/contrib/wireguard-tools/
H A Dsetconf.c17 uint8_t *pubkey; member
24 int ret = memcmp(a->pubkey, b->pubkey, WG_KEY_LEN); in pubkey_cmp()
66 pubkeys[i].pubkey = peer->public_key; in sync_conf()
71 pubkeys[i].pubkey = peer->public_key; in sync_conf()
80 …r_count - 1 || !pubkeys[i + 1].from_file || memcmp(pubkeys[i].pubkey, pubkeys[i + 1].pubkey, WG_KE… in sync_conf()
89 memcpy(peer->public_key, pubkeys[i].pubkey, WG_KEY_LEN); in sync_conf()
/freebsd/crypto/openssh/regress/
H A Dsshsig.sh50 pubkey=${OBJ}/${keybase}.pub
68 (printf "$sig_principal " ; cat $pubkey) > $OBJ/allowed_signers
78 cat $pubkey) > $OBJ/allowed_signers
86 cat $pubkey) > $OBJ/allowed_signers
89 -O print-pubkey \
98 (printf "$sig_principal octopus " ; cat $pubkey) > $OBJ/allowed_signers
114 (printf "$sig_principal " ; cat $pubkey) > $OBJ/allowed_signers
122 (printf "josef.k@example.com " ; cat $pubkey) > $OBJ/allowed_signers
130 (printf "$sig_principal " ; cat $pubkey) > $OBJ/allowed_signers
139 cat $pubkey) > $OBJ/allowed_signers
[all …]
/freebsd/crypto/openssl/crypto/cms/
H A Dcms_dh.c20 X509_ALGOR *alg, ASN1_BIT_STRING *pubkey) in dh_cms_set_peerkey() argument
45 plen = ASN1_STRING_length(pubkey); in dh_cms_set_peerkey()
46 p = ASN1_STRING_get0_data(pubkey); in dh_cms_set_peerkey()
170 ASN1_BIT_STRING *pubkey; in dh_cms_decrypt() local
172 if (!CMS_RecipientInfo_kari_get0_orig_id(ri, &alg, &pubkey, in dh_cms_decrypt()
175 if (alg == NULL || pubkey == NULL) in dh_cms_decrypt()
177 if (!dh_cms_set_peerkey(pctx, alg, pubkey)) { in dh_cms_decrypt()
198 ASN1_BIT_STRING *pubkey; in dh_cms_encrypt() local
213 if (!CMS_RecipientInfo_kari_get0_orig_id(ri, &talg, &pubkey, in dh_cms_encrypt()
236 ASN1_STRING_set0(pubkey, penc, penclen); in dh_cms_encrypt()
[all …]
H A Dcms_ec.c73 X509_ALGOR *alg, ASN1_BIT_STRING *pubkey) in ecdh_cms_set_peerkey() argument
108 plen = ASN1_STRING_length(pubkey); in ecdh_cms_set_peerkey()
109 p = ASN1_STRING_get0_data(pubkey); in ecdh_cms_set_peerkey()
229 ASN1_BIT_STRING *pubkey; in ecdh_cms_decrypt() local
231 if (!CMS_RecipientInfo_kari_get0_orig_id(ri, &alg, &pubkey, in ecdh_cms_decrypt()
234 if (alg == NULL || pubkey == NULL) in ecdh_cms_decrypt()
236 if (!ecdh_cms_set_peerkey(pctx, alg, pubkey)) { in ecdh_cms_decrypt()
257 ASN1_BIT_STRING *pubkey; in ecdh_cms_encrypt() local
271 if (!CMS_RecipientInfo_kari_get0_orig_id(ri, &talg, &pubkey, in ecdh_cms_encrypt()
283 ASN1_STRING_set0(pubkey, penc, (int)enckeylen); in ecdh_cms_encrypt()
[all …]
/freebsd/crypto/openssl/test/
H A Dtls-provider.c45 unsigned char pubkey[XOR_KEY_SIZE]; member
286 secret[i] = pxorctx->key->privkey[i] ^ pxorctx->peerkey->pubkey[i]; in xor_freectx()
342 * 2. we encode our ephemeral pubkey as the outgoing ct in xor_encapsulate()
344 * pubkey from the ctx; the result is our ss. in xor_encapsulate()
371 /* 2. Encode ephemeral pubkey as ct */ in xor_encapsulate()
372 memcpy(ct, ourkey->pubkey, XOR_KEY_SIZE); in xor_encapsulate()
399 * - ct is our peer's pubkey in xor_decapsulate()
420 memcpy(peerkey->pubkey, ct, XOR_KEY_SIZE); in xor_decapsulate()
497 memcpy(tokey->pubkey, fromkey->pubkey, XOR_KEY_SIZ in xor_dup()
663 unsigned char pubkey[XOR_KEY_SIZE]; xor_import() local
[all...]
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()
/freebsd/crypto/libecc/scripts/
H A Dexpand_libecc.py288 def __init__(self, pubkey, privkey): argument
289 self.pubkey = pubkey
317 pubkey = fromprivkey(privkey, is_eckcdsa)
318 return KeyPair(pubkey, privkey)
538 pubkey = keypair.pubkey
540 p = pubkey.curve.p
541 q = pubkey.curve.q
542 gx = pubkey.curve.gx
543 gy = pubkey.curve.gy
545 G = Point(pubkey.curve, gx, gy)
[all …]
/freebsd/crypto/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.c113 uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in ossl_c448_ed448_derive_public_key()
148 ossl_curve448_point_mul_by_ratio_and_encode_like_eddsa(pubkey, p); in ossl_c448_ed448_derive_public_key()
162 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in ossl_c448_ed448_sign()
238 || !EVP_DigestUpdate(hashctx, pubkey, EDDSA_448_PUBLIC_BYTES) in ossl_c448_ed448_sign()
271 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in ossl_c448_ed448_sign_prehash()
275 return ossl_c448_ed448_sign(ctx, signature, privkey, pubkey, hash, 64, 1, in ossl_c448_ed448_sign_prehash()
283 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in ossl_c448_ed448_verify()
318 ossl_curve448_point_decode_like_eddsa_and_mul_by_ratio(pk_point, pubkey); in ossl_c448_ed448_verify()
337 || !EVP_DigestUpdate(hashctx, pubkey, EDDSA_448_PUBLIC_BYTES) in ossl_c448_ed448_verify()
367 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in ossl_c448_ed448_verify_prehash()
[all …]
/freebsd/crypto/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,
/freebsd/crypto/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()

1234567