• Home
  • Raw
  • Download

Lines Matching full:signature

35     signature::{self, KeyPair},
52 &signature::ECDSA_P256_SHA256_FIXED_SIGNING, in ecdsa_from_pkcs8_test()
53 &signature::ECDSA_P256_SHA256_ASN1_SIGNING, in ecdsa_from_pkcs8_test()
56 &signature::ECDSA_P384_SHA384_FIXED_SIGNING, in ecdsa_from_pkcs8_test()
57 &signature::ECDSA_P384_SHA384_ASN1_SIGNING, in ecdsa_from_pkcs8_test()
62 &signature::ECDSA_P384_SHA384_FIXED_SIGNING, in ecdsa_from_pkcs8_test()
63 &signature::ECDSA_P384_SHA384_ASN1_SIGNING, in ecdsa_from_pkcs8_test()
66 &signature::ECDSA_P256_SHA256_FIXED_SIGNING, in ecdsa_from_pkcs8_test()
67 &signature::ECDSA_P256_SHA256_ASN1_SIGNING, in ecdsa_from_pkcs8_test()
78 signature::EcdsaKeyPair::from_pkcs8(this_fixed, &input), in ecdsa_from_pkcs8_test()
88 signature::EcdsaKeyPair::from_pkcs8(this_asn1, &input), in ecdsa_from_pkcs8_test()
97 assert!(signature::EcdsaKeyPair::from_pkcs8(other_fixed, &input).is_err()); in ecdsa_from_pkcs8_test()
98 assert!(signature::EcdsaKeyPair::from_pkcs8(other_asn1, &input).is_err()); in ecdsa_from_pkcs8_test()
111 &signature::ECDSA_P256_SHA256_ASN1_SIGNING, in ecdsa_generate_pkcs8_test()
112 &signature::ECDSA_P256_SHA256_FIXED_SIGNING, in ecdsa_generate_pkcs8_test()
113 &signature::ECDSA_P384_SHA384_ASN1_SIGNING, in ecdsa_generate_pkcs8_test()
114 &signature::ECDSA_P384_SHA384_FIXED_SIGNING, in ecdsa_generate_pkcs8_test()
116 let pkcs8 = signature::EcdsaKeyPair::generate_pkcs8(alg, &rng).unwrap(); in ecdsa_generate_pkcs8_test()
125 let _ = signature::EcdsaKeyPair::from_pkcs8(*alg, pkcs8.as_ref()).unwrap(); in ecdsa_generate_pkcs8_test()
144 ("P-256", "SHA256") => &signature::ECDSA_P256_SHA256_ASN1, in signature_ecdsa_verify_asn1_test()
145 ("P-256", "SHA384") => &signature::ECDSA_P256_SHA384_ASN1, in signature_ecdsa_verify_asn1_test()
146 ("P-384", "SHA256") => &signature::ECDSA_P384_SHA256_ASN1, in signature_ecdsa_verify_asn1_test()
147 ("P-384", "SHA384") => &signature::ECDSA_P384_SHA384_ASN1, in signature_ecdsa_verify_asn1_test()
154 signature::UnparsedPublicKey::new(alg, &public_key).verify(&msg, &sig); in signature_ecdsa_verify_asn1_test()
178 ("P-256", "SHA256") => &signature::ECDSA_P256_SHA256_FIXED, in signature_ecdsa_verify_fixed_test()
179 ("P-384", "SHA384") => &signature::ECDSA_P384_SHA384_FIXED, in signature_ecdsa_verify_fixed_test()
188 signature::UnparsedPublicKey::new(alg, &public_key).verify(&msg, &sig); in signature_ecdsa_verify_fixed_test()
202 let key_pair = signature::EcdsaKeyPair::from_pkcs8( in ecdsa_test_public_key_coverage()
203 &signature::ECDSA_P256_SHA256_FIXED_SIGNING, 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()
227 // test vectors. Because the nonce is randomized, the signature will be
229 // signature verifies correctly. The known-answer tests themselves are in
247 // Ignored since the actual signature will use a randomized nonce. in signature_ecdsa_sign_fixed_sign_and_verify_test()
254 &signature::ECDSA_P256_SHA256_FIXED_SIGNING, in signature_ecdsa_sign_fixed_sign_and_verify_test()
255 &signature::ECDSA_P256_SHA256_FIXED, in signature_ecdsa_sign_fixed_sign_and_verify_test()
258 &signature::ECDSA_P384_SHA384_FIXED_SIGNING, in signature_ecdsa_sign_fixed_sign_and_verify_test()
259 &signature::ECDSA_P384_SHA384_FIXED, in signature_ecdsa_sign_fixed_sign_and_verify_test()
267 signature::EcdsaKeyPair::from_private_key_and_public_key(signing_alg, &d, &q) in signature_ecdsa_sign_fixed_sign_and_verify_test()
270 let signature = private_key.sign(&rng, &msg).unwrap(); in signature_ecdsa_sign_fixed_sign_and_verify_test() localVariable
272 let public_key = signature::UnparsedPublicKey::new(verification_alg, q); in signature_ecdsa_sign_fixed_sign_and_verify_test()
273 assert_eq!(public_key.verify(&msg, signature.as_ref()), Ok(())); in signature_ecdsa_sign_fixed_sign_and_verify_test()
281 // test vectors. Because the nonce is randomized, the signature will be
283 // signature verifies correctly. The known-answer tests themselves are in
301 // Ignored since the actual signature will use a randomized nonce. in signature_ecdsa_sign_asn1_test()
308 &signature::ECDSA_P256_SHA256_ASN1_SIGNING, in signature_ecdsa_sign_asn1_test()
309 &signature::ECDSA_P256_SHA256_ASN1, in signature_ecdsa_sign_asn1_test()
312 &signature::ECDSA_P384_SHA384_ASN1_SIGNING, in signature_ecdsa_sign_asn1_test()
313 &signature::ECDSA_P384_SHA384_ASN1, in signature_ecdsa_sign_asn1_test()
321 signature::EcdsaKeyPair::from_private_key_and_public_key(signing_alg, &d, &q) in signature_ecdsa_sign_asn1_test()
324 let signature = private_key.sign(&rng, &msg).unwrap(); in signature_ecdsa_sign_asn1_test() localVariable
326 let public_key = signature::UnparsedPublicKey::new(verification_alg, q); in signature_ecdsa_sign_asn1_test()
327 assert_eq!(public_key.verify(&msg, signature.as_ref()), Ok(())); in signature_ecdsa_sign_asn1_test()