object DLEQUtil

Implements the DLEQ ZKP Specification: https://github.com/discreetlogcontracts/dlcspecs/blob/d01595b70269d4204b05510d19bba6a4f4fcff23/ECDSA-adaptor.md

Note that the naming is not entirely consistent between the specification and this file in hopes of making this code more readable.

The naming in this file more closely matches the naming in the secp256k1-zkp implementation: https://github.com/ElementsProject/secp256k1-zkp/tree/master/src/modules/ecdsa_adaptor

Legend: x <> fe X <> p1/point y <> adaptorSecret Y <> adaptorPoint/adaptor Z <> p2/tweakedPoint a <> k A_G <> r1 A_Y <> r2 b <> e c <> s proof <> (e, s)

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DLEQUtil
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def dleqChallengeHash(adaptorPoint: ECPublicKey, r1: ECPublicKey, r2: ECPublicKey, p1: ECPublicKey, p2: ECPublicKey): ByteVector

    Computes the challenge hash value for dleqProve as specified in https://github.com/discreetlogcontracts/dlcspecs/blob/d01595b70269d4204b05510d19bba6a4f4fcff23/ECDSA-adaptor.md#proving

  7. def dleqNonce(fe: FieldElement, adaptorPoint: ECPublicKey, point: ECPublicKey, tweakedPoint: ECPublicKey, auxRand: ByteVector): FieldElement

    Computes the nonce for dleqProve as specified in https://github.com/discreetlogcontracts/dlcspecs/blob/d01595b70269d4204b05510d19bba6a4f4fcff23/ECDSA-adaptor.md#proving

  8. def dleqPair(fe: FieldElement, adaptorPoint: ECPublicKey): (ECPublicKey, ECPublicKey)
  9. def dleqProve(fe: FieldElement, adaptorPoint: ECPublicKey, auxRand: ByteVector): (FieldElement, FieldElement)

    Proves that the DLOG_G(R') = DLOG_Y(R) (= fe) For a full description, see https://cs.nyu.edu/courses/spring07/G22.3220-001/lec3.pdf

    Proves that the DLOG_G(R') = DLOG_Y(R) (= fe) For a full description, see https://cs.nyu.edu/courses/spring07/G22.3220-001/lec3.pdf

    See also

    https://github.com/discreetlogcontracts/dlcspecs/blob/d01595b70269d4204b05510d19bba6a4f4fcff23/ECDSA-adaptor.md#proving

  10. def dleqVerify(s: FieldElement, e: FieldElement, p1: ECPublicKey, adaptor: ECPublicKey, p2: ECPublicKey): Boolean

    Verifies a proof that the DLOG_G of P1 equals the DLOG_adaptor of P2

    Verifies a proof that the DLOG_G of P1 equals the DLOG_adaptor of P2

    See also

    https://github.com/discreetlogcontracts/dlcspecs/blob/d01595b70269d4204b05510d19bba6a4f4fcff23/ECDSA-adaptor.md#verifying

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped