case class ECPublicKey(bytes: ByteVector) extends BaseECKey with ECPublicKeyApi with Product with Serializable
Created by chris on 2/16/16. A valid deserialized ECDSA public key.
This class wraps some underlying _bytes but after checking that these _bytes are valid, all serializations (compressed and decompressed) of this public key are (lazily) computed where the decompressed version is used internally for computation and the compressed version is provided by the NetworkElement::bytes member.
Note that 0x00 is not a valid ECPublicKey but is a valid SecpPoint meaning that if you are doing computations on public key (points) that may have intermediate 0x00 values, then you should convert using toPoint, do computation, and then convert back toPublicKey in the end.
- Alphabetic
- By Inheritance
- ECPublicKey
- Serializable
- Product
- Equals
- ECPublicKeyApi
- PublicKey
- BaseECKey
- NetworkElement
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ECPublicKey(bytes: ByteVector)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def adaptorVerify(msg: ByteVector, adaptorPoint: ECPublicKey, adaptorSignature: ECAdaptorSignature): Boolean
- def add(otherKey: ECPublicKey): ECPublicKey
Adds this ECPublicKey to another as points and returns the resulting ECPublicKey.
Adds this ECPublicKey to another as points and returns the resulting ECPublicKey. If you are adding more than two points together use CryptoUtil.combinePubKeys instead.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def byteSize: Long
The size of the NetworkElement in bytes.
The size of the NetworkElement in bytes.
- Definition Classes
- NetworkElement
- val bytes: ByteVector
The byte representation of the NetworkElement
The byte representation of the NetworkElement
- Definition Classes
- ECPublicKey → NetworkElement
- def bytesLE: ByteVector
The byte representation of the NetworkElement in little endian
The byte representation of the NetworkElement in little endian
- Definition Classes
- NetworkElement
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- lazy val compressed: ECPublicKey.this.type
Returns this same ECPublicKey wrapping the underlying compressed _bytes.
Returns this same ECPublicKey wrapping the underlying compressed _bytes. This function doesn't really have any use, don't use it probably. Same for decompressed.
- Definition Classes
- ECPublicKey → ECPublicKeyApi
- lazy val decompressed: ECPublicKey.this.type
Returns the decompressed version of this PublicKey
Returns the decompressed version of this PublicKey
- Definition Classes
- ECPublicKeyApi
- def decompressedBytes: ByteVector
Returns the decompressed representation of this ECPublicKey
- def decompressedHex: String
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(obj: Any): Boolean
- Definition Classes
- ECPublicKey → Equals → AnyRef → Any
- def extractAdaptorSecret(adaptorSignature: ECAdaptorSignature, signature: ECDigitalSignature): ECPrivateKey
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- ECPublicKeyApi → AnyRef → Any
- def hex: String
The hexadecimal representation of the NetworkElement
The hexadecimal representation of the NetworkElement
- Definition Classes
- NetworkElement
- def hexLE: String
The hexadecimal representation of the NetworkElement in little endian
The hexadecimal representation of the NetworkElement in little endian
- Definition Classes
- NetworkElement
- def isCompressed: Boolean
Returns true only if the underlying wrapped _bytes are compressed
Returns true only if the underlying wrapped _bytes are compressed
- Definition Classes
- ECPublicKey → ECPublicKeyApi
- def isDecompressed: Boolean
Returns true only if the underlying wrapped _bytes are decompressed
Returns true only if the underlying wrapped _bytes are decompressed
- Definition Classes
- ECPublicKey → ECPublicKeyApi
- def isFullyValid: Boolean
Returns true if the underlying bytes being wrapped are valid according to secp256k1
Returns true if the underlying bytes being wrapped are valid according to secp256k1
- Definition Classes
- ECPublicKeyApi
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def multiply(tweak: FieldElement): ECPublicKey
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def negate: ECPublicKey
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def parity: KeyParity
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def schnorrComputePoint(data: ByteVector, nonce: SchnorrNonce): ECPublicKey
- def schnorrNonce: SchnorrNonce
- def schnorrPublicKey: SchnorrPublicKey
- def schnorrVerify(data: ByteVector, signature: SchnorrDigitalSignature): Boolean
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toPoint: SecpPointFinite
Converts this public key into the raw underlying point on secp256k1 for computation.
- def toPublicKeyBytes(isCompressed: Boolean = true): ECPublicKeyBytes
Converts this ECPublicKey to raw ECPublicKeyBytes using the specified serialization.
- def toString(): String
- Definition Classes
- ECPublicKey → AnyRef → Any
- def toXOnly: XOnlyPubKey
- def verify(hex: String, signature: ECDigitalSignature): Boolean
- Definition Classes
- ECPublicKeyApi
- def verify(data: ByteVector, signature: ECDigitalSignature): Boolean
Verifies if a given piece of data is signed by the ECPrivateKey's corresponding ECPublicKey.
Verifies if a given piece of data is signed by the ECPrivateKey's corresponding ECPublicKey.
- Definition Classes
- ECPublicKeyApi
- def verify(hash: HashDigest, signature: ECDigitalSignature): Boolean
- Definition Classes
- ECPublicKeyApi
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()