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)
- Alphabetic
- By Inheritance
- DLEQUtil
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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
- 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
- def dleqPair(fe: FieldElement, adaptorPoint: ECPublicKey): (ECPublicKey, ECPublicKey)
- 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
- 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
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- 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
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()