Interface SecpPubKey
- All Superinterfaces:
AsymmetricKey, DEREncodablePREVIEW, ECKey, ECPublicKey, Key, PublicKey, SecpPoint, SecpPoint.Point, SecpPoint.Uncompressed, Serializable
- All Known Implementing Classes:
SecpPubKeyImpl
A valid secp256k1 Public Key that is a subclass of
ECPublicKey.-
Nested Class Summary
Nested classes/interfaces inherited from interface SecpPoint
SecpPoint.Compressed, SecpPoint.Infinity, SecpPoint.Point, SecpPoint.Uncompressed -
Field Summary
Fields inherited from interface ECPublicKey
serialVersionUIDFields inherited from interface SecpPoint
POINT_INFINITY -
Method Summary
Modifier and TypeMethodDescriptiondefault StringReturn associated cryptographic algorithm.default SecpPoint.CompressedReturn as a compressed pointdefault byte[]Return serialized key.default StringReturn default encoding (serialization) format.default ECParameterSpecGet the Elliptic Curve parametersdefault SecpPoint.UncompressedReturn as an uncompressed pointgetW()Returns this key as aSecpECPointor, if it is the "point at infinity" it returnsECPoint.POINT_INFINITYpoint()Get the uncompressedSecpPointdefault byte[]Serialize key in primary encoded format (compressed)default byte[]serialize(boolean compressed) Return encoded key in either compressed or uncompressed SEC format.default SecpXOnlyPubKeyxOnly()Return the x-only public key.Methods inherited from interface SecpPoint.Point
isOdd, xMethods inherited from interface SecpPoint.Uncompressed
compress, toECPoint, y
-
Method Details
-
getAlgorithm
Return associated cryptographic algorithm. This implements theKeyinterface.- Specified by:
getAlgorithmin interfaceKey- Returns:
- string indicating algorithm
-
getFormat
-
getEncoded
default byte[] getEncoded()Return serialized key. This implements theKeyinterface and is an alias forserialize().- Specified by:
getEncodedin interfaceKey- Returns:
- public key in compressed format
-
serialize
default byte[] serialize()Serialize key in primary encoded format (compressed)- Specified by:
serializein interfaceSecpPoint.Uncompressed- Returns:
- public key in compressed format
-
serialize
default byte[] serialize(boolean compressed) Return encoded key in either compressed or uncompressed SEC format.- Parameters:
compressed- Use compressed variant of format- Returns:
- public key in SEC format
-
getCompressed
-
getUncompressed
Return as an uncompressed point- Returns:
- uncompressed point
-
xOnly
-
getW
ECPoint getW()Returns this key as aSecpECPointor, if it is the "point at infinity" it returnsECPoint.POINT_INFINITY- Specified by:
getWin interfaceECPublicKey- Returns:
- point as
ECPointor subclass.
-
point
-
getParams
Get the Elliptic Curve parameters- Specified by:
getParamsin interfaceAsymmetricKey- Specified by:
getParamsin interfaceECKey- Specified by:
getParamsin interfaceECPublicKey- Returns:
- the parameter spec
-