public final class SECP256K1 extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.bouncycastle.crypto.params.ECDomainParameters |
CURVE |
static org.bouncycastle.asn1.x9.X9ECParameters |
CURVE_PARAMS |
static BigInteger |
HALF_CURVE_ORDER |
| Constructor and Description |
|---|
SECP256K1() |
| Modifier and Type | Method and Description |
|---|---|
static KeyPair |
createSecp256k1KeyPair()
generate keypair by secp256k1.
|
static KeyPair |
createSecp256k1KeyPair(SecureRandom random)
generate keypair by secp256k1.
|
static BigInteger |
publicKeyFromPrivate(BigInteger privKey,
int from)
Returns public key from the given private key.
|
static org.bouncycastle.math.ec.ECPoint |
publicPointFromPrivate(BigInteger privKey)
Returns public key point from the given private key.
|
public static final org.bouncycastle.asn1.x9.X9ECParameters CURVE_PARAMS
public static final org.bouncycastle.crypto.params.ECDomainParameters CURVE
public static final BigInteger HALF_CURVE_ORDER
public static KeyPair createSecp256k1KeyPair() throws NoSuchProviderException, NoSuchAlgorithmException, InvalidAlgorithmParameterException
public static KeyPair createSecp256k1KeyPair(SecureRandom random) throws NoSuchProviderException, NoSuchAlgorithmException, InvalidAlgorithmParameterException
random - NoSuchProviderExceptionNoSuchAlgorithmExceptionInvalidAlgorithmParameterExceptionpublic static BigInteger publicKeyFromPrivate(BigInteger privKey, int from)
privKey - the private key to derive the public key frompublic static org.bouncycastle.math.ec.ECPoint publicPointFromPrivate(BigInteger privKey)
privKey - the private key to derive the public key fromCopyright © 2022 IoTeX Group. All rights reserved.