|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bitcoin.x6763.crypto.ecdsa.PublicKey
public class PublicKey
An elliptic curve public 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 | |
---|---|
PublicKey(byte[] publicKeyBytes)
Converts a 64 or 65-byte byte-array to a public key. |
|
PublicKey(ECPoint W)
Creates an elliptic curve public key object from an ECPoint |
|
PublicKey(PrivateKey privateKey)
Derives a public key from a private key. |
Method Summary | |
---|---|
java.lang.String |
getAlgorithm()
Returns the algorithm name, "ECDSA". |
byte[] |
getEncoded()
Encodes the public key into the same format used by Bitcoin. |
java.lang.String |
getFormat()
|
ECDomainParameters |
getParams()
Returns the elliptic curve domain parameters for the secp256k1 curve. |
ECPoint |
getW()
Returns the public key coordinates as an ECPoint object |
byte[] |
serialize()
Serializes the public key into a 64 byte array in the format of: [256-bit x-coordinate] [256-bit y-coordinate] |
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 PublicKey(ECPoint W)
W
- public PublicKey(PrivateKey privateKey)
privateKey
- a private key object that the public key
will be derived frompublic PublicKey(byte[] publicKeyBytes) throws java.security.InvalidKeyException
publicKeyBytes
- a byte-array containing the x and y coordinates
of a public key
java.security.InvalidKeyException
Method Detail |
---|
public ECDomainParameters getParams()
getParams
in interface ECKey
public java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
public byte[] getEncoded()
getEncoded
in interface java.security.Key
public java.lang.String getFormat()
getFormat
in interface java.security.Key
public ECPoint getW()
getW
in interface ECPublicKey
public byte[] serialize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |