| /freebsd-13.1/contrib/libfido2/tools/ |
| H A D | test.sh | 57 verify_cred "--" u2f u2f-cred u2f-pubkey 67 verify_cred "--" wrap wrap-cred wrap-pubkey 88 verify_cred "--" rk rk-cred rk-pubkey 110 verify_assert "--" u2f-pubkey u2f-assert 111 verify_assert "-p" u2f-pubkey u2f-assert 115 verify_assert "--" wrap-pubkey wrap-assert 117 verify_assert "--" wrap-pubkey wrap-assert 118 verify_assert "-v" wrap-pubkey wrap-assert 120 verify_assert "--" wrap-pubkey wrap-assert 122 verify_assert "-p" wrap-pubkey wrap-assert [all …]
|
| /freebsd-13.1/crypto/openssl/crypto/ec/ |
| H A D | ecx_meth.c | 50 unsigned char *privkey, *pubkey; in ecx_key_op() local 75 pubkey = key->pubkey; in ecx_key_op() 78 memcpy(pubkey, p, plen); in ecx_key_op() 110 X448_public_from_private(pubkey, privkey); in ecx_key_op() 113 ED448_public_from_private(pubkey, privkey); in ecx_key_op() 170 return CRYPTO_memcmp(akey->pubkey, bkey->pubkey, KEYLEN(a)) == 0; in ecx_pub_cmp() 404 memcpy(pub, key->pubkey, *len); in ecx_get_pub_key() 679 *pubkey = peerkey->pubkey; in validate_ecx_derive() 687 const unsigned char *privkey, *pubkey; in pkey_ecx_derive25519() local 700 const unsigned char *privkey, *pubkey; in pkey_ecx_derive448() local [all …]
|
| H A D | ec_ameth.c | 153 static int eckey_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey) in eckey_pub_decode() argument 161 if (!X509_PUBKEY_get0_param(NULL, &p, &pklen, &palg, pubkey)) in eckey_pub_decode() 684 plen = ASN1_STRING_length(pubkey); in ecdh_cms_set_peerkey() 685 p = ASN1_STRING_get0_data(pubkey); in ecdh_cms_set_peerkey() 804 ASN1_BIT_STRING *pubkey; in ecdh_cms_decrypt() local 808 if (!alg || !pubkey) in ecdh_cms_decrypt() 810 if (!ecdh_cms_set_peerkey(pctx, alg, pubkey)) { in ecdh_cms_decrypt() 831 ASN1_BIT_STRING *pubkey; in ecdh_cms_encrypt() local 865 ASN1_STRING_set0(pubkey, penc, penclen); in ecdh_cms_encrypt() 866 pubkey->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07); in ecdh_cms_encrypt() [all …]
|
| /freebsd-13.1/crypto/openssh/regress/ |
| H A D | sshsig.sh | 49 pubkey=${OBJ}/${keybase}.pub 61 cat $pubkey) > $OBJ/allowed_signers 68 cat $pubkey) > $OBJ/allowed_signers 71 -O print-pubkey \ 115 cat $pubkey) > $OBJ/allowed_signers 123 cat $pubkey) > $OBJ/allowed_signers 150 cat $pubkey > $OBJ/revoked_keys 152 cat $pubkey) > $OBJ/allowed_signers 185 ${SSHKEYGEN} -vvv -Y sign -f $pubkey -n $sig_namespace \ 187 fail "ssh-agent based sign using $pubkey failed" [all …]
|
| /freebsd-13.1/contrib/wpa/src/crypto/ |
| H A D | crypto_internal-modexp.c | 17 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()
|
| H A D | crypto_nettle.c | 308 u8 *pubkey) in crypto_dh_init() argument 321 pubkey, &pubkey_len) < 0) in crypto_dh_init() 325 os_memmove(pubkey + pad, pubkey, pubkey_len); in crypto_dh_init() 326 os_memset(pubkey, 0, pad); in crypto_dh_init() 336 const u8 *pubkey, size_t pubkey_len, in crypto_dh_derive_secret() argument 344 os_memcmp(pubkey, prime, prime_len) >= 0)) in crypto_dh_derive_secret() 348 mpz_import(pub, pubkey_len, 1, 1, 1, 0, pubkey); in crypto_dh_derive_secret() 367 res = crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len, in crypto_dh_derive_secret()
|
| H A D | crypto_wolfssl.c | 646 struct wpabuf *pubkey = NULL; in dh5_init() local 665 if (!privkey || !pubkey) in dh5_init() 678 wpabuf_put(pubkey, pub_sz); in dh5_init() 682 *publ = pubkey; in dh5_init() 685 pubkey = NULL; in dh5_init() 687 wpabuf_clear_free(pubkey); in dh5_init() 783 u8 *pubkey) in crypto_dh_init() argument 820 os_memmove(pubkey + pad_sz, pubkey, pub_sz); in crypto_dh_init() 821 os_memset(pubkey, 0, pad_sz); in crypto_dh_init() 1786 if (!pubkey) in crypto_ecdh_set_peerkey() [all …]
|
| H A D | crypto_gnutls.c | 287 u8 *pubkey) in crypto_dh_init() argument 300 pubkey, &pubkey_len) < 0) in crypto_dh_init() 304 os_memmove(pubkey + pad, pubkey, pubkey_len); in crypto_dh_init() 305 os_memset(pubkey, 0, pad); in crypto_dh_init() 315 const u8 *pubkey, size_t pubkey_len, in crypto_dh_derive_secret() argument 323 os_memcmp(pubkey, prime, prime_len) >= 0)) in crypto_dh_derive_secret() 326 if (gcry_mpi_scan(&pub, GCRYMPI_FMT_USG, pubkey, pubkey_len, NULL) != in crypto_dh_derive_secret() 353 res = crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len, in crypto_dh_derive_secret()
|
| H A D | crypto_openssl.c | 594 u8 *pubkey) in crypto_dh_init() argument 611 os_memmove(pubkey + pad, pubkey, pubkey_len); in crypto_dh_init() 854 if (pubkey == NULL) in dh5_init() 865 *publ = pubkey; in dh5_init() 869 wpabuf_clear_free(pubkey); in dh5_init() 904 if (!pubkey) in dh5_init() 915 *publ = pubkey; in dh5_init() 922 wpabuf_clear_free(pubkey); in dh5_init() 2125 const EC_POINT *pubkey; in crypto_ecdh_get_pubkey() local 2135 if (!pubkey) in crypto_ecdh_get_pubkey() [all …]
|
| /freebsd-13.1/contrib/unbound/validator/ |
| H A D | val_secalgo.c | 1228 if(!*pubkey) { in nss_setup_key_digest() 1247 if(!*pubkey) { in nss_setup_key_digest() 1284 if(!*pubkey) { in nss_setup_key_digest() 1297 if(!*pubkey) { in nss_setup_key_digest() 1307 if(!*pubkey) { in nss_setup_key_digest() 1347 SECKEYPublicKey* pubkey = NULL; in verify_canonrrset() local 1417 SECKEY_DestroyPublicKey(pubkey); in verify_canonrrset() 1722 struct dsa_public_key pubkey; in _verify_nettle_dsa() local 1809 struct rsa_public_key pubkey; in _verify_nettle_rsa() local 1839 nettle_mpz_set_str_256_u(pubkey.n, pubkey.size, &key[mod_offset]); in _verify_nettle_rsa() [all …]
|
| /freebsd-13.1/crypto/openssh/regress/misc/fuzz-harness/ |
| H A D | kex_fuzz.cc | 127 if (st == NULL || pubkey->type < 0 || pubkey->type > INT_MAX || in store_key() 128 privkey->type != pubkey->type || in store_key() 129 ((size_t)pubkey->type < st->nkeys && in store_key() 130 st->pubkeys[pubkey->type] != NULL)) in store_key() 132 if ((size_t)pubkey->type >= st->nkeys) { in store_key() 139 debug_f("store %s at %d", sshkey_ssh_name(pubkey), pubkey->type); in store_key() 140 st->pubkeys[pubkey->type] = pubkey; in store_key() 195 pubkey = get_pubkey(st, keytype); in do_kex_with_key() 293 if ((r = sshkey_read(pubkey, &cp)) != 0) { in prepare_key() 299 store_key(st, pubkey, privkey); in prepare_key() [all …]
|
| H A D | agent_fuzz_helper.c | 25 struct sshkey *pubkey; in pubkey_or_die() local 29 if ((pubkey = sshkey_new(KEY_UNSPEC)) == NULL) in pubkey_or_die() 31 if ((r = sshkey_read(pubkey, &cp)) != 0) { in pubkey_or_die() 36 return pubkey; in pubkey_or_die()
|
| /freebsd-13.1/contrib/libfido2/regress/ |
| H A D | cred.c | 393 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in valid_cred() 417 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in no_cdh() 441 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in no_rp_id() 466 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in no_rp_name() 519 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in no_x509() 543 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in no_sig() 567 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in no_fmt() 592 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in wrong_options() 623 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in junk_cdh() 668 assert(memcmp(fido_cred_pubkey_ptr(c), pubkey, sizeof(pubkey)) == 0); in junk_rp_id() [all …]
|
| /freebsd-13.1/contrib/wpa/src/wps/ |
| H A D | wps_attr_build.c | 23 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 …]
|
| H A D | wps_common.c | 64 struct wpabuf *pubkey, *dh_shared; in wps_derive_keys() local 75 pubkey = wps->registrar ? wps->dh_pubkey_e : wps->dh_pubkey_r; in wps_derive_keys() 76 if (pubkey == NULL) { in wps_derive_keys() 413 const struct wpabuf *pubkey, in wps_build_nfc_pw_token() argument 422 if (wps_build_oob_dev_pw(data, dev_pw_id, pubkey, in wps_build_nfc_pw_token() 629 if (pubkey == NULL || dev_pw == NULL) in wps_nfc_token_build() 632 ret = wps_build_nfc_pw_token(id, pubkey, dev_pw); in wps_nfc_token_build() 663 wpabuf_free(*pubkey); in wps_nfc_gen_dh() 664 *pubkey = pub; in wps_nfc_gen_dh() 690 if (wps_nfc_gen_dh(pubkey, privkey) < 0) { in wps_nfc_token_gen() [all …]
|
| /freebsd-13.1/crypto/openssl/crypto/x509v3/ |
| H A D | v3_skey.c | 59 X509_PUBKEY *pubkey; in s2i_skey_id() local 82 pubkey = ctx->subject_req->req_info.pubkey; in s2i_skey_id() 84 pubkey = ctx->subject_cert->cert_info.key; in s2i_skey_id() 86 if (pubkey == NULL) { in s2i_skey_id() 91 X509_PUBKEY_get0_param(NULL, &pk, &pklen, NULL, pubkey); in s2i_skey_id()
|
| /freebsd-13.1/crypto/openssl/crypto/ec/curve448/ |
| H A D | ed448.h | 41 uint8_t pubkey [EDDSA_448_PUBLIC_BYTES], 64 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], 88 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], 114 pubkey[EDDSA_448_PUBLIC_BYTES], 138 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES],
|
| H A D | eddsa.c | 89 uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in c448_ed448_derive_public_key() 120 curve448_point_mul_by_ratio_and_encode_like_eddsa(pubkey, p); in c448_ed448_derive_public_key() 133 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in c448_ed448_sign() 207 || !EVP_DigestUpdate(hashctx, pubkey, EDDSA_448_PUBLIC_BYTES) in c448_ed448_sign() 238 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in c448_ed448_sign_prehash() 242 return c448_ed448_sign(signature, privkey, pubkey, hash, 64, 1, context, in c448_ed448_sign_prehash() 248 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in c448_ed448_verify() 283 curve448_point_decode_like_eddsa_and_mul_by_ratio(pk_point, pubkey); in c448_ed448_verify() 302 || !EVP_DigestUpdate(hashctx, pubkey, EDDSA_448_PUBLIC_BYTES) in c448_ed448_verify() 330 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in c448_ed448_verify_prehash() [all …]
|
| /freebsd-13.1/sbin/dumpon/ |
| H A D | dumpon.c | 216 RSA *pubkey; in genkey() local 222 pubkey = NULL; in genkey() 243 pubkey = RSA_new(); in genkey() 244 if (pubkey == NULL) { in genkey() 249 pubkey = PEM_read_RSA_PUBKEY(fp, &pubkey, NULL, NULL); in genkey() 252 if (pubkey == NULL) in genkey() 271 if (RSA_security_bits(pubkey) < 112) in genkey() 273 if (RSA_size(pubkey) * 8 < 2048) in genkey() 277 RSA_size(pubkey) * 8); in genkey() 301 kdap->kda_encryptedkey, pubkey, in genkey() [all …]
|
| /freebsd-13.1/crypto/openssl/crypto/x509/ |
| H A D | x509_r2x.c | 25 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 D | x_pubkey.c | 33 X509_PUBKEY *pubkey = (X509_PUBKEY *)*pval; in pubkey_cb() local 34 EVP_PKEY_free(pubkey->pkey); in pubkey_cb() 37 X509_PUBKEY *pubkey = (X509_PUBKEY *)*pval; in pubkey_cb() local 38 EVP_PKEY_free(pubkey->pkey); in pubkey_cb() 39 pubkey->pkey = NULL; in pubkey_cb() 46 if (x509_pubkey_decode(&pubkey->pkey, pubkey) == -1) in pubkey_cb()
|
| /freebsd-13.1/contrib/ldns/ |
| H A D | keys.c | 1823 ldns_rr *pubkey; in ldns_key2rr() local 1841 pubkey = ldns_rr_new(); in ldns_key2rr() 1850 ldns_rr_set_type(pubkey, LDNS_RR_TYPE_KEY); in ldns_key2rr() 1857 ldns_rr_push_rdf(pubkey, in ldns_key2rr() 1861 ldns_rr_push_rdf(pubkey, in ldns_key2rr() 1875 ldns_rr_push_rdf(pubkey, in ldns_key2rr() 1897 ldns_rr_push_rdf(pubkey, in ldns_key2rr() 1920 ldns_rr_push_rdf(pubkey, in ldns_key2rr() 2047 ldns_rr_push_rdf(pubkey, in ldns_key2rr() 2059 ldns_rr_push_rdf(pubkey, keybin); in ldns_key2rr() [all …]
|
| /freebsd-13.1/crypto/openssl/crypto/ct/ |
| H A D | ct_sct_ctx.c | 238 int SCT_CTX_set1_issuer_pubkey(SCT_CTX *sctx, X509_PUBKEY *pubkey) in SCT_CTX_set1_issuer_pubkey() argument 240 return ct_public_key_hash(pubkey, &sctx->ihash, &sctx->ihashlen); in SCT_CTX_set1_issuer_pubkey() 243 int SCT_CTX_set1_pubkey(SCT_CTX *sctx, X509_PUBKEY *pubkey) in SCT_CTX_set1_pubkey() argument 245 EVP_PKEY *pkey = X509_PUBKEY_get(pubkey); in SCT_CTX_set1_pubkey() 250 if (!ct_public_key_hash(pubkey, &sctx->pkeyhash, &sctx->pkeyhashlen)) { in SCT_CTX_set1_pubkey()
|
| /freebsd-13.1/crypto/openssl/crypto/dh/ |
| H A D | dh_ameth.c | 45 static int dh_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey) in dh_pub_decode() argument 57 if (!X509_PUBKEY_get0_param(NULL, &p, &pklen, &palg, pubkey)) in dh_pub_decode() 641 plen = ASN1_STRING_length(pubkey); in dh_cms_set_peerkey() 642 p = ASN1_STRING_get0_data(pubkey); in dh_cms_set_peerkey() 758 ASN1_BIT_STRING *pubkey; in dh_cms_decrypt() local 762 if (!alg || !pubkey) in dh_cms_decrypt() 764 if (!dh_cms_set_peerkey(pctx, alg, pubkey)) { in dh_cms_decrypt() 785 ASN1_BIT_STRING *pubkey; in dh_cms_encrypt() local 814 ASN1_STRING_set0(pubkey, penc, penclen); in dh_cms_encrypt() 815 pubkey->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07); in dh_cms_encrypt() [all …]
|
| /freebsd-13.1/crypto/openssh/ |
| H A D | authfile.c | 177 struct sshkey *pubkey = NULL; in sshkey_load_pubkey_from_private() local 187 KEY_UNSPEC, &pubkey)) != 0) in sshkey_load_pubkey_from_private() 189 if ((r = sshkey_set_filename(pubkey, filename)) != 0) in sshkey_load_pubkey_from_private() 193 *pubkeyp = pubkey; in sshkey_load_pubkey_from_private() 194 pubkey = NULL; in sshkey_load_pubkey_from_private() 200 sshkey_free(pubkey); in sshkey_load_pubkey_from_private()
|