mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 04:39:24 +00:00
Place Schnorr signature aggregation behind a feature flag
This commit is contained in:
@@ -25,6 +25,7 @@ use ciphersuite::{
|
||||
use multiexp::{multiexp_vartime, BatchVerifier};
|
||||
|
||||
/// Half-aggregation from <https://eprint.iacr.org/2021/350>.
|
||||
#[cfg(feature = "aggregate")]
|
||||
pub mod aggregate;
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -9,10 +9,9 @@ use ciphersuite::{
|
||||
};
|
||||
use multiexp::BatchVerifier;
|
||||
|
||||
use crate::{
|
||||
SchnorrSignature,
|
||||
aggregate::{SchnorrAggregator, SchnorrAggregate},
|
||||
};
|
||||
use crate::SchnorrSignature;
|
||||
#[cfg(feature = "aggregate")]
|
||||
use crate::aggregate::{SchnorrAggregator, SchnorrAggregate};
|
||||
|
||||
mod rfc8032;
|
||||
|
||||
@@ -77,6 +76,7 @@ pub(crate) fn batch_verify<C: Ciphersuite>() {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "aggregate")]
|
||||
pub(crate) fn aggregate<C: Ciphersuite>() {
|
||||
const DST: &[u8] = b"Schnorr Aggregator Test";
|
||||
|
||||
@@ -117,5 +117,6 @@ fn test() {
|
||||
sign::<Ed25519>();
|
||||
verify::<Ed25519>();
|
||||
batch_verify::<Ed25519>();
|
||||
#[cfg(feature = "aggregate")]
|
||||
aggregate::<Ed25519>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user