|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bitcoin.x6763.crypto.ecdsa.PrivateKey
public class PrivateKey
An elliptic curve private key, generated for the secp256k1 elliptic curve.
Field Summary | |
---|---|
static long |
serialVersionUID
|
Fields inherited from interface org.bitcoin.x6763.crypto.ecdsa.Secp256k1 |
---|
a, algorithm, b, bigX, bigY, curve, G, h, n, p, parameters, x, y |
Constructor Summary | |
---|---|
PrivateKey(java.math.BigInteger S)
Creates a private key object from it's BigInteger form |
|
PrivateKey(byte[] sBytes)
Creates a private key object from a 256-bit byte array |
Method Summary | |
---|---|
java.lang.String |
getAlgorithm()
Returns the algorithm name, "ECDSA". |
byte[] |
getEncoded()
Returns the serialized private key. |
java.lang.String |
getFormat()
|
ECDomainParameters |
getParams()
Returns the elliptic curve domain parameters for the secp256k1 curve. |
PublicKey |
getPublic()
Derive a public key from this private key |
java.math.BigInteger |
getS()
Returns the 256-bit private key number |
byte[] |
serialize()
Serializes the private key into an array of 32 bytes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public PrivateKey(java.math.BigInteger S)
S
- the private key in BigInteger formpublic PrivateKey(byte[] sBytes)
sBytes
- the array of bytes representing the private keyMethod Detail |
---|
public PublicKey getPublic()
public ECDomainParameters getParams()
getParams
in interface ECKey
public java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
public byte[] getEncoded()
serialize()
.
getEncoded
in interface java.security.Key
serialize()
public java.lang.String getFormat()
getFormat
in interface java.security.Key
public java.math.BigInteger getS()
getS
in interface ECPrivateKey
public byte[] serialize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |