//! Signing scheme implementations for `aggregation`. //! //! This module provides protocol-specific wrappers around the generic signing schemes //! in [`commonware_cryptography::certificate`]. Each wrapper binds the scheme's subject type to //! [`Item`], which represents the data being aggregated and signed. //! //! # Available Schemes //! //! - [`ed25519`]: Attributable signatures with individual verification. HSM-friendly, //! no trusted setup required. //! - [`bls12381_multisig`]: Attributable signatures with aggregated verification. //! Compact certificates while preserving attribution. //! - [`bls12381_threshold`]: Non-attributable threshold signatures. Constant-size //! certificates regardless of committee size. use super::types::Item; use commonware_cryptography::{certificate, Digest}; /// Marker trait for signing schemes compatible with `aggregation`. /// /// This trait binds a [`certificate::Scheme`] to the [`Item`] subject type used /// by the aggregation protocol. It is automatically implemented for any scheme /// whose subject type matches `&'a Item`. pub trait Scheme: for<'a> certificate::Scheme = &'a Item> {} impl Scheme for S where S: for<'a> certificate::Scheme = &'a Item> {} pub mod bls12381_multisig { //! BLS12-381 multi-signature implementation of the //! [`Scheme`](commonware_cryptography::certificate::Scheme) trait for `aggregation`. //! //! This scheme is attributable: certificates are compact while still preserving //! per-validator attribution. use super::Item; use commonware_cryptography::impl_certificate_bls12381_multisig; impl_certificate_bls12381_multisig!(&'a Item); } pub mod bls12381_threshold { //! BLS12-381 threshold implementation of the [`Scheme`](commonware_cryptography::certificate::Scheme) //! trait for `aggregation`. //! //! This scheme is non-attributable: partial signatures should not be exposed as //! third-party evidence. use super::Item; use commonware_cryptography::impl_certificate_bls12381_threshold; impl_certificate_bls12381_threshold!(&'a Item); } pub mod ed25519 { //! Ed25519 implementation of the [`Scheme`](commonware_cryptography::certificate::Scheme) trait //! for `aggregation`. //! //! This scheme is attributable: individual signatures can be safely exposed as //! evidence of liveness or faults. use super::Item; use commonware_cryptography::impl_certificate_ed25519; impl_certificate_ed25519!(&'a Item); }