Packages

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.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ECPublicKey
  2. Serializable
  3. Product
  4. Equals
  5. ECPublicKeyApi
  6. PublicKey
  7. BaseECKey
  8. NetworkElement
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ECPublicKey(bytes: ByteVector)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def adaptorVerify(msg: ByteVector, adaptorPoint: ECPublicKey, adaptorSignature: ECAdaptorSignature): Boolean
  5. 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.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def byteSize: Long

    The size of the NetworkElement in bytes.

    The size of the NetworkElement in bytes.

    Definition Classes
    NetworkElement
  8. val bytes: ByteVector

    The byte representation of the NetworkElement

    The byte representation of the NetworkElement

    Definition Classes
    ECPublicKeyNetworkElement
  9. def bytesLE: ByteVector

    The byte representation of the NetworkElement in little endian

    The byte representation of the NetworkElement in little endian

    Definition Classes
    NetworkElement
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  11. 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
    ECPublicKeyECPublicKeyApi
  12. lazy val decompressed: ECPublicKey.this.type

    Returns the decompressed version of this PublicKey

    Returns the decompressed version of this PublicKey

    Definition Classes
    ECPublicKeyApi
  13. def decompressedBytes: ByteVector

    Returns the decompressed representation of this ECPublicKey

  14. def decompressedHex: String
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(obj: Any): Boolean
    Definition Classes
    ECPublicKey → Equals → AnyRef → Any
  17. def extractAdaptorSecret(adaptorSignature: ECAdaptorSignature, signature: ECDigitalSignature): ECPrivateKey
  18. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def hashCode(): Int
    Definition Classes
    ECPublicKeyApi → AnyRef → Any
  21. def hex: String

    The hexadecimal representation of the NetworkElement

    The hexadecimal representation of the NetworkElement

    Definition Classes
    NetworkElement
  22. def hexLE: String

    The hexadecimal representation of the NetworkElement in little endian

    The hexadecimal representation of the NetworkElement in little endian

    Definition Classes
    NetworkElement
  23. 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
    ECPublicKeyECPublicKeyApi
  24. 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
    ECPublicKeyECPublicKeyApi
  25. 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
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. def multiply(tweak: FieldElement): ECPublicKey
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def negate: ECPublicKey
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. def parity: KeyParity
  33. def productElementNames: Iterator[String]
    Definition Classes
    Product
  34. def schnorrComputePoint(data: ByteVector, nonce: SchnorrNonce): ECPublicKey
  35. def schnorrNonce: SchnorrNonce
  36. def schnorrPublicKey: SchnorrPublicKey
  37. def schnorrVerify(data: ByteVector, signature: SchnorrDigitalSignature): Boolean
  38. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  39. def toPoint: SecpPointFinite

    Converts this public key into the raw underlying point on secp256k1 for computation.

  40. def toPublicKeyBytes(isCompressed: Boolean = true): ECPublicKeyBytes

    Converts this ECPublicKey to raw ECPublicKeyBytes using the specified serialization.

  41. def toString(): String
    Definition Classes
    ECPublicKey → AnyRef → Any
  42. def toXOnly: XOnlyPubKey
  43. def verify(hex: String, signature: ECDigitalSignature): Boolean
    Definition Classes
    ECPublicKeyApi
  44. 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
  45. def verify(hash: HashDigest, signature: ECDigitalSignature): Boolean
    Definition Classes
    ECPublicKeyApi
  46. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  47. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  48. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from ECPublicKeyApi

Inherited from PublicKey

Inherited from BaseECKey

Inherited from NetworkElement

Inherited from AnyRef

Inherited from Any

Ungrouped