Skip to content

Commit

Permalink
Update to the latest version of ironfish-frost
Browse files Browse the repository at this point in the history
  • Loading branch information
andiflabs committed Mar 12, 2024
1 parent 663d640 commit d2152cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
9 changes: 8 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 8 additions & 9 deletions ironfish-rust-nodejs/src/frost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use crate::{structs::NativeUnsignedTransaction, to_napi_err};
use ironfish::{
frost::{keys::KeyPackage, round1::SigningCommitments, round2, Randomizer},
frost::{keys::KeyPackage, round2, Randomizer},
frost_utils::{signing_package::SigningPackage, split_spender_key::split_spender_key},
participant::{Identity, Secret},
serializing::{bytes_to_hex, fr::FrSerializable, hex_to_vec_bytes},
Expand Down Expand Up @@ -58,15 +58,14 @@ pub fn create_signing_commitment(
let transaction_hash = transaction_hash.into_value()?;
let signers = try_deserialize_identities(signers)?;

let nonces =
deterministic_signing_nonces(key_package.signing_share(), &transaction_hash, &signers);
let commitments = SigningCommitments::from(&nonces);

let signing_commitment =
SigningCommitment::from_frost(secret, *commitments.hiding(), *commitments.binding());

let bytes = signing_commitment.serialize()?;
let signing_commitment = SigningCommitment::from_secrets(
&secret,
key_package.signing_share(),
&transaction_hash,
&signers,
);

let bytes = signing_commitment.serialize();
Ok(bytes_to_hex(&bytes[..]))
}

Expand Down

0 comments on commit d2152cc

Please sign in to comment.