/external/chromium-trace/catapult/third_party/gsutil/third_party/rsa/rsa/ |
H A D | bigfile.py | 70 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 D | pkcs1.py | 154 >>> (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 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)
|
H A D | cli.py | 68 (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 D | ec_key.c | 153 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 D | ec_asn1.c | 288 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...] |
/external/boringssl/include/openssl/ |
H A D | ecdh.h | 82 /* 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 D | dh.h | 207 BIGNUM *priv_key; /* x */ member in struct:dh_st
|
H A D | dsa.h | 320 BIGNUM *priv_key; /* x private key */ member in struct:dsa_st
|
/external/boringssl/src/include/openssl/ |
H A D | ecdh.h | 82 /* 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 D | dh.h | 207 BIGNUM *priv_key; /* x */ member in struct:dh_st
|
H A D | dsa.h | 320 BIGNUM *priv_key; /* x private key */ member in struct:dsa_st
|
/external/chromium-trace/catapult/third_party/gsutil/third_party/rsa/tests/ |
H A D | test_bigfile.py | 18 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 D | dh.c | 112 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 D | dh_test.cc | 154 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 D | ecdh.c | 78 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 D | p_dsa_asn1.c | 209 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 D | p_ec_asn1.c | 241 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 D | NetscapeCertRequest.java | 214 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 D | dsa.c | 121 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 D | dsa_asn1.c | 118 ASN1_SIMPLE(DSA, priv_key, BIGNUM)} ASN1_SEQUENCE_END_cb(DSA,
|
H A D | dsa_test.c | 177 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 D | ecdsa.c | 365 const BIGNUM *priv_key; local 373 priv_key = EC_KEY_get0_private_key(eckey); 375 if (group == NULL || priv_key == NULL) { 414 if (!BN_mod_mul(tmp, priv_key, ret->r, order, ctx)) {
|
/external/boringssl/src/ssl/ |
H A D | ssl_ecdh.c | 219 assert(dh->priv_key == NULL); 233 assert(dh->priv_key != NULL);
|
/external/curl/lib/vtls/ |
H A D | openssl.c | 560 EVP_PKEY *priv_key = NULL; local 574 priv_key = (EVP_PKEY *) 579 if(!priv_key) { 583 if(SSL_CTX_use_PrivateKey(ctx, priv_key) != 1) { 585 EVP_PKEY_free(priv_key); 588 EVP_PKEY_free(priv_key); /* we don't need the handle any more... */ 2524 const BIGNUM *priv_key; local 2528 DSA_get0_key(dsa, &pub_key, &priv_key); 2533 print_pubkey_BN(dsa, priv_key, i); 2540 print_pubkey_BN(dsa, priv_key, 2558 const BIGNUM *priv_key; local [all...] |