Test P-521 (#349)
* Test P-521 * De-duplicate generic calls * Simplify full test vectors generation
This commit is contained in:
@@ -64,6 +64,15 @@ impl CipherSuite for P384 {
|
||||
type Ksf = crate::ksf::Identity;
|
||||
}
|
||||
|
||||
struct P521;
|
||||
|
||||
impl CipherSuite for P521 {
|
||||
type OprfCs = ::p521::NistP521;
|
||||
type KeGroup = ::p521::NistP521;
|
||||
type KeyExchange = TripleDh;
|
||||
type Ksf = crate::ksf::Identity;
|
||||
}
|
||||
|
||||
fn random_point<CS: CipherSuite>() -> <CS::KeGroup as KeGroup>::Pk
|
||||
where
|
||||
<OprfHash<CS> as OutputSizeUser>::OutputSize:
|
||||
@@ -115,6 +124,7 @@ fn client_registration_roundtrip() -> Result<(), ProtocolError> {
|
||||
inner::<Ristretto255>()?;
|
||||
inner::<P256>()?;
|
||||
inner::<P384>()?;
|
||||
inner::<P521>()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -169,6 +179,7 @@ fn server_registration_roundtrip() -> Result<(), ProtocolError> {
|
||||
inner::<Ristretto255>()?;
|
||||
inner::<P256>()?;
|
||||
inner::<P384>()?;
|
||||
inner::<P521>()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -212,6 +223,7 @@ fn registration_request_roundtrip() -> Result<(), ProtocolError> {
|
||||
inner::<Ristretto255>()?;
|
||||
inner::<P256>()?;
|
||||
inner::<P384>()?;
|
||||
inner::<P521>()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -264,6 +276,7 @@ fn registration_response_roundtrip() -> Result<(), ProtocolError> {
|
||||
inner::<Ristretto255>()?;
|
||||
inner::<P256>()?;
|
||||
inner::<P384>()?;
|
||||
inner::<P521>()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -326,6 +339,7 @@ fn registration_upload_roundtrip() -> Result<(), ProtocolError> {
|
||||
inner::<Ristretto255>()?;
|
||||
inner::<P256>()?;
|
||||
inner::<P384>()?;
|
||||
inner::<P521>()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -384,6 +398,7 @@ fn credential_request_roundtrip() -> Result<(), ProtocolError> {
|
||||
inner::<Ristretto255>()?;
|
||||
inner::<P256>()?;
|
||||
inner::<P384>()?;
|
||||
inner::<P521>()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -473,6 +488,7 @@ fn credential_response_roundtrip() -> Result<(), ProtocolError> {
|
||||
inner::<Ristretto255>()?;
|
||||
inner::<P256>()?;
|
||||
inner::<P384>()?;
|
||||
inner::<P521>()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -505,6 +521,7 @@ fn credential_finalization_roundtrip() -> Result<(), ProtocolError> {
|
||||
inner::<Ristretto255>()?;
|
||||
inner::<P256>()?;
|
||||
inner::<P384>()?;
|
||||
inner::<P521>()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -573,6 +590,7 @@ fn client_login_roundtrip() -> Result<(), ProtocolError> {
|
||||
inner::<Ristretto255>()?;
|
||||
inner::<P256>()?;
|
||||
inner::<P384>()?;
|
||||
inner::<P521>()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -613,6 +631,7 @@ fn ke1_message_roundtrip() -> Result<(), ProtocolError> {
|
||||
inner::<Ristretto255>()?;
|
||||
inner::<P256>()?;
|
||||
inner::<P384>()?;
|
||||
inner::<P521>()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -657,6 +676,7 @@ fn ke2_message_roundtrip() -> Result<(), ProtocolError> {
|
||||
inner::<Ristretto255>()?;
|
||||
inner::<P256>()?;
|
||||
inner::<P384>()?;
|
||||
inner::<P521>()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -692,6 +712,7 @@ fn ke3_message_roundtrip() -> Result<(), ProtocolError> {
|
||||
inner::<Ristretto255>()?;
|
||||
inner::<P256>()?;
|
||||
inner::<P384>()?;
|
||||
inner::<P521>()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -783,3 +804,4 @@ macro_rules! test {
|
||||
test!(ristretto255, Ristretto255);
|
||||
test!(p256, P256);
|
||||
test!(p384, P384);
|
||||
test!(p521, P521);
|
||||
|
||||
Reference in New Issue
Block a user