public class Secp256k1
extends java.lang.Object
| Constructor and Description |
|---|
Secp256k1() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
computePublicKey(byte[] priKey)
Compute public key from private key for SECP256k1
|
static byte[] |
makeKeys()
Make key pair for SECP256k1
|
static byte[] |
sign(byte[] priKey,
byte[] msgHash)
Sign message hash for SECP256k1
|
static int |
verify(byte[] pubKey,
byte[] msgHash,
byte[] signature)
Verify message hash & signature for SECP256k1
|
public static byte[] makeKeys()
public static byte[] computePublicKey(byte[] priKey)
priKey - - 32 bytes, private keypublic static int verify(byte[] pubKey,
byte[] msgHash,
byte[] signature)
pubKey - - 64 bytes, public key,msgHash - - 32 bytes, sha256(data)signature - - 64 bytes, signature from derpublic static byte[] sign(byte[] priKey,
byte[] msgHash)
priKey - - 32 bytes, private keymsgHash - - 32 bytes, sha256(data)