Home
last modified time | relevance | path

Searched refs:key_pair (Results 1 – 14 of 14) sorted by relevance

/external/rust/crates/ring/tests/
Drsa_tests.rs96 let key_pair = signature::RsaKeyPair::from_der(&private_key); in test_signature_rsa_pkcs1_sign() localVariable
98 assert!(key_pair.is_err()); in test_signature_rsa_pkcs1_sign()
101 let key_pair = key_pair.unwrap(); in test_signature_rsa_pkcs1_sign() localVariable
105 let mut actual = vec![0u8; key_pair.public_modulus_len()]; in test_signature_rsa_pkcs1_sign()
106 key_pair in test_signature_rsa_pkcs1_sign()
134 let key_pair = signature::RsaKeyPair::from_der(&private_key); in test_signature_rsa_pss_sign() localVariable
135 if key_pair.is_err() && result == "Fail-Invalid-Key" { in test_signature_rsa_pss_sign()
138 let key_pair = key_pair.unwrap(); in test_signature_rsa_pss_sign() localVariable
145 let mut actual = vec![0u8; key_pair.public_modulus_len()]; in test_signature_rsa_pss_sign()
146 key_pair.sign(alg, &rng, &msg, actual.as_mut_slice())?; in test_signature_rsa_pss_sign()
[all …]
Ded25519_tests.rs54 let key_pair = Ed25519KeyPair::from_seed_and_public_key(&seed, &public_key).unwrap(); in test_signature_ed25519() localVariable
55 let actual_sig = key_pair.sign(&msg); in test_signature_ed25519()
62 let key_pair = Ed25519KeyPair::from_pkcs8(pkcs8.as_ref()).unwrap(); in test_signature_ed25519() localVariable
63 assert_eq!(public_key, key_pair.public_key().as_ref()); in test_signature_ed25519()
66 let actual_sig = key_pair.sign(&msg); in test_signature_ed25519()
161 let key_pair = signature::Ed25519KeyPair::from_pkcs8(PRIVATE_KEY).unwrap(); in ed25519_test_public_key_coverage() localVariable
164 assert_eq!(key_pair.public_key().as_ref(), PUBLIC_KEY); in ed25519_test_public_key_coverage()
168 let _: <Ed25519KeyPair as KeyPair>::PublicKey = key_pair.public_key().clone(); in ed25519_test_public_key_coverage()
171 let _: <Ed25519KeyPair as KeyPair>::PublicKey = *key_pair.public_key(); in ed25519_test_public_key_coverage()
174 assert_eq!(PUBLIC_KEY_DEBUG, format!("{:?}", key_pair.public_key())); in ed25519_test_public_key_coverage()
[all …]
Decdsa_tests.rs202 let key_pair = signature::EcdsaKeyPair::from_pkcs8( in ecdsa_test_public_key_coverage() localVariable
209 assert_eq!(key_pair.public_key().as_ref(), PUBLIC_KEY); in ecdsa_test_public_key_coverage()
213 let _: <signature::EcdsaKeyPair as KeyPair>::PublicKey = key_pair.public_key().clone(); in ecdsa_test_public_key_coverage()
216 let _: <signature::EcdsaKeyPair as KeyPair>::PublicKey = *key_pair.public_key(); in ecdsa_test_public_key_coverage()
219 assert_eq!(PUBLIC_KEY_DEBUG, format!("{:?}", key_pair.public_key())); in ecdsa_test_public_key_coverage()
221 format!("EcdsaKeyPair {{ public_key: {:?} }}", key_pair.public_key()), in ecdsa_test_public_key_coverage()
222 format!("{:?}", key_pair) in ecdsa_test_public_key_coverage()
/external/webrtc/rtc_base/
Dopenssl_identity.cc193 std::unique_ptr<OpenSSLKeyPair> key_pair, in OpenSSLIdentity() argument
195 : key_pair_(std::move(key_pair)) { in OpenSSLIdentity()
203 OpenSSLIdentity::OpenSSLIdentity(std::unique_ptr<OpenSSLKeyPair> key_pair, in OpenSSLIdentity() argument
205 : key_pair_(std::move(key_pair)), cert_chain_(std::move(cert_chain)) { in OpenSSLIdentity()
214 std::unique_ptr<OpenSSLKeyPair> key_pair( in CreateInternal() local
216 if (key_pair) { in CreateInternal()
218 OpenSSLCertificate::Generate(key_pair.get(), params)); in CreateInternal()
221 new OpenSSLIdentity(std::move(key_pair), std::move(certificate))); in CreateInternal()
259 std::unique_ptr<OpenSSLKeyPair> key_pair( in CreateFromPEMStrings() local
261 if (!key_pair) { in CreateFromPEMStrings()
[all …]
Dopenssl_identity.h89 OpenSSLIdentity(std::unique_ptr<OpenSSLKeyPair> key_pair,
91 OpenSSLIdentity(std::unique_ptr<OpenSSLKeyPair> key_pair,
Dopenssl_certificate.h38 OpenSSLKeyPair* key_pair,
Dopenssl_certificate.cc127 OpenSSLKeyPair* key_pair, in Generate() argument
134 X509* x509 = MakeCertificate(key_pair->pkey(), actual_params); in Generate()
/external/libchrome/crypto/
Drsa_private_key_unittest.cc355 std::unique_ptr<crypto::RSAPrivateKey> key_pair( in TEST() local
357 ASSERT_TRUE(key_pair.get()); in TEST()
360 crypto::RSAPrivateKey::CreateFromKey(key_pair->key())); in TEST()
365 ASSERT_TRUE(key_pair->ExportPrivateKey(&privkey)); in TEST()
366 ASSERT_TRUE(key_pair->ExportPublicKey(&pubkey)); in TEST()
/external/openscreen/util/crypto/
Dcertificate_utils.cc52 EVP_PKEY key_pair, in CreateCertificateInternal() argument
63 issuer_key = &key_pair; in CreateCertificateInternal()
125 (X509_set_pubkey(certificate.get(), &key_pair) != 1) || in CreateCertificateInternal()
161 const EVP_PKEY& key_pair, in CreateSelfSignedX509Certificate() argument
167 CreateCertificateInternal(name, duration, key_pair, time_since_unix_epoch, in CreateSelfSignedX509Certificate()
Drsa_private_key_unittest.cc359 RSAPrivateKey key_pair = std::move(key_pair_or_error.value()); in TEST() local
361 ErrorOr<RSAPrivateKey> key_copy(RSAPrivateKey::CreateFromKey(key_pair.key())); in TEST()
364 ErrorOr<std::vector<uint8_t>> privkey = key_pair.ExportPrivateKey(); in TEST()
365 ErrorOr<std::vector<uint8_t>> pubkey = key_pair.ExportPublicKey(); in TEST()
Dcertificate_utils.h34 const EVP_PKEY& key_pair,
/external/rust/crates/ring/src/ec/suite_b/ecdsa/
Dsigning.rs109 let key_pair = ec::suite_b::key_pair_from_pkcs8( in from_pkcs8() localVariable
116 Self::new(alg, key_pair, &rng) in from_pkcs8()
140 let key_pair = ec::suite_b::key_pair_from_bytes( in from_private_key_and_public_key() localVariable
147 Self::new(alg, key_pair, &rng) in from_private_key_and_public_key()
152 key_pair: ec::KeyPair, in new()
155 let (seed, public_key) = key_pair.split(); in new()
/external/rust/crates/ring/src/rsa/
Dsigning.rs624 let key_pair = signature::RsaKeyPair::from_der(PRIVATE_KEY_DER).unwrap(); in test_signature_rsa_pkcs1_sign_output_buffer_len() localVariable
627 let mut signature = vec![0; key_pair.public_modulus_len() - 1]; in test_signature_rsa_pkcs1_sign_output_buffer_len()
629 assert!(key_pair in test_signature_rsa_pkcs1_sign_output_buffer_len()
635 assert!(key_pair in test_signature_rsa_pkcs1_sign_output_buffer_len()
641 assert!(key_pair in test_signature_rsa_pkcs1_sign_output_buffer_len()
/external/rust/crates/ring/src/ec/curve25519/ed25519/
Dsigning.rs54 let key_pair = Self::from_seed_(&seed); in generate_pkcs8() localVariable
58 key_pair.public_key().as_ref(), in generate_pkcs8()