Skip to content

Commit

Permalink
break up long comment lines since rustfmt doesn't
Browse files Browse the repository at this point in the history
  • Loading branch information
xoloki committed Nov 15, 2024
1 parent fabc875 commit 8e26944
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ impl Party {
r = -r;
}

// When using BIP-340 32-byte public keys, we have to invert the private key if the public key is odd. But if we're also using BIP-341 tweaked keys, we have to do the same thing if the tweaked public key is odd. In that case, only invert the public key if exactly one of the internal or tweaked public keys is odd
// When using BIP-340 32-byte public keys, we have to invert the private key if the
// public key is odd. But if we're also using BIP-341 tweaked keys, we have to do
// the same thing if the tweaked public key is odd. In that case, only invert the
// public key if exactly one of the internal or tweaked public keys is odd
let mut cx_sign = Scalar::one();
let tweaked_public_key = if let Some(t) = tweak {
if t != Scalar::zero() {
Expand Down
5 changes: 4 additions & 1 deletion src/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ impl Party {
nonces: &[PublicNonce],
tweak: Option<Scalar>,
) -> SignatureShare {
// When using BIP-340 32-byte public keys, we have to invert the private key if the public key is odd. But if we're also using BIP-341 tweaked keys, we have to do the same thing if the tweaked public key is odd. In that case, only invert the public key if exactly one of the internal or tweaked public keys is odd
// When using BIP-340 32-byte public keys, we have to invert the private key if the
// public key is odd. But if we're also using BIP-341 tweaked keys, we have to do
// the same thing if the tweaked public key is odd. In that case, only invert the
// public key if exactly one of the internal or tweaked public keys is odd
let mut cx_sign = Scalar::one();
let tweaked_public_key = if let Some(t) = tweak {
if t != Scalar::zero() {
Expand Down

0 comments on commit 8e26944

Please sign in to comment.