Skip to content

Commit

Permalink
Update rust-secp256k1 to add ecdsa-adaptor/schnorr
Browse files Browse the repository at this point in the history
  • Loading branch information
Tibo-lg committed Sep 1, 2020
1 parent 8ddd84b commit 8b749bc
Show file tree
Hide file tree
Showing 5 changed files with 883 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "secp256k1"
version = "0.17.2"
version = "0.17.3-adaptor.0"
authors = [ "Dawid Ciężarkiewicz <[email protected]>",
"Andrew Poelstra <[email protected]>" ]
license = "CC0-1.0"
Expand Down Expand Up @@ -38,7 +38,7 @@ external-symbols = ["secp256k1-sys/external-symbols"]
fuzztarget = ["secp256k1-sys/fuzztarget"]

[dependencies]
secp256k1-sys = { version = "0.1.1", default-features = false, path = "./secp256k1-sys" }
secp256k1-sys = { version = "0.1.3-adaptor.0", default-features = false, path = "./secp256k1-sys" }

[dev-dependencies]
rand = "0.6"
Expand Down
18 changes: 18 additions & 0 deletions src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,24 @@ pub const MAX_SIGNATURE_SIZE: usize = 72;
/// The maximum size of a compact signature
pub const COMPACT_SIGNATURE_SIZE: usize = 64;

/// Size of an adaptor signature
pub const ADAPTOR_SIGNATURE_SIZE: usize = 65;

/// Size of an adaptor proof
pub const ADAPTOR_PROOF_SIZE: usize = 97;

/// Size of a schnorr signature
pub const SCHNORR_SIGNATURE_SIZE: usize = 64;

/// Size of a schnorr signature
pub const SCHNORR_NONCE_SIZE: usize = 32;

/// Size of a x-only public key
pub const X_ONLY_PUBLIC_KEY_SIZE: usize = 64;

/// Size of a key pair
pub const KEY_PAIR_SIZE: usize = 96;

/// The Prime for the secp256k1 field element.
pub const FIELD_SIZE: [u8; 32] = [
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
Expand Down
Loading

0 comments on commit 8b749bc

Please sign in to comment.