/external/boringssl/src/crypto/dh/ |
D | dh.c | 111 BN_clear_free(dh->priv_key); in DH_free() 123 *out_priv_key = dh->priv_key; in DH_get0_key() 127 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) { in DH_set0_key() argument 133 if (priv_key != NULL) { in DH_set0_key() 134 BN_free(dh->priv_key); in DH_set0_key() 135 dh->priv_key = priv_key; in DH_set0_key() 296 BIGNUM *pub_key = NULL, *priv_key = NULL; in DH_generate_key() local 308 if (dh->priv_key == NULL) { in DH_generate_key() 309 priv_key = BN_new(); in DH_generate_key() 310 if (priv_key == NULL) { in DH_generate_key() [all …]
|
/external/boringssl/src/crypto/fipsmodule/ec/ |
D | ec_key.c | 173 ec_wrapped_scalar_free(r->priv_key); in EC_KEY_free() 196 (src->priv_key != NULL && in EC_KEY_dup() 228 assert(key->priv_key == NULL); in EC_KEY_set_group() 237 return key->priv_key != NULL ? &key->priv_key->bignum : NULL; in EC_KEY_get0_private_key() 240 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key) { in EC_KEY_set_private_key() argument 250 if (!ec_bignum_to_scalar(key->group, &scalar->scalar, priv_key)) { in EC_KEY_set_private_key() 255 ec_wrapped_scalar_free(key->priv_key); in EC_KEY_set_private_key() 256 key->priv_key = scalar; in EC_KEY_set_private_key() 322 if (eckey->priv_key != NULL) { in EC_KEY_check_key() 326 &eckey->priv_key->scalar)) { in EC_KEY_check_key() [all …]
|
/external/boringssl/src/crypto/fipsmodule/ecdh/ |
D | ecdh.c | 81 const EC_KEY *priv_key) { in ECDH_compute_key_fips() argument 82 if (priv_key->priv_key == NULL) { in ECDH_compute_key_fips() 86 const EC_SCALAR *const priv = &priv_key->priv_key->scalar; in ECDH_compute_key_fips() 87 const EC_GROUP *const group = EC_KEY_get0_group(priv_key); in ECDH_compute_key_fips()
|
/external/boringssl/src/crypto/ecdh_extra/ |
D | ecdh_extra.c | 81 const EC_KEY *priv_key, in ECDH_compute_key() argument 84 if (priv_key->priv_key == NULL) { in ECDH_compute_key() 88 const EC_SCALAR *const priv = &priv_key->priv_key->scalar; in ECDH_compute_key() 89 const EC_GROUP *const group = EC_KEY_get0_group(priv_key); in ECDH_compute_key()
|
D | ecdh_test.cc | 75 bssl::UniquePtr<BIGNUM> priv_key = GetBIGNUM(t, "Private"); in TEST() local 76 ASSERT_TRUE(priv_key); in TEST() 95 ASSERT_TRUE(EC_KEY_set_private_key(key.get(), priv_key.get())); in TEST() 135 bssl::UniquePtr<BIGNUM> priv_key = GetWycheproofBIGNUM(t, "private", false); in RunWycheproofTest() local 136 ASSERT_TRUE(priv_key); in RunWycheproofTest() 167 ASSERT_TRUE(EC_KEY_set_private_key(key.get(), priv_key.get())); in RunWycheproofTest()
|
/external/boringssl/src/crypto/evp/ |
D | print.c | 223 const BIGNUM *priv_key, *pub_key; in do_dsa_print() local 225 priv_key = NULL; in do_dsa_print() 227 priv_key = x->priv_key; in do_dsa_print() 245 update_buflen(priv_key, &buf_len); in do_dsa_print() 254 if (priv_key) { in do_dsa_print() 261 if (!bn_print(bp, "priv:", priv_key, m, off) || in do_dsa_print() 302 const BIGNUM *priv_key; in do_EC_KEY_print() local 343 priv_key = EC_KEY_get0_private_key(x); in do_EC_KEY_print() 344 if (priv_key && (i = (size_t)BN_num_bytes(priv_key)) > buf_len) { in do_EC_KEY_print() 348 priv_key = NULL; in do_EC_KEY_print() [all …]
|
D | p_dsa_asn1.c | 138 dsa->priv_key = BN_new(); in dsa_priv_decode() 140 if (dsa->priv_key == NULL || dsa->pub_key == NULL) { in dsa_priv_decode() 145 if (!BN_parse_asn1_unsigned(key, dsa->priv_key) || in dsa_priv_decode() 154 !BN_mod_exp_mont_consttime(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, in dsa_priv_decode() 171 if (dsa == NULL || dsa->priv_key == NULL) { in dsa_priv_encode() 185 !BN_marshal_asn1(&private_key, dsa->priv_key) || in dsa_priv_encode()
|
/external/boringssl/src/crypto/dsa/ |
D | dsa.c | 122 BN_clear_free(dsa->priv_key); in DSA_free() 140 *out_priv_key = dsa->priv_key; in DSA_get0_key() 157 int DSA_set0_key(DSA *dsa, BIGNUM *pub_key, BIGNUM *priv_key) { in DSA_set0_key() argument 166 if (priv_key != NULL) { in DSA_set0_key() 167 BN_free(dsa->priv_key); in DSA_set0_key() 168 dsa->priv_key = priv_key; in DSA_set0_key() 473 BIGNUM *pub_key = NULL, *priv_key = NULL; in DSA_generate_key() local 480 priv_key = dsa->priv_key; in DSA_generate_key() 481 if (priv_key == NULL) { in DSA_generate_key() 482 priv_key = BN_new(); in DSA_generate_key() [all …]
|
D | dsa_test.cc | 180 dsa->priv_key = BN_bin2bn(fips_x, sizeof(fips_x), nullptr); in GetFIPSDSA() 182 dsa->pub_key == nullptr || dsa->priv_key == nullptr) { in GetFIPSDSA()
|
/external/python/rsa/rsa/ |
D | pkcs1.py | 181 def decrypt(crypto, priv_key): argument 232 blocksize = common.byte_size(priv_key.n) 234 decrypted = priv_key.blinded_decrypt(encrypted) 250 def sign_hash(hash_value, priv_key, hash_method): argument 274 keylength = common.byte_size(priv_key.n) 278 encrypted = priv_key.blinded_encrypt(payload) 284 def sign(message, priv_key, hash_method): argument 303 return sign_hash(msg_hash, priv_key, hash_method)
|
D | cli.py | 68 (pub_key, priv_key) = rsa.newkeys(keysize) 78 data = priv_key.save_pkcs1(format=cli.form) 222 def perform_operation(self, indata, priv_key, cli_args=None): argument 225 return rsa.decrypt(indata, priv_key) 244 def perform_operation(self, indata, priv_key, cli_args): argument 252 return rsa.sign(indata, priv_key, hash_method)
|
D | util.py | 65 priv_key = rsa.key.PrivateKey.load_pkcs1(in_data, cli.inform) 66 pub_key = rsa.key.PublicKey(priv_key.n, priv_key.e)
|
/external/boringssl/src/crypto/fipsmodule/ecdsa/ |
D | ecdsa.c | 192 size_t digest_len, const EC_SCALAR *priv_key) { in ecdsa_sign_setup() argument 219 SHA512_Update(&sha, priv_key->words, order->width * sizeof(BN_ULONG)); in ecdsa_sign_setup() 256 if (group == NULL || eckey->priv_key == NULL) { in ECDSA_do_sign() 261 const EC_SCALAR *priv_key = &eckey->priv_key->scalar; in ECDSA_do_sign() local 274 priv_key) || in ECDSA_do_sign() 283 ec_scalar_mul_montgomery(group, &s, priv_key, &r_mont); in ECDSA_do_sign()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/netscape/ |
D | NetscapeCertRequest.java | 214 public void sign(PrivateKey priv_key) throws NoSuchAlgorithmException, in sign() argument 218 sign(priv_key, null); in sign() 221 public void sign(PrivateKey priv_key, SecureRandom rand) in sign() argument 231 sig.initSign(priv_key, rand); in sign() 235 sig.initSign(priv_key); in sign()
|
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jce/netscape/ |
D | NetscapeCertRequest.java | 216 public void sign(PrivateKey priv_key) throws NoSuchAlgorithmException, in sign() argument 220 sign(priv_key, null); in sign() 223 public void sign(PrivateKey priv_key, SecureRandom rand) in sign() argument 233 sig.initSign(priv_key, rand); in sign() 237 sig.initSign(priv_key); in sign()
|
/external/boringssl/src/include/openssl/ |
D | ecdh.h | 89 void *out, size_t outlen, const EC_POINT *pub_key, const EC_KEY *priv_key, 106 const EC_KEY *priv_key);
|
D | dh.h | 98 OPENSSL_EXPORT int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); 254 BIGNUM *priv_key; // x member
|
D | dsa.h | 114 OPENSSL_EXPORT int DSA_set0_key(DSA *dsa, BIGNUM *pub_key, BIGNUM *priv_key); 403 BIGNUM *priv_key; // x private key member
|
/external/boringssl/src/crypto/ec_extra/ |
D | ec_asn1.c | 89 BIGNUM *priv_key = NULL; in EC_KEY_parse_private_key() local 130 priv_key = BN_bin2bn(CBS_data(&private_key), CBS_len(&private_key), NULL); in EC_KEY_parse_private_key() 132 if (priv_key == NULL || ret->pub_key == NULL || in EC_KEY_parse_private_key() 133 !EC_KEY_set_private_key(ret, priv_key)) { in EC_KEY_parse_private_key() 163 &ret->priv_key->scalar)) { in EC_KEY_parse_private_key() 181 BN_free(priv_key); in EC_KEY_parse_private_key() 187 BN_free(priv_key); in EC_KEY_parse_private_key() 194 if (key == NULL || key->group == NULL || key->priv_key == NULL) { in EC_KEY_marshal_private_key()
|
/external/python/rsa/tests/ |
D | test_cli.py | 95 cls.pub_key, cls.priv_key = rsa.newkeys(512) 103 outfile.write(cls.priv_key.save_pkcs1()) 295 self.assertEqual(self.priv_key.n, key.n) 296 self.assertEqual(self.priv_key.e, key.e)
|
/external/wpa_supplicant_8/src/crypto/ |
D | crypto_openssl.c | 783 privlen = BN_num_bytes(dh->priv_key); in dh5_init() 789 BN_bn2bin(dh->priv_key, wpabuf_put(privkey, privlen)); in dh5_init() 805 const BIGNUM *priv_key = NULL, *pub_key = NULL; in dh5_init() 828 DH_get0_key(dh, &pub_key, &priv_key); in dh5_init() 833 privlen = BN_num_bytes(priv_key); in dh5_init() 839 BN_bn2bin(priv_key, wpabuf_put(privkey, privlen)); in dh5_init() 876 dh->priv_key = BN_bin2bn(wpabuf_head(priv), wpabuf_len(priv), NULL); in dh5_init_fixed() 877 if (dh->priv_key == NULL) in dh5_init_fixed() 894 BIGNUM *p = NULL, *g, *priv_key = NULL, *pub_key = NULL; in dh5_init_fixed() 908 priv_key = BN_bin2bn(wpabuf_head(priv), wpabuf_len(priv), NULL); in dh5_init_fixed() [all …]
|
/external/python/cryptography/src/cryptography/hazmat/backends/openssl/ |
D | dsa.py | 134 priv_key = self._backend._ffi.new("BIGNUM **") 139 self._backend._lib.DSA_get0_key(self._dsa_cdata, pub_key, priv_key) 141 self._backend.openssl_assert(priv_key[0] != self._backend._ffi.NULL) 151 x=self._backend._bn_to_int(priv_key[0])
|
D | dh.py | 130 priv_key = self._backend._ffi.new("BIGNUM **") 131 self._backend._lib.DH_get0_key(self._dh_cdata, pub_key, priv_key) 133 self._backend.openssl_assert(priv_key[0] != self._backend._ffi.NULL) 143 x=self._backend._bn_to_int(priv_key[0])
|
/external/python/rsa/doc/ |
D | upgrading.rst | 79 priv_key = rsa.PrivateKey(n=old_pub_key['n'], e=old_pub_key['e'], 87 priv_key = rsa.PrivateKey(**old_priv_key)
|
/external/wpa_supplicant_8/src/common/ |
D | dpp_backup.c | 152 struct wpabuf *key = NULL, *attr, *alg, *priv_key = NULL; in dpp_build_key_pkg() local 164 priv_key = wpabuf_alloc_copy(der, der_len); in dpp_build_key_pkg() 172 if (!priv_key || !attr || !alg) in dpp_build_key_pkg() 187 key = wpabuf_alloc(100 + wpabuf_len(alg) + wpabuf_len(priv_key) + in dpp_build_key_pkg() 198 asn1_put_octet_string(key, priv_key); in dpp_build_key_pkg() 206 wpabuf_clear_free(priv_key); in dpp_build_key_pkg()
|