Skip to content

Commit

Permalink
chore: update secp256k1-zkp dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed May 11, 2023
1 parent ee3eda5 commit 5a03c18
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 31 deletions.
39 changes: 10 additions & 29 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ aluvm = { version = "~0.10.1", features = ["std"] }
commit_verify = { version = "~0.10.1", features = ["rand", "derive"] }
single_use_seals = "~0.10.0"
bp-core = { version = "~0.10.2" }
secp256k1-zkp = { version = "~0.7.0", features = ["use-rand", "rand-std", "global-context"] }
secp256k1-zkp = { version = "0.8.0", features = ["use-rand", "rand-std", "global-context"] }
baid58 = "~0.3.1"
mime = "~0.3.16"
serde_crate = { package = "serde", version = "1", features = ["derive"], optional = true }
Expand Down
4 changes: 3 additions & 1 deletion src/contract/fungible.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ impl CommitVerify<RevealedValue, UntaggedProtocol> for PedersenCommitment {
let FungibleState::Bits64(value) = revealed.value;

// TODO: Check that we create correct generator value.
let g = secp256k1_zkp::PublicKey::from_secret_key(SECP256K1, &secp256k1_zkp::ONE_KEY);
let one_key = secp256k1_zkp::SecretKey::from_slice(&secp256k1_zkp::constants::ONE)
.expect("secret key from a constant");
let g = secp256k1_zkp::PublicKey::from_secret_key(SECP256K1, &one_key);
let h = Sha256::digest(&g.serialize_uncompressed());
let tag = Tag::from(h);
let generator = Generator::new_unblinded(SECP256K1, tag);
Expand Down

0 comments on commit 5a03c18

Please sign in to comment.