Skip to content

Commit

Permalink
core wrapper function for subtract signature function (#3748)
Browse files Browse the repository at this point in the history
* core wrapper function for subtract signature function

* revert to cargo lock from master
  • Loading branch information
yeastplume committed May 25, 2023
1 parent 11b5cdb commit c31921f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/src/libtx/aggsig.rs
Expand Up @@ -408,6 +408,16 @@ pub fn add_signatures(
Ok(sig)
}

/// Subtract a partial signature from a completed signature
/// see https://github.com/mimblewimble/rust-secp256k1-zkp/blob/e9e4f09bd0c85da914774a52219457ba10ac3e57/src/aggsig.rs#L267
pub fn subtract_signature(
secp: &Secp256k1,
sig: &Signature,
partial_sig: &Signature,
) -> Result<(Signature, Option<Signature>), Error> {
let sig = aggsig::subtract_partial_signature(secp, sig, partial_sig)?;
Ok(sig)
}
/// Just a simple sig, creates its own nonce if not provided
pub fn sign_single(
secp: &Secp256k1,
Expand Down

0 comments on commit c31921f

Please sign in to comment.