Searched refs:priv_key (Results 1 - 25 of 32) sorted by relevance

12

/external/chromium-trace/catapult/third_party/gsutil/third_party/rsa/rsa/
H A Dbigfile.py70 def decrypt_bigfile(infile, outfile, priv_key):
75 :param priv_key: :py:class:`rsa.PrivateKey` to decrypt with
79 if not isinstance(priv_key, key.PrivateKey):
80 raise TypeError('Private key required, but got %r' % priv_key)
83 cleartext = pkcs1.decrypt(block, priv_key)
H A Dpkcs1.py154 >>> (pub_key, priv_key) = key.newkeys(256)
174 def decrypt(crypto, priv_key):
182 :param priv_key: the :py:class:`rsa.PrivateKey` to decrypt with.
189 >>> (pub_key, priv_key) = rsa.newkeys(256)
194 >>> decrypt(crypto, priv_key)
200 >>> decrypt(crypto, priv_key)
218 >>> decrypt(crypto, priv_key)
225 blocksize = common.byte_size(priv_key.n)
227 decrypted = core.decrypt_int(encrypted, priv_key.d, priv_key
[all...]
H A Dutil.py65 priv_key = rsa.key.PrivateKey.load_pkcs1(in_data, cli.inform)
66 pub_key = rsa.key.PublicKey(priv_key.n, priv_key.e)
H A Dcli.py68 (pub_key, priv_key) = rsa.newkeys(keysize)
79 data = priv_key.save_pkcs1(format=cli.form)
224 def perform_operation(self, indata, priv_key, cli_args=None):
227 return rsa.decrypt(indata, priv_key)
245 def perform_operation(self, indata, priv_key, cli_args):
253 return rsa.sign(indata, priv_key, hash_method)
367 def perform_operation(self, infile, outfile, priv_key, cli_args=None):
370 return rsa.bigfile.decrypt_bigfile(infile, outfile, priv_key)
/external/boringssl/src/crypto/ec/
H A Dec_key.c153 BN_clear_free(r->priv_key);
186 if (src->priv_key) {
187 if (dest->priv_key == NULL) {
188 dest->priv_key = BN_new();
189 if (dest->priv_key == NULL) {
193 if (!BN_copy(dest->priv_key, src->priv_key)) {
250 if (key->priv_key != NULL &&
251 BN_cmp(key->priv_key, EC_GROUP_get0_order(group)) >= 0) {
258 return key->priv_key;
261 EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key) argument
411 BIGNUM *priv_key = NULL; local
[all...]
H A Dec_asn1.c288 EC_PRIVATEKEY *priv_key = NULL; local
291 priv_key = d2i_EC_PRIVATEKEY(NULL, &in, len);
292 if (priv_key == NULL) {
307 if (priv_key->parameters) {
309 ret->group = ec_asn1_pkparameters2group(priv_key->parameters);
317 ret->version = priv_key->version;
319 if (priv_key->privateKey) {
320 ret->priv_key =
321 BN_bin2bn(M_ASN1_STRING_data(priv_key->privateKey),
322 M_ASN1_STRING_length(priv_key
395 EC_PRIVATEKEY *priv_key = NULL; local
[all...]
H A Dinternal.h276 BIGNUM *priv_key; member in struct:ec_key_st
/external/boringssl/include/openssl/
H A Decdh.h82 /* ECDH_compute_key calculates the shared key between |pub_key| and |priv_key|.
89 const EC_POINT *pub_key, EC_KEY *priv_key,
H A Ddh.h207 BIGNUM *priv_key; /* x */ member in struct:dh_st
H A Ddsa.h320 BIGNUM *priv_key; /* x private key */ member in struct:dsa_st
/external/boringssl/src/include/openssl/
H A Decdh.h82 /* ECDH_compute_key calculates the shared key between |pub_key| and |priv_key|.
89 const EC_POINT *pub_key, EC_KEY *priv_key,
H A Ddh.h207 BIGNUM *priv_key; /* x */ member in struct:dh_st
H A Ddsa.h320 BIGNUM *priv_key; /* x private key */ member in struct:dsa_st
/external/chromium-trace/catapult/third_party/gsutil/third_party/rsa/tests/
H A Dtest_bigfile.py18 pub_key, priv_key = rsa.newkeys((6 + 11) * 8)
33 bigfile.decrypt_bigfile(cryptfile, clearfile, priv_key)
46 pub_key, priv_key = rsa.newkeys((34 + 11) * 8)
50 signature = pkcs1.sign(msgfile, priv_key, 'MD5')
/external/boringssl/src/crypto/dh/
H A Ddh.c112 BN_clear_free(dh->priv_key);
240 BIGNUM *pub_key = NULL, *priv_key = NULL; local
253 if (dh->priv_key == NULL) {
254 priv_key = BN_new();
255 if (priv_key == NULL) {
260 priv_key = dh->priv_key;
281 if (!BN_rand_range(priv_key, dh->q)) {
284 } while (BN_is_zero(priv_key) || BN_is_one(priv_key));
[all...]
H A Ddh_test.cc154 BN_print_fp(stdout, a->priv_key);
163 BN_print_fp(stdout, b->priv_key);
440 dhA->priv_key = BN_bin2bn(td->xA, td->xA_len, nullptr);
443 dhB->priv_key = BN_bin2bn(td->xB, td->xB_len, nullptr);
446 if (!dhA->priv_key || !dhA->pub_key || !dhB->priv_key || !dhB->pub_key) {
/external/boringssl/src/crypto/ecdh/
H A Decdh.c78 EC_KEY *priv_key,
81 const BIGNUM *const priv = EC_KEY_get0_private_key(priv_key);
97 const EC_GROUP *const group = EC_KEY_get0_group(priv_key);
77 ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, EC_KEY *priv_key, void *(*kdf)(const void *in, size_t inlen, void *out, size_t *outlen)) argument
/external/boringssl/src/crypto/evp/
H A Dp_dsa_asn1.c209 dsa->priv_key = ASN1_INTEGER_to_BN(privkey, NULL);
210 if (dsa->priv_key == NULL) {
226 if (!BN_mod_exp(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, ctx)) {
253 if (!pkey->pkey.dsa || !pkey->pkey.dsa->priv_key) {
272 prkey = BN_to_ASN1_INTEGER(pkey->pkey.dsa->priv_key, NULL);
368 const BIGNUM *priv_key, *pub_key; local
370 priv_key = NULL;
372 priv_key = x->priv_key;
390 update_buflen(priv_key,
[all...]
H A Dp_ec_asn1.c241 const BIGNUM *priv_key; local
257 priv_key = EC_KEY_get0_private_key(eckey);
258 if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, NULL)) {
382 const BIGNUM *priv_key; local
423 priv_key = EC_KEY_get0_private_key(x);
424 if (priv_key && (i = (size_t)BN_num_bytes(priv_key)) > buf_len) {
428 priv_key = NULL;
454 if ((priv_key != NULL) &&
455 !ASN1_bn_print(bp, "priv:", priv_key, buffe
[all...]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/netscape/
H A DNetscapeCertRequest.java214 public void sign(PrivateKey priv_key) throws NoSuchAlgorithmException, argument
218 sign(priv_key, null);
221 public void sign(PrivateKey priv_key, SecureRandom rand) argument
231 sig.initSign(priv_key, rand);
235 sig.initSign(priv_key);
/external/boringssl/src/crypto/dsa/
H A Ddsa.c121 BN_clear_free(dsa->priv_key);
399 BIGNUM *pub_key = NULL, *priv_key = NULL; local
407 priv_key = dsa->priv_key;
408 if (priv_key == NULL) {
409 priv_key = BN_new();
410 if (priv_key == NULL) {
416 if (!BN_rand_range(priv_key, dsa->q)) {
419 } while (BN_is_zero(priv_key));
430 BN_with_flags(&prk, priv_key, BN_FLG_CONSTTIM
[all...]
H A Ddsa_asn1.c118 ASN1_SIMPLE(DSA, priv_key, BIGNUM)} ASN1_SEQUENCE_END_cb(DSA,
H A Ddsa_test.c177 dsa->priv_key = BN_bin2bn(fips_x, sizeof(fips_x), NULL);
179 dsa->pub_key == NULL || dsa->priv_key == NULL) {
/external/boringssl/src/crypto/ecdsa/
H A Decdsa.c373 const BIGNUM *priv_key; local
381 priv_key = EC_KEY_get0_private_key(eckey);
383 if (group == NULL || priv_key == NULL) {
422 if (!BN_mod_mul(tmp, priv_key, ret->r, order, ctx)) {
/external/boringssl/src/ssl/
H A Dssl_ecdh.c219 assert(dh->priv_key == NULL);
233 assert(dh->priv_key != NULL);

Completed in 1589 milliseconds

12