Skip to content

Commit 4b410fc

Browse files
committed
Add constant of the prime of the curve field.
1 parent 8c517e0 commit 4b410fc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/constants.rs

+8
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ 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+
/// The Prime for the secp256k1 field element.
38+
pub const FIELD_SIZE: [u8; 32] = [
39+
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
40+
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
41+
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
42+
0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xfc, 0x2f
43+
];
44+
3745
/// The order of the secp256k1 curve
3846
pub const CURVE_ORDER: [u8; 32] = [
3947
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,

0 commit comments

Comments
 (0)