Home
last modified time | relevance | path

Searched refs:priv_key (Results 1 – 25 of 97) sorted by relevance

1234

/external/cronet/third_party/boringssl/src/crypto/fipsmodule/dh/
Ddh.c104 BN_clear_free(dh->priv_key); in DH_free()
114 const BIGNUM *DH_get0_priv_key(const DH *dh) { return dh->priv_key; } in DH_get0_priv_key()
128 *out_priv_key = dh->priv_key; in DH_get0_key()
132 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) { in DH_set0_key() argument
138 if (priv_key != NULL) { in DH_set0_key()
139 BN_free(dh->priv_key); in DH_set0_key()
140 dh->priv_key = priv_key; in DH_set0_key()
194 BIGNUM *pub_key = NULL, *priv_key = NULL; in DH_generate_key() local
206 if (dh->priv_key == NULL) { in DH_generate_key()
207 priv_key = BN_new(); in DH_generate_key()
[all …]
/external/boringssl/src/crypto/fipsmodule/dh/
Ddh.c104 BN_clear_free(dh->priv_key); in DH_free()
114 const BIGNUM *DH_get0_priv_key(const DH *dh) { return dh->priv_key; } in DH_get0_priv_key()
128 *out_priv_key = dh->priv_key; in DH_get0_key()
132 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) { in DH_set0_key() argument
138 if (priv_key != NULL) { in DH_set0_key()
139 BN_free(dh->priv_key); in DH_set0_key()
140 dh->priv_key = priv_key; in DH_set0_key()
194 BIGNUM *pub_key = NULL, *priv_key = NULL; in DH_generate_key() local
206 if (dh->priv_key == NULL) { in DH_generate_key()
207 priv_key = BN_new(); in DH_generate_key()
[all …]
/external/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/dh/
Ddh.c106 BN_clear_free(dh->priv_key); in DH_free()
114 const BIGNUM *DH_get0_priv_key(const DH *dh) { return dh->priv_key; } in DH_get0_priv_key()
128 *out_priv_key = dh->priv_key; in DH_get0_key()
132 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) { in DH_set0_key() argument
138 if (priv_key != NULL) { in DH_set0_key()
139 BN_free(dh->priv_key); in DH_set0_key()
140 dh->priv_key = priv_key; in DH_set0_key()
192 BIGNUM *pub_key = NULL, *priv_key = NULL; in DH_generate_key() local
204 if (dh->priv_key == NULL) { in DH_generate_key()
205 priv_key = BN_new(); in DH_generate_key()
[all …]
/external/boringssl/src/crypto/fipsmodule/ec/
Dec_key.c171 ec_wrapped_scalar_free(r->priv_key); in EC_KEY_free()
193 (src->priv_key != NULL && in EC_KEY_dup()
225 assert(key->priv_key == NULL); in EC_KEY_set_group()
234 return key->priv_key != NULL ? &key->priv_key->bignum : NULL; in EC_KEY_get0_private_key()
237 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key) { in EC_KEY_set_private_key() argument
247 if (!ec_bignum_to_scalar(key->group, &scalar->scalar, priv_key) || in EC_KEY_set_private_key()
253 ec_wrapped_scalar_free(key->priv_key); in EC_KEY_set_private_key()
254 key->priv_key = scalar; in EC_KEY_set_private_key()
313 if (eckey->priv_key != NULL) { in EC_KEY_check_key()
316 &eckey->priv_key->scalar)) { in EC_KEY_check_key()
[all …]
/external/cronet/third_party/boringssl/src/crypto/fipsmodule/ec/
Dec_key.c171 ec_wrapped_scalar_free(r->priv_key); in EC_KEY_free()
193 (src->priv_key != NULL && in EC_KEY_dup()
225 assert(key->priv_key == NULL); in EC_KEY_set_group()
234 return key->priv_key != NULL ? &key->priv_key->bignum : NULL; in EC_KEY_get0_private_key()
237 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key) { in EC_KEY_set_private_key() argument
247 if (!ec_bignum_to_scalar(key->group, &scalar->scalar, priv_key) || in EC_KEY_set_private_key()
253 ec_wrapped_scalar_free(key->priv_key); in EC_KEY_set_private_key()
254 key->priv_key = scalar; in EC_KEY_set_private_key()
313 if (eckey->priv_key != NULL) { in EC_KEY_check_key()
316 &eckey->priv_key->scalar)) { in EC_KEY_check_key()
[all …]
/external/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/ec/
Dec_key.c173 ec_wrapped_scalar_free(r->priv_key); in EC_KEY_free()
195 (src->priv_key != NULL && in EC_KEY_dup()
227 assert(key->priv_key == NULL); in EC_KEY_set_group()
236 return key->priv_key != NULL ? &key->priv_key->bignum : NULL; in EC_KEY_get0_private_key()
239 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key) { in EC_KEY_set_private_key() argument
249 if (!ec_bignum_to_scalar(key->group, &scalar->scalar, priv_key)) { in EC_KEY_set_private_key()
254 ec_wrapped_scalar_free(key->priv_key); in EC_KEY_set_private_key()
255 key->priv_key = scalar; in EC_KEY_set_private_key()
311 if (eckey->priv_key != NULL) { in EC_KEY_check_key()
314 &eckey->priv_key->scalar)) { in EC_KEY_check_key()
[all …]
/external/rust/crates/openssl/src/
Ddsa.rs132 pub fn priv_key(&self) -> &BigNumRef { in priv_key() function
134 let mut priv_key = ptr::null(); in priv_key() localVariable
135 DSA_get0_key(self.as_ptr(), ptr::null_mut(), &mut priv_key); in priv_key()
136 BigNumRef::from_const_ptr(priv_key) in priv_key()
223 priv_key: BigNum, in from_private_components()
231 cvt(DSA_set0_key(dsa.0, pub_key.as_ptr(), priv_key.as_ptr()))?; in from_private_components()
232 mem::forget((pub_key, priv_key)); in from_private_components()
311 priv_key: *mut *const ffi::BIGNUM)
316 if !priv_key.is_null() {
317 *priv_key = (*d).priv_key;
[all …]
Ddh.rs70 pub fn set_private_key(self, priv_key: BigNum) -> Result<Dh<Private>, ErrorStack> { in set_private_key()
73 cvt(DH_set0_key(dh_ptr, ptr::null_mut(), priv_key.as_ptr()))?; in set_private_key()
74 mem::forget(priv_key); in set_private_key()
233 let mut priv_key = ptr::null(); in private_key() localVariable
235 DH_get0_key(self.as_ptr(), ptr::null_mut(), &mut priv_key); in private_key()
236 BigNumRef::from_ptr(priv_key as *mut _) in private_key()
280 priv_key: *mut ffi::BIGNUM,
283 (*dh).priv_key = priv_key;
291 priv_key: *mut *const ffi::BIGNUM,
296 if !priv_key.is_null() {
[all …]
/external/cronet/third_party/boringssl/src/crypto/fipsmodule/ecdh/
Decdh.c83 const EC_KEY *priv_key) { in ECDH_compute_key_fips() argument
86 if (priv_key->priv_key == NULL) { in ECDH_compute_key_fips()
90 const EC_SCALAR *const priv = &priv_key->priv_key->scalar; in ECDH_compute_key_fips()
91 const EC_GROUP *const group = EC_KEY_get0_group(priv_key); in ECDH_compute_key_fips()
128 ECDH_verify_service_indicator(priv_key); in ECDH_compute_key_fips()
/external/boringssl/src/crypto/fipsmodule/ecdh/
Decdh.c83 const EC_KEY *priv_key) { in ECDH_compute_key_fips() argument
86 if (priv_key->priv_key == NULL) { in ECDH_compute_key_fips()
90 const EC_SCALAR *const priv = &priv_key->priv_key->scalar; in ECDH_compute_key_fips()
91 const EC_GROUP *const group = EC_KEY_get0_group(priv_key); in ECDH_compute_key_fips()
128 ECDH_verify_service_indicator(priv_key); in ECDH_compute_key_fips()
/external/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/ecdh/
Decdh.c81 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/cronet/third_party/boringssl/src/crypto/ecdh_extra/
Decdh_extra.c81 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/boringssl/src/crypto/ecdh_extra/
Decdh_extra.c81 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/
Decdh_extra.c81 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/cronet/third_party/boringssl/src/crypto/dsa/
Ddsa.c121 BN_clear_free(dsa->priv_key); in DSA_free()
137 const BIGNUM *DSA_get0_priv_key(const DSA *dsa) { return dsa->priv_key; } in DSA_get0_priv_key()
151 *out_priv_key = dsa->priv_key; in DSA_get0_key()
168 int DSA_set0_key(DSA *dsa, BIGNUM *pub_key, BIGNUM *priv_key) { in DSA_set0_key() argument
177 if (priv_key != NULL) { in DSA_set0_key()
178 BN_free(dsa->priv_key); in DSA_set0_key()
179 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/boringssl/src/crypto/dsa/
Ddsa.c121 BN_clear_free(dsa->priv_key); in DSA_free()
137 const BIGNUM *DSA_get0_priv_key(const DSA *dsa) { return dsa->priv_key; } in DSA_get0_priv_key()
151 *out_priv_key = dsa->priv_key; in DSA_get0_key()
168 int DSA_set0_key(DSA *dsa, BIGNUM *pub_key, BIGNUM *priv_key) { in DSA_set0_key() argument
177 if (priv_key != NULL) { in DSA_set0_key()
178 BN_free(dsa->priv_key); in DSA_set0_key()
179 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/fipsmodule/ecdsa/
Decdsa.c203 const EC_SCALAR *priv_key, const EC_SCALAR *k, in ecdsa_sign_impl() argument
233 ec_scalar_mul_montgomery(group, &s, priv_key, &s); in ecdsa_sign_impl()
276 if (group == NULL || eckey->priv_key == NULL) { in ecdsa_sign_with_nonce_for_known_answer_test()
280 const EC_SCALAR *priv_key = &eckey->priv_key->scalar; in ecdsa_sign_with_nonce_for_known_answer_test() local
287 return ecdsa_sign_impl(group, &retry_ignored, priv_key, &k, digest, in ecdsa_sign_with_nonce_for_known_answer_test()
308 if (group == NULL || eckey->priv_key == NULL) { in ECDSA_do_sign()
313 const EC_SCALAR *priv_key = &eckey->priv_key->scalar; in ECDSA_do_sign() local
322 SHA512_Update(&sha, priv_key->words, order->width * sizeof(BN_ULONG)); in ECDSA_do_sign()
334 ecdsa_sign_impl(group, &retry, priv_key, &k, digest, digest_len); in ECDSA_do_sign()
/external/boringssl/src/crypto/fipsmodule/ecdsa/
Decdsa.c206 const EC_SCALAR *priv_key, const EC_SCALAR *k, in ecdsa_sign_impl() argument
236 ec_scalar_mul_montgomery(group, &s, priv_key, &s); in ecdsa_sign_impl()
279 if (group == NULL || eckey->priv_key == NULL) { in ecdsa_sign_with_nonce_for_known_answer_test()
283 const EC_SCALAR *priv_key = &eckey->priv_key->scalar; in ecdsa_sign_with_nonce_for_known_answer_test() local
290 return ecdsa_sign_impl(group, &retry_ignored, priv_key, &k, digest, in ecdsa_sign_with_nonce_for_known_answer_test()
315 if (group == NULL || eckey->priv_key == NULL) { in ECDSA_do_sign()
320 const EC_SCALAR *priv_key = &eckey->priv_key->scalar; in ECDSA_do_sign() local
332 SHA512_Update(&sha, priv_key->words, order->width * sizeof(BN_ULONG)); in ECDSA_do_sign()
351 ret = ecdsa_sign_impl(group, &retry, priv_key, &k, digest, digest_len); in ECDSA_do_sign()
/external/cronet/third_party/boringssl/src/crypto/fipsmodule/ecdsa/
Decdsa.c206 const EC_SCALAR *priv_key, const EC_SCALAR *k, in ecdsa_sign_impl() argument
236 ec_scalar_mul_montgomery(group, &s, priv_key, &s); in ecdsa_sign_impl()
279 if (group == NULL || eckey->priv_key == NULL) { in ecdsa_sign_with_nonce_for_known_answer_test()
283 const EC_SCALAR *priv_key = &eckey->priv_key->scalar; in ecdsa_sign_with_nonce_for_known_answer_test() local
290 return ecdsa_sign_impl(group, &retry_ignored, priv_key, &k, digest, in ecdsa_sign_with_nonce_for_known_answer_test()
315 if (group == NULL || eckey->priv_key == NULL) { in ECDSA_do_sign()
320 const EC_SCALAR *priv_key = &eckey->priv_key->scalar; in ECDSA_do_sign() local
332 SHA512_Update(&sha, priv_key->words, order->width * sizeof(BN_ULONG)); in ECDSA_do_sign()
351 ret = ecdsa_sign_impl(group, &retry, priv_key, &k, digest, digest_len); in ECDSA_do_sign()
/external/rust/crates/quiche/deps/boringssl/src/crypto/dsa/
Ddsa.c121 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/openthread/third_party/mbedtls/repo/library/
Dpkcs11.c96 int mbedtls_pkcs11_priv_key_bind( mbedtls_pkcs11_context *priv_key, in mbedtls_pkcs11_priv_key_bind() argument
104 if( priv_key == NULL ) in mbedtls_pkcs11_priv_key_bind()
110 priv_key->len = mbedtls_pk_get_len( &cert.pk ); in mbedtls_pkcs11_priv_key_bind()
111 priv_key->pkcs11h_cert = pkcs11_cert; in mbedtls_pkcs11_priv_key_bind()
121 void mbedtls_pkcs11_priv_key_free( mbedtls_pkcs11_context *priv_key ) in mbedtls_pkcs11_priv_key_free() argument
123 if( NULL != priv_key ) in mbedtls_pkcs11_priv_key_free()
124 pkcs11h_certificate_freeCertificate( priv_key->pkcs11h_cert ); in mbedtls_pkcs11_priv_key_free()
/external/rust/crates/quiche/deps/boringssl/src/crypto/evp/
Dprint.c223 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 …]
/external/tpm2-tss/test/integration/
Dfapi-key-create-policy-signed.int.c122 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()
Dfapi-data-crypt.int.c108 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()
/external/python/rsa/rsa/
Dpkcs1.py196 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)

1234