mirror of
https://github.com/AthanorLabs/atomic-swap.git
synced 2026-01-09 14:18:03 -05:00
13
dleq/dleq.go
13
dleq/dleq.go
@@ -1,3 +1,8 @@
|
||||
// Package dleq provides a sub-api built on top of the go-dleq package for our atomic
|
||||
// swaps. The API allows you to verify that a Monero public spend key on the ed25519 curve
|
||||
// have the same discrete logarithm (same shared secret) as a public key on the secp256k1
|
||||
// curve. A ZK DLEq proof is used to prove equivalence of the secret key corresponding to
|
||||
// public keys on both curves.
|
||||
package dleq
|
||||
|
||||
import (
|
||||
@@ -25,14 +30,6 @@ func NewProofWithoutSecret(p []byte) *Proof {
|
||||
}
|
||||
}
|
||||
|
||||
// NewProofWithSecret returns a new Proof with the given secret.
|
||||
// Note that the returned proof actually lacks the `proof` field.
|
||||
func NewProofWithSecret(s [32]byte) *Proof {
|
||||
return &Proof{
|
||||
secret: s,
|
||||
}
|
||||
}
|
||||
|
||||
// Secret returns the proof's 32-byte secret
|
||||
func (p *Proof) Secret() [32]byte {
|
||||
var s [32]byte
|
||||
|
||||
Reference in New Issue
Block a user