| /freebsd/contrib/libfido2/tools/ |
| H A D | test.sh | 62 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 D | ecx_backend.c | 32 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 89 pubkey = ecx->pubkey; in ossl_ecx_key_fromdata() 92 (void **)&pubkey, in ossl_ecx_key_fromdata() 93 sizeof(ecx->pubkey), &pubkeylen)) in ossl_ecx_key_fromdata() 130 memcpy(ret->pubkey, key->pubkey, sizeof(ret->pubkey)); in ossl_ecx_key_dup() 158 unsigned char *privkey, *pubkey; in ossl_ecx_key_op() local [all …]
|
| H A D | ecx_meth.c | 41 penc = OPENSSL_memdup(ecxkey->pubkey, KEYLEN(pkey)); in ecx_pub_encode() 54 static int ecx_pub_decode(EVP_PKEY *pkey, const X509_PUBKEY *pubkey) in ecx_pub_decode() argument 62 if (!X509_PUBKEY_get0_param(NULL, &p, &pklen, &palg, pubkey)) in ecx_pub_decode() 81 return CRYPTO_memcmp(akey->pubkey, bkey->pubkey, KEYLEN(a)) == 0; in ecx_pub_cmp() 198 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() 332 memcpy(pub, key->pubkey, *len); in ecx_get_pub_key() 361 key->pubkey, key->keylen)) in ecx_pkey_export_to() 726 const unsigned char **pubkey) in validate_ecx_derive() argument 745 *pubkey = peerkey->pubkey; in validate_ecx_derive() [all …]
|
| H A D | ecx_key.c | 79 OPENSSL_cleanse(&key->pubkey, sizeof(key->pubkey)); in ossl_ecx_key_free() 139 if (s390x_x25519_mul(secret, peer->pubkey, priv->privkey) == 0) { in ossl_ecx_compute_key() 145 if (ossl_x25519(secret, priv->privkey, peer->pubkey) == 0) { in ossl_ecx_compute_key() 153 if (s390x_x448_mul(secret, peer->pubkey, priv->privkey) == 0) { in ossl_ecx_compute_key() 159 if (ossl_x448(secret, priv->privkey, peer->pubkey) == 0) { in ossl_ecx_compute_key()
|
| /freebsd/crypto/openssl/crypto/x509/ |
| H A D | x_pubkey.c | 87 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 D | v3_skid.c | 54 ASN1_OCTET_STRING *ossl_x509_pubkey_hash(X509_PUBKEY *pubkey) in ossl_x509_pubkey_hash() argument 65 if (pubkey == NULL) { in ossl_x509_pubkey_hash() 69 if (!ossl_x509_PUBKEY_get0_libctx(&libctx, &propq, pubkey)) in ossl_x509_pubkey_hash() 78 X509_PUBKEY_get0_param(NULL, &pk, &pklen, NULL, pubkey); in ossl_x509_pubkey_hash() 107 …(ctx->subject_cert != NULL ? ctx->subject_cert->cert_info.key : ctx->subject_req->req_info.pubkey); in s2i_skey_id()
|
| /freebsd/crypto/openssh/regress/misc/fuzz-harness/ |
| H A D | kex_fuzz.cc | 123 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 D | authkeys_fuzz.cc | 17 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/crypto/libecc/src/wycheproof_tests/ |
| H A D | libecc_wycheproof_tests.h | 36 .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/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()
|
| /freebsd/contrib/unbound/validator/ |
| H A D | val_secalgo.c | 1238 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/libfido2/regress/ |
| H A D | cred.c | 293 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/krb5/src/plugins/preauth/spake/ |
| H A D | trace.h | 50 #define TRACE_SPAKE_KEYGEN(c, pubkey) \ argument 51 TRACE(c, "SPAKE key generated with pubkey {hexdata}", pubkey) 52 #define TRACE_SPAKE_RECEIVE_CHALLENGE(c, group, pubkey) \ argument 54 group, pubkey) 55 #define TRACE_SPAKE_RECEIVE_RESPONSE(c, pubkey) \ argument 56 TRACE(c, "SPAKE response received with pubkey {hexdata}", pubkey)
|
| /freebsd/crypto/openssl/providers/implementations/keymgmt/ |
| H A D | ecx_kmgmt.c | 173 const unsigned char *pa = key1->haspubkey ? key1->pubkey : NULL; in ecx_match() 174 const unsigned char *pb = key2->haspubkey ? key2->pubkey : NULL; in ecx_match() 232 key->pubkey, key->keylen)) in key_to_params() 314 if (!OSSL_PARAM_set_octet_string(p, ecx->pubkey, ecx->keylen)) in ecx_get_params() 430 void *buf = ecxkey->pubkey; in ecx_set_params() 433 || !OSSL_PARAM_get_octet_string(p, &buf, sizeof(ecxkey->pubkey), in ecx_set_params() 664 operation_result = ossl_ed25519_sign(sig, msg, msg_len, ecx->pubkey, in ecd_fips140_pairwise_test() 669 ecx->pubkey, ecx->privkey, NULL, 0, in ecd_fips140_pairwise_test() 677 operation_result = ossl_ed25519_verify(msg, msg_len, sig, ecx->pubkey, in ecd_fips140_pairwise_test() 682 ecx->pubkey, NULL, 0, 0, ecx->propq); in ecd_fips140_pairwise_test() [all …]
|
| /freebsd/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() 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 D | setconf.c | 17 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 D | sshsig.sh | 50 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 D | cms_dh.c | 21 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 D | cms_ec.c | 74 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 …]
|
| /freebsd/crypto/libecc/scripts/ |
| H A D | expand_libecc.py | 288 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 D | ed448.h | 42 uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], 67 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], 93 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], 122 pubkey[EDDSA_448_PUBLIC_BYTES], 149 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES],
|
| H A D | eddsa.c | 109 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() 324 error = ossl_curve448_point_decode_like_eddsa_and_mul_by_ratio(pk_point, pubkey); in ossl_c448_ed448_verify() 342 || !EVP_DigestUpdate(hashctx, pubkey, EDDSA_448_PUBLIC_BYTES) in ossl_c448_ed448_verify() 372 const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES], in ossl_c448_ed448_verify_prehash() [all …]
|
| /freebsd/crypto/openssl/test/recipes/ |
| H A D | 20-test_dgst.t | 25 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/test/ |
| H A D | algorithmid_test.c | 23 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() 106 X509_PUBKEY *pubkey = X509_get_X509_PUBKEY(cert); in test_x509_spki_aid() local 108 return test_spki_aid(pubkey, filename); in test_x509_spki_aid() 191 X509_PUBKEY *pubkey = NULL; in test_spki_file() local 201 if ((pubkey = PEM_read_bio_X509_PUBKEY(b, NULL, NULL, NULL)) == NULL) { in test_spki_file() 208 ret = test_spki_aid(pubkey, pubkey_filename); in test_spki_file() 211 X509_PUBKEY_free(pubkey); in test_spki_file()
|
| /freebsd/crypto/openssl/providers/implementations/encode_decode/ |
| H A D | encode_key2blob.c | 92 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()
|