Computes public key for a secret key. Checks for validity of the secret key.
OptionalisCompressed: booleanwhether to return compact (default), or full key
Public key, full when isCompressed=false; short when isCompressed=true
Key agreement function (ECDH)
Computes hashed shared point from secret key A and public key B.
Hash function to use (GOST R 34.11-94, Streebog-256, Streebog-512)
User keying material (aka salt, VKO-factor)
Keypair generator
Constructor and metadata helpers for Weierstrass points
Signs a message hash with a secret key.
sign(d, m) where
e = m mod n (if e=0, let e=1)
k = streebog_hmac_drbg(d, m)
(x, y) = G × k
r = x mod n
s = (r ⋅ d + k ⋅ e) mod n
Utils
Curve parameters passed to gost3410 constructor
Swap x and y in uncompressed point bytes (or r and s in signature)
Convert point from Twisted Edwards to Weierstrass (if supported)
Convert point from Weierstrass to Twisted Edwards (if supported)
Verifies a signature against message hash and public key.
verify(P, m, r, s) where
e = m mod n (if e=0, let e=1)
v = e^-1 mod n
z1 = s ⋅ v mod n
z2 = -r ⋅ v mod n
R = (z1 × G + z2 × P).x mod n
R == r
GOST R 34.10 signer