Skip to content

Commit cc09fb7

Browse files
committed
Update rust-secp256k1 to add ecdsa-adaptor/schnorr
1 parent a4c9aa0 commit cc09fb7

File tree

5 files changed

+890
-2
lines changed

5 files changed

+890
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "secp256k1"
4-
version = "0.17.2"
4+
version = "0.17.3-adaptor.0"
55
authors = [ "Dawid Ciężarkiewicz <[email protected]>",
66
"Andrew Poelstra <[email protected]>" ]
77
license = "CC0-1.0"
@@ -38,7 +38,7 @@ external-symbols = ["secp256k1-sys/external-symbols"]
3838
fuzztarget = ["secp256k1-sys/fuzztarget"]
3939

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

4343
[dev-dependencies]
4444
rand = "0.6"

src/constants.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,24 @@ pub const MAX_SIGNATURE_SIZE: usize = 72;
3434
/// The maximum size of a compact signature
3535
pub const COMPACT_SIGNATURE_SIZE: usize = 64;
3636

37+
/// Size of an adaptor signature
38+
pub const ADAPTOR_SIGNATURE_SIZE: usize = 65;
39+
40+
/// Size of an adaptor proof
41+
pub const ADAPTOR_PROOF_SIZE: usize = 97;
42+
43+
/// Size of a schnorr signature
44+
pub const SCHNORR_SIGNATURE_SIZE: usize = 64;
45+
46+
/// Size of a schnorr signature
47+
pub const SCHNORR_NONCE_SIZE: usize = 32;
48+
49+
/// Size of a x-only public key
50+
pub const X_ONLY_PUBLIC_KEY_SIZE: usize = 64;
51+
52+
/// Size of a key pair
53+
pub const KEY_PAIR_SIZE: usize = 96;
54+
3755
/// The Prime for the secp256k1 field element.
3856
pub const FIELD_SIZE: [u8; 32] = [
3957
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,

0 commit comments

Comments
 (0)