Home
last modified time | relevance | path

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

12

/external/dropbear/libtomcrypt/src/pk/ecc/
Decc_import.c40 …if ((err = mp_sqr(key->pubkey.y, t1)) != CRYPT_OK) { goto … in is_point()
43 …if ((err = mp_sqr(key->pubkey.x, t2)) != CRYPT_OK) { goto … in is_point()
45 …if ((err = mp_mul(key->pubkey.x, t2, t2)) != CRYPT_OK) { goto … in is_point()
51 …if ((err = mp_add(t1, key->pubkey.x, t1)) != CRYPT_OK) { goto … in is_point()
52 …if ((err = mp_add(t1, key->pubkey.x, t1)) != CRYPT_OK) { goto … in is_point()
53 …if ((err = mp_add(t1, key->pubkey.x, t1)) != CRYPT_OK) { goto … in is_point()
105 if (mp_init_multi(&key->pubkey.x, &key->pubkey.y, &key->pubkey.z, &key->k, NULL) != CRYPT_OK) { in ecc_import_ex()
123 LTC_ASN1_INTEGER, 1UL, key->pubkey.x, in ecc_import_ex()
124 LTC_ASN1_INTEGER, 1UL, key->pubkey.y, in ecc_import_ex()
135 LTC_ASN1_INTEGER, 1UL, key->pubkey.x, in ecc_import_ex()
[all …]
Decc_sign_hash.c41 ecc_key pubkey; in ecc_sign_hash() local
74 if ((err = ecc_make_key_ex(prng, wprng, &pubkey, key->dp)) != CRYPT_OK) { in ecc_sign_hash()
79 if ((err = mp_mod(pubkey.pubkey.x, p, r)) != CRYPT_OK) { goto error; } in ecc_sign_hash()
82 ecc_free(&pubkey); in ecc_sign_hash()
85 … if ((err = mp_invmod(pubkey.k, p, pubkey.k)) != CRYPT_OK) { goto error; } /* k = 1/k */ in ecc_sign_hash()
89 …if ((err = mp_mulmod(s, pubkey.k, p, s)) != CRYPT_OK) { goto error; } /* s = (e + x… in ecc_sign_hash()
90 ecc_free(&pubkey); in ecc_sign_hash()
104 ecc_free(&pubkey); in ecc_sign_hash()
Decc_ansi_x963_import.c49 if (mp_init_multi(&key->pubkey.x, &key->pubkey.y, &key->pubkey.z, &key->k, NULL) != CRYPT_OK) { in ecc_ansi_x963_import_ex()
60 …if ((err = mp_read_unsigned_bin(key->pubkey.x, (unsigned char *)in+1, (inlen-1)>>1)) != CRYPT_OK) { in ecc_ansi_x963_import_ex()
64 …if ((err = mp_read_unsigned_bin(key->pubkey.y, (unsigned char *)in+1+((inlen-1)>>1), (inlen-1)>>1)… in ecc_ansi_x963_import_ex()
67 if ((err = mp_set(key->pubkey.z, 1)) != CRYPT_OK) { goto error; } in ecc_ansi_x963_import_ex()
96 mp_clear_multi(key->pubkey.x, key->pubkey.y, key->pubkey.z, key->k, NULL); in ecc_ansi_x963_import_ex()
Decc_encrypt_key.c44 ecc_key pubkey; in ecc_encrypt_key() local
67 if ((err = ecc_make_key_ex(prng, wprng, &pubkey, key->dp)) != CRYPT_OK) { in ecc_encrypt_key()
84 ecc_free(&pubkey); in ecc_encrypt_key()
89 if ((err = ecc_export(pub_expt, &pubkeysize, PK_PUBLIC, &pubkey)) != CRYPT_OK) { in ecc_encrypt_key()
90 ecc_free(&pubkey); in ecc_encrypt_key()
96 if ((err = ecc_shared_secret(&pubkey, key, ecc_shared, &x)) != CRYPT_OK) { in ecc_encrypt_key()
97 ecc_free(&pubkey); in ecc_encrypt_key()
100 ecc_free(&pubkey); in ecc_encrypt_key()
Decc_make_key.c85 …if ((err = mp_init_multi(&key->pubkey.x, &key->pubkey.y, &key->pubkey.z, &key->k, &prime, NULL)) !… in ecc_make_key_ex()
102 …if ((err = ltc_mp.ecc_ptmul(key->k, base, &key->pubkey, prime, 1)) != CRYPT_OK) { got… in ecc_make_key_ex()
109 mp_clear_multi(key->pubkey.x, key->pubkey.y, key->pubkey.z, key->k, NULL); in ecc_make_key_ex()
Decc_ansi_x963_export.c56 mp_to_unsigned_bin(key->pubkey.x, buf + (numlen - mp_unsigned_bin_size(key->pubkey.x))); in ecc_ansi_x963_export()
61 mp_to_unsigned_bin(key->pubkey.y, buf + (numlen - mp_unsigned_bin_size(key->pubkey.y))); in ecc_ansi_x963_export()
Decc_export.c61 LTC_ASN1_INTEGER, 1UL, key->pubkey.x, in ecc_export()
62 LTC_ASN1_INTEGER, 1UL, key->pubkey.y, in ecc_export()
70 LTC_ASN1_INTEGER, 1UL, key->pubkey.x, in ecc_export()
71 LTC_ASN1_INTEGER, 1UL, key->pubkey.y, in ecc_export()
Decc_free.c33 mp_clear_multi(key->pubkey.x, key->pubkey.y, key->pubkey.z, key->k, NULL); in ecc_free()
Decc_decrypt_key.c42 ecc_key pubkey; in ecc_decrypt_key() local
94 if ((err = ecc_import(decode[1].data, decode[1].size, &pubkey)) != CRYPT_OK) { in ecc_decrypt_key()
100 if ((err = ecc_shared_secret(key, &pubkey, ecc_shared, &x)) != CRYPT_OK) { in ecc_decrypt_key()
101 ecc_free(&pubkey); in ecc_decrypt_key()
104 ecc_free(&pubkey); in ecc_decrypt_key()
Decc_verify_hash.c119 …if ((err = mp_copy(key->pubkey.x, mQ->x)) != CRYPT_OK) … in ecc_verify_hash()
120 …if ((err = mp_copy(key->pubkey.y, mQ->y)) != CRYPT_OK) … in ecc_verify_hash()
121 …if ((err = mp_copy(key->pubkey.z, mQ->z)) != CRYPT_OK) … in ecc_verify_hash()
/external/wpa_supplicant_6/wpa_supplicant/src/wps/
Dwps_attr_build.c26 struct wpabuf *pubkey; in wps_build_public_key() local
29 pubkey = dh_init(dh_groups_get(WPS_DH_GROUP), &wps->dh_privkey); in wps_build_public_key()
30 pubkey = wpabuf_zeropad(pubkey, 192); in wps_build_public_key()
31 if (pubkey == NULL) { in wps_build_public_key()
38 wpabuf_put_be16(msg, wpabuf_len(pubkey)); in wps_build_public_key()
39 wpabuf_put_buf(msg, pubkey); in wps_build_public_key()
43 wps->dh_pubkey_r = pubkey; in wps_build_public_key()
46 wps->dh_pubkey_e = pubkey; in wps_build_public_key()
Dwps_common.c66 struct wpabuf *pubkey, *dh_shared; in wps_derive_keys() local
77 pubkey = wps->registrar ? wps->dh_pubkey_e : wps->dh_pubkey_r; in wps_derive_keys()
78 if (pubkey == NULL) { in wps_derive_keys()
83 dh_shared = dh_derive_shared(pubkey, wps->dh_privkey, in wps_derive_keys()
/external/wpa_supplicant_8/src/wps/
Dwps_attr_build.c29 struct wpabuf *pubkey; in wps_build_public_key() local
38 pubkey = wpabuf_dup(wps->wps->dh_pubkey); in wps_build_public_key()
43 wps->dh_ctx = dh5_init(&wps->dh_privkey, &pubkey); in wps_build_public_key()
44 pubkey = wpabuf_zeropad(pubkey, 192); in wps_build_public_key()
46 if (wps->dh_ctx == NULL || wps->dh_privkey == NULL || pubkey == NULL) { in wps_build_public_key()
49 wpabuf_free(pubkey); in wps_build_public_key()
53 wpa_hexdump_buf(MSG_DEBUG, "WPS: DH own Public Key", pubkey); in wps_build_public_key()
56 wpabuf_put_be16(msg, wpabuf_len(pubkey)); in wps_build_public_key()
57 wpabuf_put_buf(msg, pubkey); in wps_build_public_key()
61 wps->dh_pubkey_r = pubkey; in wps_build_public_key()
[all …]
Dwps_common.c68 struct wpabuf *pubkey, *dh_shared; in wps_derive_keys() local
79 pubkey = wps->registrar ? wps->dh_pubkey_e : wps->dh_pubkey_r; in wps_derive_keys()
80 if (pubkey == NULL) { in wps_derive_keys()
86 wpa_hexdump_buf(MSG_DEBUG, "WPS: DH peer Public Key", pubkey); in wps_derive_keys()
87 dh_shared = dh5_derive_shared(wps->dh_ctx, pubkey, wps->dh_privkey); in wps_derive_keys()
/external/bouncycastle/src/main/java/org/bouncycastle/jce/netscape/
DNetscapeCertRequest.java52 PublicKey pubkey ; field in NetscapeCertRequest
119 pubkey = KeyFactory.getInstance(keyAlg.getObjectId().getId(), "BC") in NetscapeCertRequest()
138 pubkey = pub_key; in NetscapeCertRequest()
180 return pubkey; in getPublicKey()
185 pubkey = value; in setPublicKey()
202 sig.initVerify(pubkey); in verify()
258 baos.write(pubkey.getEncoded()); in getKeySpec()
/external/dropbear/libtomcrypt/notes/
Dtech0006.txt67 pubkey.x INTEGER, -- The X co-ordinate of the public key point
68 pubkey.y INTEGER, -- The Y co-ordinate of the public key point
75 pubkey.x INTEGER, -- The X co-ordinate of the public key point
76 pubkey.y INTEGER, -- The Y co-ordinate of the public key point
85 pubkey OCTET STRING , -- Encapsulation of a random ECCPublicKey
/external/openssl/crypto/asn1/
Dt_spki.c80 i=OBJ_obj2nid(spki->spkac->pubkey->algor->algorithm); in NETSCAPE_SPKI_print()
83 pkey = X509_PUBKEY_get(spki->spkac->pubkey); in NETSCAPE_SPKI_print()
Dx_spki.c69 ASN1_SIMPLE(NETSCAPE_SPKAC, pubkey, X509_PUBKEY),
Dx_req.c97 ASN1_SIMPLE(X509_REQ_INFO, pubkey, X509_PUBKEY),
/external/wpa_supplicant_8/src/crypto/
Dcrypto_openssl.c416 struct wpabuf *pubkey = NULL, *privkey = NULL; in dh5_init() local
438 pubkey = wpabuf_alloc(publen); in dh5_init()
439 if (pubkey == NULL) in dh5_init()
446 BN_bn2bin(dh->pub_key, wpabuf_put(pubkey, publen)); in dh5_init()
450 *publ = pubkey; in dh5_init()
454 wpabuf_free(pubkey); in dh5_init()
/external/openssl/crypto/x509/
Dx509spki.c66 return(X509_PUBKEY_set(&(x->spkac->pubkey),pkey)); in NETSCAPE_SPKI_set_pubkey()
73 return(X509_PUBKEY_get(x->spkac->pubkey)); in NETSCAPE_SPKI_get_pubkey()
Dx509rset.c81 return(X509_PUBKEY_set(&x->req_info->pubkey,pkey)); in X509_REQ_set_pubkey()
/external/openssl/crypto/ec/
Dec_pmeth.c174 const EC_POINT *pubkey = NULL; in pkey_ec_derive() local
189 pubkey = EC_KEY_get0_public_key(ctx->peerkey->pkey.ec); in pkey_ec_derive()
197 ret = ECDH_compute_key(key, outlen, pubkey, ctx->pkey->pkey.ec, 0); in pkey_ec_derive()
/external/openssl/apps/
Dspkac.c87 int verify=0,noout=0,pubkey=0; in MAIN() local
157 pubkey=1; in MAIN()
295 if(pubkey) PEM_write_bio_PUBKEY(out, pkey); in MAIN()
/external/openssl/crypto/rsa/
Drsa_ameth.c85 static int rsa_pub_decode(EVP_PKEY *pkey, X509_PUBKEY *pubkey) in rsa_pub_decode() argument
90 if (!X509_PUBKEY_get0_param(NULL, &p, &pklen, NULL, pubkey)) in rsa_pub_decode()

12