/external/boringssl/src/crypto/fipsmodule/dh/ |
D | dh.c | 105 BN_clear_free(dh->priv_key); in DH_free() 113 const BIGNUM *DH_get0_priv_key(const DH *dh) { return dh->priv_key; } in DH_get0_priv_key() 127 *out_priv_key = dh->priv_key; in DH_get0_key() 131 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) { in DH_set0_key() argument 137 if (priv_key != NULL) { in DH_set0_key() 138 BN_free(dh->priv_key); in DH_set0_key() 139 dh->priv_key = priv_key; in DH_set0_key() 191 BIGNUM *pub_key = NULL, *priv_key = NULL; in DH_generate_key() local 203 if (dh->priv_key == NULL) { in DH_generate_key() 204 priv_key = BN_new(); in DH_generate_key() [all …]
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/dh/ |
D | dh.c | 110 BN_clear_free(dh->priv_key); in DH_free() 118 const BIGNUM *DH_get0_priv_key(const DH *dh) { return dh->priv_key; } in DH_get0_priv_key() 132 *out_priv_key = dh->priv_key; in DH_get0_key() 136 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) { in DH_set0_key() argument 142 if (priv_key != NULL) { in DH_set0_key() 143 BN_free(dh->priv_key); in DH_set0_key() 144 dh->priv_key = priv_key; in DH_set0_key() 310 BIGNUM *pub_key = NULL, *priv_key = NULL; in DH_generate_key() local 322 if (dh->priv_key == NULL) { in DH_generate_key() 323 priv_key = BN_new(); 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() 312 if (eckey->priv_key != NULL) { in EC_KEY_check_key() 315 &eckey->priv_key->scalar)) { in EC_KEY_check_key() [all …]
|
/external/rust/crates/quiche/deps/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() 312 if (eckey->priv_key != NULL) { in EC_KEY_check_key() 315 &eckey->priv_key->scalar)) { in EC_KEY_check_key() [all …]
|
/external/openssh/openbsd-compat/ |
D | libressl-api-compat.c | 200 DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) in DSA_get0_key() argument 204 if (priv_key != NULL) in DSA_get0_key() 205 *priv_key = d->priv_key; in DSA_get0_key() 211 DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) in DSA_set0_key() argument 220 if (priv_key != NULL) { in DSA_set0_key() 221 BN_free(d->priv_key); in DSA_set0_key() 222 d->priv_key = priv_key; in DSA_set0_key() 489 DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) in DH_get0_key() argument 493 if (priv_key != NULL) in DH_get0_key() 494 *priv_key = dh->priv_key; in DH_get0_key() [all …]
|
D | openssl-compat.h | 108 const BIGNUM **priv_key); 112 int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); 179 void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key); 183 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
|
/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/rust/crates/quiche/deps/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()
|
/external/rust/crates/quiche/deps/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()
|
/external/tpm2-tss/test/integration/ |
D | fapi-data-crypt.int.c | 108 EVP_PKEY *priv_key = NULL; in signatureCallback() local 119 priv_key = PEM_read_bio_PrivateKey(bufio, NULL, NULL, NULL); in signatureCallback() 120 chknull(priv_key); in signatureCallback() 125 if (1 != EVP_DigestSignInit(mdctx, &pctx, NULL, NULL, priv_key)) { in signatureCallback() 129 if (EVP_PKEY_type(EVP_PKEY_id(priv_key)) == EVP_PKEY_RSA) { in signatureCallback() 136 if (1 != EVP_DigestSignInit(mdctx, &pctx, ossl_hash, NULL, priv_key)) { in signatureCallback() 155 if (priv_key) in signatureCallback() 156 EVP_PKEY_free(priv_key); in signatureCallback()
|
D | fapi-key-create-policy-signed.int.c | 122 EVP_PKEY *priv_key = NULL; in signatureCallback() local 133 priv_key = PEM_read_bio_PrivateKey(bufio, NULL, NULL, NULL); in signatureCallback() 134 chknull(priv_key); in signatureCallback() 139 if (1 != EVP_DigestSignInit(mdctx, &pctx, NULL, NULL, priv_key)) { in signatureCallback() 143 if (EVP_PKEY_type(EVP_PKEY_id(priv_key)) == EVP_PKEY_RSA) { in signatureCallback() 150 if (1 != EVP_DigestSignInit(mdctx, &pctx, ossl_hash, NULL, priv_key)) { in signatureCallback() 169 if (priv_key) in signatureCallback() 170 EVP_PKEY_free(priv_key); in signatureCallback()
|
/external/rust/crates/quiche/deps/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/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() 148 if (!BN_parse_asn1_unsigned(key, dsa->priv_key) || in dsa_priv_decode() 150 BN_cmp(dsa->priv_key, dsa->q) >= 0) { in dsa_priv_decode() 158 !BN_mod_exp_mont_consttime(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, in dsa_priv_decode() 175 if (dsa == NULL || dsa->priv_key == NULL) { in dsa_priv_encode() 189 !BN_marshal_asn1(&private_key, dsa->priv_key) || in dsa_priv_encode()
|
/external/boringssl/src/crypto/dsa/ |
D | dsa.c | 121 BN_clear_free(dsa->priv_key); in DSA_free() 135 const BIGNUM *DSA_get0_priv_key(const DSA *dsa) { return dsa->priv_key; } in DSA_get0_priv_key() 149 *out_priv_key = dsa->priv_key; in DSA_get0_key() 166 int DSA_set0_key(DSA *dsa, BIGNUM *pub_key, BIGNUM *priv_key) { in DSA_set0_key() argument 175 if (priv_key != NULL) { in DSA_set0_key() 176 BN_free(dsa->priv_key); in DSA_set0_key() 177 dsa->priv_key = priv_key; in DSA_set0_key() 482 BIGNUM *pub_key = NULL, *priv_key = NULL; in DSA_generate_key() local 489 priv_key = dsa->priv_key; in DSA_generate_key() 490 if (priv_key == NULL) { in DSA_generate_key() [all …]
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/dsa/ |
D | dsa.c | 122 BN_clear_free(dsa->priv_key); in DSA_free() 136 const BIGNUM *DSA_get0_priv_key(const DSA *dsa) { return dsa->priv_key; } in DSA_get0_priv_key() 150 *out_priv_key = dsa->priv_key; in DSA_get0_key() 167 int DSA_set0_key(DSA *dsa, BIGNUM *pub_key, BIGNUM *priv_key) { in DSA_set0_key() argument 176 if (priv_key != NULL) { in DSA_set0_key() 177 BN_free(dsa->priv_key); in DSA_set0_key() 178 dsa->priv_key = priv_key; in DSA_set0_key() 483 BIGNUM *pub_key = NULL, *priv_key = NULL; in DSA_generate_key() local 490 priv_key = dsa->priv_key; in DSA_generate_key() 491 if (priv_key == NULL) { in DSA_generate_key() [all …]
|
/external/python/rsa/rsa/ |
D | pkcs1.py | 196 def decrypt(crypto: bytes, priv_key: key.PrivateKey) -> bytes: 247 blocksize = common.byte_size(priv_key.n) 249 decrypted = priv_key.blinded_decrypt(encrypted) 279 def sign_hash(hash_value: bytes, priv_key: key.PrivateKey, hash_method: str) -> bytes: 302 keylength = common.byte_size(priv_key.n) 306 encrypted = priv_key.blinded_encrypt(payload) 312 def sign(message: bytes, priv_key: key.PrivateKey, hash_method: str) -> bytes: 331 return sign_hash(msg_hash, priv_key, hash_method)
|
D | cli.py | 67 (pub_key, priv_key) = rsa.newkeys(keysize) 77 data = priv_key.save_pkcs1(format=cli.form) 221 def perform_operation(self, indata: bytes, priv_key: rsa.key.AbstractKey, 224 assert isinstance(priv_key, rsa.key.PrivateKey) 225 return rsa.decrypt(indata, priv_key) 244 def perform_operation(self, indata: bytes, priv_key: rsa.key.AbstractKey, 247 assert isinstance(priv_key, rsa.key.PrivateKey) 254 return rsa.sign(indata, priv_key, hash_method)
|
D | util.py | 61 priv_key = rsa.key.PrivateKey.load_pkcs1(in_data, cli.inform) 62 pub_key = rsa.key.PublicKey(priv_key.n, priv_key.e)
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/ecdsa/ |
D | ecdsa.c | 203 size_t digest_len, const EC_SCALAR *priv_key) { in ecdsa_sign_setup() argument 234 SHA512_Update(&sha, priv_key->words, order->width * sizeof(BN_ULONG)); in ecdsa_sign_setup() 271 if (group == NULL || eckey->priv_key == NULL) { in ECDSA_do_sign() 276 const EC_SCALAR *priv_key = &eckey->priv_key->scalar; in ECDSA_do_sign() local 289 priv_key) || in ECDSA_do_sign() 298 ec_scalar_mul_montgomery(group, &s, priv_key, &r_mont); in ECDSA_do_sign()
|
/external/boringssl/src/crypto/fipsmodule/ecdsa/ |
D | ecdsa.c | 203 size_t digest_len, const EC_SCALAR *priv_key) { in ecdsa_sign_setup() argument 234 SHA512_Update(&sha, priv_key->words, order->width * sizeof(BN_ULONG)); in ecdsa_sign_setup() 271 if (group == NULL || eckey->priv_key == NULL) { in ECDSA_do_sign() 276 const EC_SCALAR *priv_key = &eckey->priv_key->scalar; in ECDSA_do_sign() local 289 priv_key) || in ECDSA_do_sign() 298 ec_scalar_mul_montgomery(group, &s, priv_key, &r_mont); in ECDSA_do_sign()
|
/external/boringssl/src/crypto/dh_extra/ |
D | dh_test.cc | 157 BN_print_fp(stdout, a->priv_key); in RunBasicTests() 166 BN_print_fp(stdout, b->priv_key); in RunBasicTests() 463 bssl::UniquePtr<BIGNUM> priv_key(BN_new()), peer_key(BN_new()); in TEST() local 464 ASSERT_TRUE(priv_key); in TEST() 465 ASSERT_TRUE(BN_set_word(priv_key.get(), 2)); in TEST() 468 ASSERT_TRUE(DH_set0_key(dh.get(), /*pub_key=*/nullptr, priv_key.get())); in TEST() 469 priv_key.release(); in TEST()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/netscape/ |
D | NetscapeCertRequest.java | 213 public void sign(PrivateKey priv_key) throws NoSuchAlgorithmException, in sign() argument 217 sign(priv_key, null); in sign() 220 public void sign(PrivateKey priv_key, SecureRandom rand) in sign() argument 229 sig.initSign(priv_key, rand); in sign() 233 sig.initSign(priv_key); in sign()
|