Re-export the frost-core traits and rand-core as part of top-level impls API (#297)
* Re-export the frost-core traits and rand-core as part of top-level impls API * Don't export frost_core::frost --------- Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>
This commit is contained in:
parent
b829d4ff9f
commit
cf7ebcb34e
|
@ -11,11 +11,15 @@ use curve25519_dalek::{
|
|||
use rand_core::{CryptoRng, RngCore};
|
||||
use sha2::{Digest, Sha512};
|
||||
|
||||
use frost_core::{frost, Ciphersuite, Field, FieldError, Group, GroupError};
|
||||
use frost_core::frost;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
// Re-exports in our public API
|
||||
pub use frost_core::{Ciphersuite, Field, FieldError, Group, GroupError};
|
||||
pub use rand_core;
|
||||
|
||||
/// An error.
|
||||
pub type Error = frost_core::Error<Ed25519Sha512>;
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
use frost_core::{Ciphersuite, Group, GroupError};
|
||||
use frost_ed25519::*;
|
||||
|
||||
use curve25519_dalek::{edwards::EdwardsPoint, traits::Identity};
|
||||
|
|
|
@ -12,11 +12,15 @@ use sha3::{
|
|||
Shake256,
|
||||
};
|
||||
|
||||
use frost_core::{frost, Ciphersuite, Field, FieldError, Group, GroupError};
|
||||
use frost_core::frost;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
// Re-exports in our public API
|
||||
pub use frost_core::{Ciphersuite, Field, FieldError, Group, GroupError};
|
||||
pub use rand_core;
|
||||
|
||||
/// An error.
|
||||
pub type Error = frost_core::Error<Ed448Shake256>;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use ed448_goldilocks::curve::ExtendedPoint;
|
||||
use frost_core::{Ciphersuite, Group, GroupError};
|
||||
|
||||
use frost_ed448::*;
|
||||
use rand::thread_rng;
|
||||
|
||||
|
|
|
@ -13,11 +13,15 @@ use p256::{
|
|||
use rand_core::{CryptoRng, RngCore};
|
||||
use sha2::{Digest, Sha256};
|
||||
|
||||
use frost_core::{frost, Ciphersuite, Field, FieldError, Group, GroupError};
|
||||
use frost_core::frost;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
// Re-exports in our public API
|
||||
pub use frost_core::{Ciphersuite, Field, FieldError, Group, GroupError};
|
||||
pub use rand_core;
|
||||
|
||||
/// An error.
|
||||
pub type Error = frost_core::Error<P256Sha256>;
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
use frost_core::{Ciphersuite, Group, GroupError};
|
||||
use frost_p256::*;
|
||||
use rand::thread_rng;
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@ use frost_core::{
|
|||
Ciphersuite, Error, Field, Group, VerifyingKey,
|
||||
};
|
||||
|
||||
// When pulled into `reddsa`, that has its own sibling `rand_core` import.
|
||||
// For the time being, we do not re-export this `rand_core`.
|
||||
use rand_core::{CryptoRng, RngCore};
|
||||
|
||||
/// Performed once by each participant selected for the signing operation.
|
||||
|
|
|
@ -11,11 +11,15 @@ use curve25519_dalek::{
|
|||
use rand_core::{CryptoRng, RngCore};
|
||||
use sha2::{Digest, Sha512};
|
||||
|
||||
use frost_core::{frost, Ciphersuite, Field, FieldError, Group, GroupError};
|
||||
use frost_core::frost;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
// Re-exports in our public API
|
||||
pub use frost_core::{Ciphersuite, Field, FieldError, Group, GroupError};
|
||||
pub use rand_core;
|
||||
|
||||
/// An error.
|
||||
pub type Error = frost_core::Error<Ristretto255Sha512>;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use curve25519_dalek::{ristretto::RistrettoPoint, traits::Identity};
|
||||
use frost_core::{Ciphersuite, Group, GroupError};
|
||||
use frost_ristretto255::*;
|
||||
use rand::thread_rng;
|
||||
|
||||
|
|
|
@ -14,11 +14,15 @@ use k256::{
|
|||
use rand_core::{CryptoRng, RngCore};
|
||||
use sha2::{Digest, Sha256};
|
||||
|
||||
use frost_core::{frost, Ciphersuite, Field, FieldError, Group, GroupError};
|
||||
use frost_core::frost;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
// Re-exports in our public API
|
||||
pub use frost_core::{Ciphersuite, Field, FieldError, Group, GroupError};
|
||||
pub use rand_core;
|
||||
|
||||
/// An error.
|
||||
pub type Error = frost_core::Error<Secp256K1Sha256>;
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
use frost_core::{Ciphersuite, Group, GroupError};
|
||||
use frost_secp256k1::*;
|
||||
use rand::thread_rng;
|
||||
|
||||
|
|
Loading…
Reference in New Issue