Home
last modified time | relevance | path

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

123456

/freebsd-14.2/contrib/libfido2/tools/
H A Dtest.sh62 verify_cred "--" u2f u2f-cred u2f-pubkey
73 verify_cred "--" wrap wrap-cred wrap-pubkey
94 verify_cred "--" rk rk-cred rk-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
128 verify_assert "--" wrap-pubkey wrap-assert
130 verify_assert "-p" wrap-pubkey wrap-assert
[all …]
/freebsd-14.2/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()
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
195 pubkey = key->pubkey; in ossl_ecx_key_op()
[all …]
H A Decx_meth.c83 return CRYPTO_memcmp(akey->pubkey, bkey->pubkey, KEYLEN(a)) == 0; in ecx_pub_cmp()
334 memcpy(pub, key->pubkey, *len); in ecx_get_pub_key()
746 *pubkey = peerkey->pubkey; in validate_ecx_derive()
754 const unsigned char *privkey, *pubkey; in pkey_ecx_derive25519() local
767 const unsigned char *privkey, *pubkey; in pkey_ecx_derive448() local
952 pubkey = key->pubkey; in s390x_pkey_ecx_keygen25519()
995 pubkey = key->pubkey; in s390x_pkey_ecx_keygen448()
1044 pubkey = key->pubkey; in s390x_pkey_ecd_keygen25519()
1068 if (s390x_ed25519_mul(x_dst, pubkey, in s390x_pkey_ecd_keygen25519()
1110 pubkey = key->pubkey; in s390x_pkey_ecd_keygen448()
[all …]
/freebsd-14.2/crypto/openssl/crypto/x509/
H A Dx_pubkey.c87 X509_PUBKEY *pubkey; in x509_pubkey_ex_free() local
94 OPENSSL_free(pubkey); in x509_pubkey_ex_free()
136 X509_PUBKEY *pubkey; in x509_pubkey_ex_d2i_ex() local
162 pubkey->pkey = NULL; in x509_pubkey_ex_d2i_ex()
175 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()
305 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()
/freebsd-14.2/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-14.2/contrib/unbound/validator/
H A Dval_secalgo.c1268 if(!*pubkey) { in nss_setup_key_digest()
1287 if(!*pubkey) { in nss_setup_key_digest()
1324 if(!*pubkey) { in nss_setup_key_digest()
1337 if(!*pubkey) { in nss_setup_key_digest()
1347 if(!*pubkey) { in nss_setup_key_digest()
1387 SECKEYPublicKey* pubkey = NULL; in verify_canonrrset() local
1457 SECKEY_DestroyPublicKey(pubkey); in verify_canonrrset()
1762 struct dsa_public_key pubkey; in _verify_nettle_dsa() local
1849 struct rsa_public_key pubkey; in _verify_nettle_rsa() local
1879 nettle_mpz_set_str_256_u(pubkey.n, pubkey.size, &key[mod_offset]); in _verify_nettle_rsa()
[all …]
/freebsd-14.2/crypto/openssh/regress/misc/fuzz-harness/
H A Dkex_fuzz.cc126 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()
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()
194 pubkey = get_pubkey(st, keytype); in do_kex_with_key()
292 if ((r = sshkey_read(pubkey, &cp)) != 0) { in prepare_key()
298 store_key(st, pubkey, privkey); in prepare_key()
[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-14.2/contrib/libfido2/regress/
H A Dcred.c1534 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in valid_cred()
1558 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in no_cdh()
1582 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in no_rp_id()
1607 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in no_rp_name()
1660 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in no_x509()
1684 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in no_sig()
1708 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in no_fmt()
1733 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in wrong_options()
1764 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in junk_cdh()
1809 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in junk_rp_id()
[all …]
/freebsd-14.2/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-14.2/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()
63 if (wps->dh_privkey && pubkey) in wps_build_public_key()
70 pubkey = wpabuf_zeropad(pubkey, 192); in wps_build_public_key()
75 wpabuf_free(pubkey); in wps_build_public_key()
82 wpabuf_put_be16(msg, wpabuf_len(pubkey)); in wps_build_public_key()
83 wpabuf_put_buf(msg, pubkey); in wps_build_public_key()
87 wps->dh_pubkey_r = pubkey; in wps_build_public_key()
90 wps->dh_pubkey_e = pubkey; in wps_build_public_key()
433 addr[0] = wpabuf_head(pubkey); in wps_build_oob_dev_pw()
[all …]
/freebsd-14.2/crypto/openssl/providers/implementations/keymgmt/
H A Decx_kmgmt.c405 void *buf = ecxkey->pubkey; in ecx_set_params()
840 unsigned char *privkey = NULL, *pubkey; in MAKE_KEYMGMT_FUNCTIONS() local
851 pubkey = key->pubkey; in MAKE_KEYMGMT_FUNCTIONS()
886 unsigned char *privkey = NULL, *pubkey; in s390x_ecx_keygen448() local
897 pubkey = key->pubkey; in s390x_ecx_keygen448()
935 unsigned char *privkey = NULL, *pubkey; in s390x_ecd_keygen25519() local
949 pubkey = key->pubkey; in s390x_ecd_keygen25519()
972 if (s390x_ed25519_mul(x_dst, pubkey, in s390x_ecd_keygen25519()
976 pubkey[31] |= ((x_dst[0] & 0x01) << 7); in s390x_ecd_keygen25519()
1016 pubkey = key->pubkey; in s390x_ecd_keygen448()
[all …]
/freebsd-14.2/crypto/openssh/regress/
H A Dsshsig.sh50 pubkey=${OBJ}/${keybase}.pub
78 cat $pubkey) > $OBJ/allowed_signers
86 cat $pubkey) > $OBJ/allowed_signers
89 -O print-pubkey \
139 cat $pubkey) > $OBJ/allowed_signers
147 cat $pubkey) > $OBJ/allowed_signers
203 cat $pubkey > $OBJ/revoked_keys
205 cat $pubkey) > $OBJ/allowed_signers
284 cat $pubkey;
513 printf "princi* " ; cat $pubkey;
[all …]
/freebsd-14.2/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
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()
237 pubkey->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07); in dh_cms_encrypt()
[all …]
H A Dcms_ec.c108 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()
284 pubkey->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07); in ecdh_cms_encrypt()
[all …]
/freebsd-14.2/crypto/openssl/test/
H A Dtls-provider.c45 unsigned char pubkey[XOR_KEY_SIZE]; member
372 memcpy(ct, ourkey->pubkey, XOR_KEY_SIZE); in xor_encapsulate()
420 memcpy(peerkey->pubkey, ct, XOR_KEY_SIZE); in xor_decapsulate()
497 memcpy(tokey->pubkey, fromkey->pubkey, XOR_KEY_SIZE); in xor_dup()
538 memcpy(p->data, key->pubkey, XOR_KEY_SIZE); in xor_get_params()
566 memcpy(key->pubkey, p->data, XOR_KEY_SIZE); in xor_set_params()
669 unsigned char pubkey[XOR_KEY_SIZE]; in xor_import() local
670 void *pprivkey = privkey, *ppubkey = pubkey; in xor_import()
678 memset(pubkey, 0, sizeof(pubkey)); in xor_import()
695 memcpy(key->pubkey, pubkey, pub_len); in xor_import()
[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-14.2/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-14.2/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-14.2/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()
/freebsd-14.2/sbin/dumpon/
H A Ddumpon.c234 RSA *pubkey; in _genkey() local
240 pubkey = NULL; in _genkey()
261 pubkey = RSA_new(); in _genkey()
262 if (pubkey == NULL) { in _genkey()
267 pubkey = PEM_read_RSA_PUBKEY(fp, &pubkey, NULL, NULL); in _genkey()
270 if (pubkey == NULL) in _genkey()
290 if (RSA_security_bits(pubkey) < 112) in _genkey()
292 if (RSA_size(pubkey) * 8 < 2048) in _genkey()
296 RSA_size(pubkey) * 8); in _genkey()
320 kdap->kda_encryptedkey, pubkey, in _genkey()
[all …]
/freebsd-14.2/crypto/openssl/crypto/dh/
H A Ddh_key.c387 BIGNUM *pubkey = NULL; in ossl_dh_buf2key() local
391 if ((pubkey = BN_bin2bn(buf, len, NULL)) == NULL) in ossl_dh_buf2key()
399 if (!ossl_dh_check_pub_key_partial(dh, pubkey, &ret)) { in ossl_dh_buf2key()
403 if (DH_set0_key(dh, pubkey, NULL) != 1) in ossl_dh_buf2key()
408 BN_free(pubkey); in ossl_dh_buf2key()
415 const BIGNUM *pubkey; in ossl_dh_key2buf() local
421 DH_get0_key(dh, &pubkey, NULL); in ossl_dh_key2buf()
422 if (p == NULL || pubkey == NULL in ossl_dh_key2buf()
424 || BN_num_bytes(pubkey) == 0) { in ossl_dh_key2buf()
444 if (BN_bn2binpad(pubkey, pbuf, p_size) < 0) { in ossl_dh_key2buf()

123456