Place Schnorr signature aggregation behind a feature flag

This commit is contained in:
Luke Parker
2025-08-19 21:45:59 -04:00
parent d407e35cee
commit 75964cf6da
5 changed files with 10 additions and 7 deletions

View File

@@ -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)]

View File

@@ -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>();
}