module Secp256k1
Overview
Provides the Secp256k1
module with the elliptic curve parameters
used by the Bitcoin
, Ethereum
, and Polkadot
blockchains. It's
primarily used to generate key-pairs as well as signing messages and
recoverying signatures.
Ref: secg.org/sec2-v2.pdf
Defined in:
secp256k1.crsecp256k1/context.cr
secp256k1/version.cr
Constant Summary
-
G =
Point.new(Num.new("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"), Num.new("483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"))
-
A commonly used base point
G
with coordinatesx
andy
satisfyingy^2 = x^3 + 7
. -
N =
Num.new("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141")
-
The order
n
ofG
defines the finite size of the Secp256k1 fieldE
. -
P =
Num.new("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f")
-
The elliptic curve domain parameters over
F_p
associated with a Koblitz curveSecp256k1
are specified by the sextupleT = (p, a, b, G, n, h)
where the finite fieldF_p
is defined by the primep = 2^256 - 2^32 - 2^9 - 2^8 - 2^7 - 2^6 - 2^4 - 1
. -
VERSION =
"0.5.0"