Group trait overhaul part 2 (#53)

* Rely on elliptic-curve for hash-to-curve and P-256 implementations

* Update MSRV

* Remove unnecessary `#[macro_use]`

* Re-introduce `CipherSuite`

* Provide types for length shortcuts

* Remove `SUITE_ID` from `Group`

* Blanket implementation for RustCrypto `Curve`s

* Remove the p256 crate feature

* Rename `ristretto_*` crate features to `ristretto-*` for consistency

* Remove unnecessary allowed Clippy lints

* Remove some unnecessary constraints
This commit is contained in:
daxpedda
2022-01-21 13:52:09 -08:00
committed by GitHub
parent 652fd1d1d0
commit 16e072dcd4
15 changed files with 1038 additions and 1643 deletions
+4 -7
View File
@@ -14,6 +14,8 @@ use crate::{Error, Group, Result};
#[test]
fn test_group_properties() -> Result<()> {
use p256::NistP256;
#[cfg(feature = "ristretto255")]
{
use crate::Ristretto255;
@@ -22,13 +24,8 @@ fn test_group_properties() -> Result<()> {
test_zero_scalar_error::<Ristretto255>()?;
}
#[cfg(feature = "p256")]
{
use p256_::NistP256;
test_identity_element_error::<NistP256>()?;
test_zero_scalar_error::<NistP256>()?;
}
test_identity_element_error::<NistP256>()?;
test_zero_scalar_error::<NistP256>()?;
Ok(())
}