pub struct AggregatedSignature(/* private fields */);Expand description
The aggregated signature of all partial signatures.
Implementations§
Source§impl AggregatedSignature
impl AggregatedSignature
Sourcepub fn assume_valid(self) -> Signature
pub fn assume_valid(self) -> Signature
Returns the aggregated signature schnorr::Signature assuming it is valid.
The partial_sig_agg function cannot guarantee that the produced signature is valid because participants
may send invalid signatures. In some applications this doesn’t matter because the invalid message is simply
dropped with no consequences. These can simply call this function to obtain the resulting signature. However
in applications that require having valid signatures before continuing (e.g. presigned transactions in Bitcoin Lightning Network) this would be exploitable. Such applications MUST verify the resulting signature using the
verify method.
Note that while an alternative approach of verifying partial signatures is valid, verifying the aggregated signature is more performant. Thus it should be generally better to verify the signature using this function first and fall back to detection of violators if it fails.
Trait Implementations§
Source§impl Clone for AggregatedSignature
impl Clone for AggregatedSignature
Source§fn clone(&self) -> AggregatedSignature
fn clone(&self) -> AggregatedSignature
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more