diff --git a/primitives/src/signatures/bls_over_bn254.rs b/primitives/src/signatures/bls_over_bn254.rs index 31f721f04..7741444bf 100644 --- a/primitives/src/signatures/bls_over_bn254.rs +++ b/primitives/src/signatures/bls_over_bn254.rs @@ -48,7 +48,7 @@ use ark_ff::{ field_hashers::{DefaultFieldHasher, HashToField}, BigInteger, Field, PrimeField, }; -use ark_serialize::*; +use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, *}; use ark_std::{ format, hash::{Hash, Hasher}, @@ -58,6 +58,7 @@ use ark_std::{ One, UniformRand, }; use digest::DynDigest; +use serde::{Deserialize, Serialize}; use sha3::Keccak256; use crate::errors::PrimitivesError::{ParameterError, VerificationError}; @@ -67,7 +68,7 @@ use tagged_base64::tagged; use zeroize::Zeroize; /// BLS signature scheme. -#[derive(CanonicalSerialize, CanonicalDeserialize)] +#[derive(Serialize, Deserialize)] pub struct BLSOverBN254CurveSignatureScheme; impl SignatureScheme for BLSOverBN254CurveSignatureScheme { diff --git a/primitives/src/signatures/mod.rs b/primitives/src/signatures/mod.rs index be64b500b..3c310568c 100644 --- a/primitives/src/signatures/mod.rs +++ b/primitives/src/signatures/mod.rs @@ -92,7 +92,9 @@ pub trait SignatureScheme { /// Trait for aggregatable signatures. /// TODO: generic over hash functions -pub trait AggregateableSignatureSchemes: SignatureScheme { +pub trait AggregateableSignatureSchemes: + SignatureScheme + Serialize + for<'a> Deserialize<'a> +{ /// Aggregate multiple signatures into a single signature /// The list of public keys is also in the input as some aggregate signature /// schemes might also use pks for aggregation