/freebsd-11-stable/contrib/wpa/src/crypto/ |
H A D | crypto_internal-modexp.c | 17 u8 *pubkey) 30 pubkey, &pubkey_len) < 0) 34 os_memmove(pubkey + pad, pubkey, pubkey_len); 35 os_memset(pubkey, 0, pad); 45 const u8 *pubkey, size_t pubkey_len, 53 os_memcmp(pubkey, prime, prime_len) >= 0)) 57 if (!pub || bignum_set_unsigned_bin(pub, pubkey, pubkey_len) < 0 || 65 /* verify: pubkey^q == 1 mod p */ 81 res = crypto_mod_exp(pubkey, pubkey_le 16 crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, u8 *pubkey) argument 42 crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, const u8 *order, size_t order_len, const u8 *privkey, size_t privkey_len, const u8 *pubkey, size_t pubkey_len, u8 *secret, size_t *len) argument [all...] |
H A D | crypto_nettle.c | 308 u8 *pubkey) 321 pubkey, &pubkey_len) < 0) 325 os_memmove(pubkey + pad, pubkey, pubkey_len); 326 os_memset(pubkey, 0, pad); 336 const u8 *pubkey, size_t pubkey_len, 344 os_memcmp(pubkey, prime, prime_len) >= 0)) 348 mpz_import(pub, pubkey_len, 1, 1, 1, 0, pubkey); 356 /* verify: pubkey^q == 1 mod p */ 367 res = crypto_mod_exp(pubkey, pubkey_le 307 crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, u8 *pubkey) argument 333 crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, const u8 *order, size_t order_len, const u8 *privkey, size_t privkey_len, const u8 *pubkey, size_t pubkey_len, u8 *secret, size_t *len) argument [all...] |
H A D | crypto_gnutls.c | 287 u8 *pubkey) 300 pubkey, &pubkey_len) < 0) 304 os_memmove(pubkey + pad, pubkey, pubkey_len); 305 os_memset(pubkey, 0, pad); 315 const u8 *pubkey, size_t pubkey_len, 323 os_memcmp(pubkey, prime, prime_len) >= 0)) 326 if (gcry_mpi_scan(&pub, GCRYMPI_FMT_USG, pubkey, pubkey_len, NULL) != 335 /* verify: pubkey^q == 1 mod p */ 353 res = crypto_mod_exp(pubkey, pubkey_le 286 crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, u8 *pubkey) argument 312 crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, const u8 *order, size_t order_len, const u8 *privkey, size_t privkey_len, const u8 *pubkey, size_t pubkey_len, u8 *secret, size_t *len) argument [all...] |
H A D | crypto_wolfssl.c | 646 struct wpabuf *pubkey = NULL; local 664 pubkey = wpabuf_alloc(RFC3526_LEN); 665 if (!privkey || !pubkey) 674 wpabuf_mhead(pubkey), &pub_sz) != 0) 678 wpabuf_put(pubkey, pub_sz); 682 *publ = pubkey; 685 pubkey = NULL; 687 wpabuf_clear_free(pubkey); 779 u8 *pubkey) 802 if (wc_DhGenerateKeyPair(dh, &rng, privkey, &priv_sz, pubkey, 778 crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, u8 *pubkey) argument 828 crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, const u8 *order, size_t order_len, const u8 *privkey, size_t privkey_len, const u8 *pubkey, size_t pubkey_len, u8 *secret, size_t *len) argument 1738 struct wpabuf *pubkey = NULL; local [all...] |
H A D | crypto_libtomcrypt.c | 701 u8 *pubkey) 714 pubkey, &pubkey_len) < 0) 718 os_memmove(pubkey + pad, pubkey, pubkey_len); 719 os_memset(pubkey, 0, pad); 729 const u8 *pubkey, size_t pubkey_len, 732 /* TODO: check pubkey */ 733 return crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len, 700 crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, u8 *pubkey) argument 726 crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, const u8 *order, size_t order_len, const u8 *privkey, size_t privkey_len, const u8 *pubkey, size_t pubkey_len, u8 *secret, size_t *len) argument
|
H A D | crypto_openssl.c | 521 u8 *pubkey) 534 pubkey, &pubkey_len) < 0) 538 os_memmove(pubkey + pad, pubkey, pubkey_len); 539 os_memset(pubkey, 0, pad); 549 const u8 *pubkey, size_t pubkey_len, 555 pub = BN_bin2bn(pubkey, pubkey_len, NULL); 566 /* verify: pubkey^q == 1 mod p */ 580 res = crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len, 753 struct wpabuf *pubkey local 520 crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, u8 *pubkey) argument 546 crypto_dh_derive_secret(u8 generator, const u8 *prime, size_t prime_len, const u8 *order, size_t order_len, const u8 *privkey, size_t privkey_len, const u8 *pubkey, size_t pubkey_len, u8 *secret, size_t *len) argument 1938 const EC_POINT *pubkey; local [all...] |
/freebsd-11-stable/crypto/openssl/crypto/x509/ |
H A D | x509_r2x.c | 73 EVP_PKEY *pubkey = NULL; local 105 pubkey = X509_REQ_get_pubkey(r); 106 res = X509_set_pubkey(ret, pubkey); 107 EVP_PKEY_free(pubkey);
|
H A D | x509rset.c | 84 return (X509_PUBKEY_set(&x->req_info->pubkey, pkey));
|
H A D | x509spki.c | 68 return (X509_PUBKEY_set(&(x->spkac->pubkey), pkey)); 75 return (X509_PUBKEY_get(x->spkac->pubkey));
|
/freebsd-11-stable/crypto/openssl/crypto/asn1/ |
H A D | x_spki.c | 70 ASN1_SIMPLE(NETSCAPE_SPKAC, pubkey, X509_PUBKEY),
|
H A D | t_spki.c | 81 i = OBJ_obj2nid(spki->spkac->pubkey->algor->algorithm); 84 pkey = X509_PUBKEY_get(spki->spkac->pubkey);
|
H A D | x_req.c | 99 ASN1_SIMPLE(X509_REQ_INFO, pubkey, X509_PUBKEY),
|
/freebsd-11-stable/contrib/wpa/src/wps/ |
H A D | wps_attr_build.c | 23 struct wpabuf *pubkey = NULL; local 39 pubkey = wpabuf_dup(wps->wps->dh_pubkey); 62 pubkey = wpabuf_dup(wps->wps->ap_nfc_dh_pubkey); 63 if (wps->dh_privkey && pubkey) 64 wps->dh_ctx = dh5_init_fixed(wps->dh_privkey, pubkey); 69 wps->dh_ctx = dh5_init(&wps->dh_privkey, &pubkey); 70 pubkey = wpabuf_zeropad(pubkey, 192); 72 if (wps->dh_ctx == NULL || wps->dh_privkey == NULL || pubkey == NULL) { 75 wpabuf_free(pubkey); 414 wps_build_oob_dev_pw(struct wpabuf *msg, u16 dev_pw_id, const struct wpabuf *pubkey, const u8 *dev_pw, size_t dev_pw_len) argument [all...] |
H A D | wps_common.c | 64 struct wpabuf *pubkey, *dh_shared; local 75 pubkey = wps->registrar ? wps->dh_pubkey_e : wps->dh_pubkey_r; 76 if (pubkey == NULL) { 82 wpa_hexdump_buf(MSG_DEBUG, "WPS: DH peer Public Key", pubkey); 83 dh_shared = dh5_derive_shared(wps->dh_ctx, pubkey, wps->dh_privkey); 413 const struct wpabuf *pubkey, 422 if (wps_build_oob_dev_pw(data, dev_pw_id, pubkey, 624 struct wpabuf * wps_nfc_token_build(int ndef, int id, struct wpabuf *pubkey, argument 629 if (pubkey == NULL || dev_pw == NULL) 632 ret = wps_build_nfc_pw_token(id, pubkey, dev_p 412 wps_build_nfc_pw_token(u16 dev_pw_id, const struct wpabuf *pubkey, const struct wpabuf *dev_pw) argument 646 wps_nfc_gen_dh(struct wpabuf **pubkey, struct wpabuf **privkey) argument 672 wps_nfc_token_gen(int ndef, int *id, struct wpabuf **pubkey, struct wpabuf **privkey, struct wpabuf **dev_pw) argument [all...] |
/freebsd-11-stable/contrib/unbound/validator/ |
H A D | val_secalgo.c | 1115 nss_setup_key_digest(int algo, SECKEYPublicKey** pubkey, HASH_HashType* htype, argument 1144 *pubkey = nss_buf2dsa(key, keylen); 1145 if(!*pubkey) { 1163 *pubkey = nss_buf2rsa(key, keylen); 1164 if(!*pubkey) { 1200 *pubkey = nss_buf2rsa(key, keylen); 1201 if(!*pubkey) { 1212 *pubkey = nss_buf2ecdsa(key, keylen, 1214 if(!*pubkey) { 1222 *pubkey 1264 SECKEYPublicKey* pubkey = NULL; local 1563 struct dsa_public_key pubkey; local 1650 struct rsa_public_key pubkey; local 1729 struct ecc_point pubkey; local [all...] |
/freebsd-11-stable/contrib/ldns/ |
H A D | keys.c | 1377 ldns_rr *pubkey; local 1393 pubkey = ldns_rr_new(); 1399 ldns_rr_set_type(pubkey, LDNS_RR_TYPE_KEY); 1402 ldns_rr_set_type(pubkey, LDNS_RR_TYPE_DNSKEY); 1406 ldns_rr_push_rdf(pubkey, 1410 ldns_rr_push_rdf(pubkey, 1414 ldns_rr_set_owner(pubkey, ldns_rdf_clone(ldns_key_pubkey_owner(k))); 1424 ldns_rr_push_rdf(pubkey, 1431 ldns_rr_free(pubkey); 1436 ldns_rr_free(pubkey); [all...] |
/freebsd-11-stable/crypto/openssl/crypto/dh/ |
H A D | dh_ameth.c | 97 static int dh_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey) argument 109 if (!X509_PUBKEY_get0_param(NULL, &p, &pklen, &palg, pubkey)) 203 * explcitly included and the pubkey must be recalculated. 654 X509_ALGOR *alg, ASN1_BIT_STRING *pubkey) 681 plen = ASN1_STRING_length(pubkey); 682 p = ASN1_STRING_data(pubkey); 802 ASN1_BIT_STRING *pubkey; local 803 if (!CMS_RecipientInfo_kari_get0_orig_id(ri, &alg, &pubkey, 806 if (!alg || !pubkey) 808 if (!dh_cms_set_peerkey(pctx, alg, pubkey)) { 653 dh_cms_set_peerkey(EVP_PKEY_CTX *pctx, X509_ALGOR *alg, ASN1_BIT_STRING *pubkey) argument 829 ASN1_BIT_STRING *pubkey; local [all...] |
/freebsd-11-stable/crypto/openssl/crypto/ec/ |
H A D | ec_ameth.c | 187 static int eckey_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey) argument 195 if (!X509_PUBKEY_get0_param(NULL, &p, &pklen, &palg, pubkey)) 649 X509_ALGOR *alg, ASN1_BIT_STRING *pubkey) 681 plen = ASN1_STRING_length(pubkey); 682 p = ASN1_STRING_data(pubkey); 805 ASN1_BIT_STRING *pubkey; local 806 if (!CMS_RecipientInfo_kari_get0_orig_id(ri, &alg, &pubkey, 809 if (!alg || !pubkey) 811 if (!ecdh_cms_set_peerkey(pctx, alg, pubkey)) { 832 ASN1_BIT_STRING *pubkey; local 648 ecdh_cms_set_peerkey(EVP_PKEY_CTX *pctx, X509_ALGOR *alg, ASN1_BIT_STRING *pubkey) argument [all...] |
/freebsd-11-stable/crypto/openssl/crypto/x509v3/ |
H A D | v3_skey.c | 127 pk = ctx->subject_req->req_info->pubkey->public_key;
|
/freebsd-11-stable/crypto/openssl/apps/ |
H A D | spkac.c | 88 int verify = 0, noout = 0, pubkey = 0; local 149 else if (strcmp(*argv, "-pubkey") == 0) 150 pubkey = 1; 172 BIO_printf(bio_err, " -pubkey output public key\n"); 296 if (pubkey)
|
/freebsd-11-stable/crypto/openssl/crypto/cms/ |
H A D | cms_kari.c | 104 ASN1_BIT_STRING **pubkey, 124 if (pubkey) 125 *pubkey = NULL; 137 if (pubkey) 138 *pubkey = oik->d.originatorKey->publicKey; 102 CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri, X509_ALGOR **pubalg, ASN1_BIT_STRING **pubkey, ASN1_OCTET_STRING **keyid, X509_NAME **issuer, ASN1_INTEGER **sno) argument
|
/freebsd-11-stable/usr.sbin/pkg/ |
H A D | pkg.c | 70 struct pubkey { struct 590 static struct pubkey * 593 struct pubkey *pk; 610 pk = calloc(1, sizeof(struct pubkey)); 694 struct pubkey *pk; 695 const char *pubkey; local 699 pubkey = NULL; 701 if (config_string(PUBKEY, &pubkey) != 0) { 712 printf("Verifying signature with public key %s... ", pubkey); 713 if (rsa_verify_cert(fd_pkg, pubkey, NUL [all...] |
/freebsd-11-stable/crypto/heimdal/appl/telnet/libtelnet/ |
H A D | rsaencpwd.c | 280 * get pubkey 323 char chalkey[160], pubkey[128], *ptr; local 362 memmove(pubkey, ptr, pubkey_len); 367 r = init_rsa_encpwd(&token, user_passwd, challenge, challenge_len, pubkey);
|
/freebsd-11-stable/contrib/telnet/libtelnet/ |
H A D | rsaencpwd.c | 276 * get pubkey 319 char chalkey[160], pubkey[128], *ptr; local 358 memmove(pubkey, ptr, pubkey_len); 363 r = init_rsa_encpwd(&token, user_passwd, challenge, challenge_len, pubkey);
|
/freebsd-11-stable/crypto/openssh/regress/misc/kexfuzz/ |
H A D | kexfuzz.c | 204 struct sshkey *pubkey = NULL; local 212 ASSERT_INT_EQ(sshkey_from_private(prvkey, &pubkey), 0); 245 ASSERT_INT_EQ(ssh_add_hostkey(client, pubkey), 0); 303 sshkey_free(pubkey);
|