/external/python/cryptography/tests/hazmat/primitives/ |
D | test_rsa.py | 277 private_key = serialization.load_der_private_key( 281 decrypted = private_key.decrypt( 309 private_key = RSA_KEY_2048.private_key(backend) 310 ct = private_key.public_key().encrypt( 318 pt = private_key.decrypt( 343 private_key = RSA_KEY_2048.private_key(backend) 345 ct = private_key.public_key().encrypt( 354 private_key.decrypt( 374 private_key = RSA_KEY_512.private_key(backend) 376 private_key.decrypt( [all …]
|
D | test_dsa.py | 282 ).private_key(backend) 377 ).private_key(backend) 446 private_key = DSA_KEY_1024.private_key(backend) 447 signature = private_key.sign(message, algorithm) 448 public_key = private_key.public_key() 452 private_key = DSA_KEY_1024.private_key(backend) 458 signature = private_key.sign(message, hashes.SHA1()) 459 public_key = private_key.public_key() 463 private_key = DSA_KEY_1024.private_key(backend) 464 public_key = private_key.public_key() [all …]
|
/external/vboot_reference/tests/ |
D | vboot_common2_tests.c | 44 const VbPrivateKey *private_key) in VerifyDataTest() argument 51 sig = CalculateSignature(test_data, test_size, private_key); in VerifyDataTest() 80 const VbPrivateKey *private_key) in VerifyDigestTest() argument 87 sig = CalculateSignature(test_data, sizeof(test_data), private_key); in VerifyDigestTest() 119 const VbPrivateKey *private_key) in VerifyKernelPreambleTest() argument 131 0, 0, 0, 0, private_key); in VerifyKernelPreambleTest() 150 ReSignKernelPreamble(h, private_key); in VerifyKernelPreambleTest() 156 ReSignKernelPreamble(h, private_key); in VerifyKernelPreambleTest() 162 ReSignKernelPreamble(h, private_key); in VerifyKernelPreambleTest() 168 ReSignKernelPreamble(h, private_key); in VerifyKernelPreambleTest() [all …]
|
D | vb20_common3_tests.c | 33 const VbPrivateKey *private_key, in test_verify_keyblock() argument 52 KeyBlockCreate(data_key, private_key, 0x1234); in test_verify_keyblock() 80 resign_keyblock(h, private_key); in test_verify_keyblock() 87 resign_keyblock(h, private_key); in test_verify_keyblock() 94 resign_keyblock(h, private_key); in test_verify_keyblock() 100 resign_keyblock(h, private_key); in test_verify_keyblock() 107 resign_keyblock(h, private_key); in test_verify_keyblock() 114 resign_keyblock(h, private_key); in test_verify_keyblock() 136 resign_keyblock(h, private_key); in test_verify_keyblock() 143 resign_keyblock(h, private_key); in test_verify_keyblock() [all …]
|
D | vboot_common3_tests.c | 31 const VbPrivateKey *private_key, in KeyBlockVerifyTest() argument 38 hdr = KeyBlockCreate(data_key, private_key, 0x1234); in KeyBlockVerifyTest() 167 const VbPrivateKey *private_key, in VerifyFirmwarePreambleTest() argument 180 private_key, 0x5678); in VerifyFirmwarePreambleTest() 199 ReSignFirmwarePreamble(h, private_key); in VerifyFirmwarePreambleTest() 205 ReSignFirmwarePreamble(h, private_key); in VerifyFirmwarePreambleTest() 211 ReSignFirmwarePreamble(h, private_key); in VerifyFirmwarePreambleTest() 217 ReSignFirmwarePreamble(h, private_key); in VerifyFirmwarePreambleTest() 224 ReSignFirmwarePreamble(h, private_key); in VerifyFirmwarePreambleTest() 230 ReSignFirmwarePreamble(h, private_key); in VerifyFirmwarePreambleTest() [all …]
|
/external/python/cryptography/tests/x509/ |
D | test_x509_crlbuilder.py | 57 private_key = RSA_KEY_2048.private_key(backend) 73 crl = builder.sign(private_key, hashes.SHA256(), backend) 101 private_key = RSA_KEY_2048.private_key(backend) 117 crl = builder.sign(private_key, hashes.SHA256(), backend) 174 private_key = RSA_KEY_2048.private_key(backend) 182 builder.sign(private_key, hashes.SHA256(), backend) 187 private_key = RSA_KEY_2048.private_key(backend) 197 builder.sign(private_key, hashes.SHA256(), backend) 202 private_key = RSA_KEY_2048.private_key(backend) 212 builder.sign(private_key, hashes.SHA256(), backend) [all …]
|
D | test_ocsp.py | 47 def _generate_root(private_key=None, algorithm=hashes.SHA256()): argument 50 if private_key is None: 51 private_key = EC_KEY_SECP256R1.private_key(backend) 65 .public_key(private_key.public_key()) 72 cert = builder.sign(private_key, algorithm, backend) 73 return cert, private_key 396 root_cert, private_key = _generate_root() 401 builder.sign(private_key, hashes.SHA256()) 406 _, private_key = _generate_root() 421 builder.sign(private_key, hashes.SHA256()) [all …]
|
D | test_x509.py | 644 private_key = RSA_KEY_2048.private_key(backend) 669 crl = builder.sign(private_key, hashes.SHA256(), backend) 1642 issuer_private_key = RSA_KEY_2048.private_key(backend) 1643 subject_private_key = RSA_KEY_2048.private_key(backend) 1714 issuer_private_key = RSA_KEY_2048.private_key(backend) 1715 subject_private_key = RSA_KEY_2048.private_key(backend) 1763 issuer_private_key = RSA_KEY_2048.private_key(backend) 1764 subject_private_key = RSA_KEY_2048.private_key(backend) 1834 private_key = RSA_KEY_2048.private_key(backend) 1843 .public_key(private_key.public_key()) [all …]
|
/external/libchrome/crypto/ |
D | nss_key_util_unittest.cc | 38 ScopedSECKEYPrivateKey private_key; in TEST_F() local 41 &private_key)); in TEST_F() 44 EXPECT_EQ(rsaKey, SECKEY_GetPrivateKeyType(private_key.get())); in TEST_F() 46 PK11_GetPrivateModulusLen(private_key.get())); in TEST_F() 52 ScopedSECKEYPrivateKey private_key; in TEST_F() local 55 &private_key)); in TEST_F() 64 EXPECT_EQ(private_key->pkcs11ID, private_key2->pkcs11ID); in TEST_F() 70 ScopedSECKEYPrivateKey private_key; in TEST_F() local 73 &private_key)); in TEST_F() 80 PK11_DestroyTokenObject(private_key->pkcs11Slot, private_key->pkcs11ID); in TEST_F()
|
/external/cronet/crypto/ |
D | nss_key_util_unittest.cc | 38 ScopedSECKEYPrivateKey private_key; in TEST_F() local 41 &private_key)); in TEST_F() 44 EXPECT_EQ(rsaKey, SECKEY_GetPrivateKeyType(private_key.get())); in TEST_F() 46 PK11_GetPrivateModulusLen(private_key.get())); in TEST_F() 52 ScopedSECKEYPrivateKey private_key; in TEST_F() local 55 &private_key)); in TEST_F() 64 EXPECT_EQ(private_key->pkcs11ID, private_key2->pkcs11ID); in TEST_F() 70 ScopedSECKEYPrivateKey private_key; in TEST_F() local 73 &private_key)); in TEST_F() 80 PK11_DestroyTokenObject(private_key->pkcs11Slot, private_key->pkcs11ID); in TEST_F()
|
/external/rust/crates/grpcio/src/security/ |
D | credentials.rs | 153 pub fn add_cert(mut self, cert: Vec<u8>, mut private_key: Vec<u8>) -> ServerCredentialsBuilder { in add_cert() 154 if private_key.capacity() == private_key.len() { in add_cert() 155 let mut nil_key = Vec::with_capacity(private_key.len() + 1); in add_cert() 156 nil_key.extend_from_slice(&private_key); in add_cert() 157 clear_key_securely(&mut private_key); in add_cert() 158 private_key = nil_key; in add_cert() 162 private_key: CString::new(private_key).unwrap().into_raw(), in add_cert() 205 let s = CString::from_raw(pair.private_key as *mut _); in drop() 261 pub fn cert(mut self, cert: Vec<u8>, mut private_key: Vec<u8>) -> ChannelCredentialsBuilder { in cert() 262 if private_key.capacity() == private_key.len() { in cert() [all …]
|
/external/cronet/net/third_party/quiche/src/quiche/quic/core/crypto/ |
D | p256_key_exchange.cc | 23 P256KeyExchange::P256KeyExchange(bssl::UniquePtr<EC_KEY> private_key, in P256KeyExchange() argument 25 : private_key_(std::move(private_key)) { in P256KeyExchange() 44 bssl::UniquePtr<EC_KEY> private_key( in New() local 46 if (!private_key.get() || !EC_KEY_check_key(private_key.get())) { in New() 52 if (EC_POINT_point2oct(EC_KEY_get0_group(private_key.get()), in New() 53 EC_KEY_get0_public_key(private_key.get()), in New() 61 new P256KeyExchange(std::move(private_key), public_key)); in New() 77 std::unique_ptr<uint8_t[]> private_key(new uint8_t[key_len]); in NewPrivateKey() local 78 uint8_t* keyp = private_key.get(); in NewPrivateKey() 83 return std::string(reinterpret_cast<char*>(private_key.get()), key_len); in NewPrivateKey()
|
D | curve25519_key_exchange.cc | 34 absl::string_view private_key) { in New() argument 46 if (private_key.size() != X25519_PRIVATE_KEY_LEN) { in New() 53 memcpy(ka->private_key_, private_key.data(), X25519_PRIVATE_KEY_LEN); in New() 60 uint8_t private_key[X25519_PRIVATE_KEY_LEN]; in NewPrivateKey() local 61 rand->RandBytes(private_key, sizeof(private_key)); in NewPrivateKey() 62 return std::string(reinterpret_cast<char*>(private_key), sizeof(private_key)); in NewPrivateKey()
|
D | client_proof_source.h | 26 CertificatePrivateKey private_key) in CertAndKey() 27 : chain(std::move(chain)), private_key(std::move(private_key)) {} in CertAndKey() 30 CertificatePrivateKey private_key; member 58 CertificatePrivateKey private_key);
|
/external/python/asn1crypto/asn1crypto/ |
D | keys.py | 722 def wrap(cls, private_key, algorithm): argument 736 if not isinstance(private_key, byte_cls) and not isinstance(private_key, Asn1Value): 741 type_name(private_key) 745 if not isinstance(private_key, RSAPrivateKey): 746 private_key = RSAPrivateKey.load(private_key) 749 if not isinstance(private_key, DSAPrivateKey): 750 private_key = DSAPrivateKey.load(private_key) 752 params['p'] = private_key['p'] 753 params['q'] = private_key['q'] 754 params['g'] = private_key['g'] [all …]
|
/external/rust/crates/pkcs8/src/ |
D | private_key_info.rs | 97 pub private_key: &'a [u8], field 108 pub fn new(algorithm: AlgorithmIdentifier<'a>, private_key: &'a [u8]) -> Self { in new() 111 private_key, in new() 170 let private_key = OctetStringRef::decode(reader)?.into(); in decode_value() localVariable 197 private_key, in decode_value() 212 &OctetStringRef::new(self.private_key)?, in fields() 250 fn try_from(private_key: PrivateKeyInfo<'_>) -> Result<SecretDocument> { in try_from() 251 SecretDocument::try_from(&private_key) in try_from() 260 fn try_from(private_key: &PrivateKeyInfo<'_>) -> Result<SecretDocument> { in try_from() 261 Ok(Self::encode_msg(private_key)?) in try_from() [all …]
|
/external/python/cryptography/src/cryptography/hazmat/primitives/serialization/ |
D | ssh.py | 246 private_key = private_numbers.private_key(backend) 247 return private_key, data 255 def encode_private(self, private_key, f_priv): argument 257 private_numbers = private_key.private_numbers() 306 private_key = private_numbers.private_key(backend) 307 return private_key, data 320 def encode_private(self, private_key, f_priv): argument 322 self.encode_public(private_key.public_key(), f_priv) 323 f_priv.put_mpint(private_key.private_numbers().x) 372 private_key = ec.derive_private_key(secret, self.curve, backend) [all …]
|
/external/python/bumble/bumble/ |
D | crypto.py | 53 def __init__(self, private_key): argument 54 self.private_key = private_key 58 private_key = generate_private_key(SECP256R1()) 59 return cls(private_key) 66 private_key = EllipticCurvePrivateNumbers( 68 ).private_key() 69 return cls(private_key) 74 self.private_key.public_key() 82 self.private_key.public_key() 91 shared_key = self.private_key.exchange(ECDH(), public_key)
|
/external/grpc-grpc/src/python/grpcio_tests/tests/unit/ |
D | _server_ssl_cert_config_test.py | 76 private_key=None, argument 82 private_key=private_key, 176 private_key=None, argument 182 private_key=private_key, 193 private_key=CLIENT_KEY_2_PEM, 207 private_key=CLIENT_KEY_2_PEM, 222 private_key=CLIENT_KEY_2_PEM, 237 private_key=CLIENT_KEY_1_PEM, 251 private_key=CLIENT_KEY_2_PEM, 265 private_key=CLIENT_KEY_2_PEM, [all …]
|
/external/rust/crates/ring/src/ec/curve25519/ |
D | x25519.rs | 58 private_key: &ec::Seed, in x25519_public_from_private() 63 let cpu_features = private_key.cpu_features; in x25519_public_from_private() 65 let private_key: &[u8; SCALAR_LEN] = private_key.bytes_less_safe().try_into()?; in x25519_public_from_private() localVariable 66 let private_key = ops::MaskedScalar::from_bytes_masked(*private_key); in x25519_public_from_private() localVariable 75 x25519_neon(public_out, &private_key, &MONTGOMERY_BASE_POINT); in x25519_public_from_private() 83 private_key: &PrivateKey, in x25519_public_from_private() 87 x25519_public_from_private_generic_masked(public_out, &private_key); in x25519_public_from_private()
|
/external/python/cryptography/tests/hazmat/backends/ |
D | test_openssl.py | 429 private_key = RSA_KEY_512.private_key(backend) 431 private_key.decrypt( 445 private_key = RSA_KEY_512.private_key(backend) 447 private_key.decrypt( 457 private_key = RSA_KEY_512.private_key(backend) 459 private_key.decrypt( 477 private_key = RSA_KEY_2048.private_key(backend) 481 object(), private_key, DummyHashAlgorithm() 487 private_key = RSA_KEY_2048.private_key(backend) 491 object(), private_key, DummyHashAlgorithm() [all …]
|
/external/rust/crates/sec1/src/ |
D | private_key.rs | 64 pub private_key: &'a [u8], field 80 let private_key = OctetStringRef::decode(reader)?.as_bytes(); in decode_value() localVariable 88 private_key, in decode_value() 103 &OctetStringRef::new(self.private_key)?, in fields() 145 fn try_from(private_key: EcPrivateKey<'_>) -> Result<Self> { in try_from() 146 SecretDocument::try_from(&private_key) in try_from() 155 fn try_from(private_key: &EcPrivateKey<'_>) -> Result<Self> { in try_from() 156 Ok(Self::encode_msg(private_key)?) in try_from()
|
/external/rust/crates/ring/tests/ |
D | agreement_tests.rs | 26 let private_key = in agreement_traits() localVariable 33 format!("{:?}", &private_key), in agreement_traits() 37 let public_key = private_key.compute_public_key().unwrap(); in agreement_traits() 173 fn x25519(private_key: &[u8], public_key: &[u8]) -> Vec<u8> { in x25519() 174 x25519_(private_key, public_key).unwrap() in x25519() 177 fn x25519_(private_key: &[u8], public_key: &[u8]) -> Result<Vec<u8>, error::Unspecified> { in x25519_() 178 let rng = test::rand::FixedSliceRandom { bytes: private_key }; in x25519_() 179 let private_key = agreement::EphemeralPrivateKey::generate(&agreement::X25519, &rng)?; in x25519_() localVariable 181 agreement::agree_ephemeral(private_key, &public_key, |agreed_value| { in x25519_()
|
/external/rust/crates/grpcio-sys/grpc/src/core/lib/security/security_connector/ |
D | ssl_utils.h | 148 PemKeyCertPair(absl::string_view private_key, absl::string_view cert_chain) in PemKeyCertPair() argument 149 : private_key_(private_key), cert_chain_(cert_chain) {} in PemKeyCertPair() 164 : private_key_(other.private_key()), cert_chain_(other.cert_chain()) {} in PemKeyCertPair() 166 private_key_ = other.private_key(); 172 return this->private_key() == other.private_key() && 176 const std::string& private_key() const { return private_key_; } in private_key() function
|
/external/rust/crates/pkcs8/tests/ |
D | private_key.rs | 57 …assert_eq!(pk.private_key, &hex!("306B020101042069624171561A63340DE0E7D869F2A05492558E1A04868B6A9F… in decode_ec_p256_der() 72 pk.private_key, in decode_ed25519_der_v1() 92 assert_eq!(pk.private_key, PRIV_KEY); in decode_ed25519_der_v2() 105 …assert_eq!(pk.private_key, &hex!("308204A30201000282010100B6C42C515F10A6AAF282C63EDBE24243A170F3FA… in decode_rsa_2048_der() 118 pk.private_key, in decode_x25519_der() 141 let private_key = PrivateKeyInfo::try_from(ED25519_DER_V2_EXAMPLE).unwrap(); in encode_ed25519_der_v2() localVariable 142 let private_der = private_key.to_vec().unwrap(); in encode_ed25519_der_v2() 144 private_key, in encode_ed25519_der_v2()
|