Documentation ¶
Overview ¶
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.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultDLEq ¶
type DefaultDLEq = GoDLEq
DefaultDLEq is the default DLEq prover. Currently, the only implementation is GoDLEq.
type GoDLEq ¶
type GoDLEq struct{}
GoDLEq is a wrapper around the go-dleq library prover and verifier.
type Interface ¶
type Interface interface { Prove() (*Proof, error) Verify(*Proof) (*VerifyResult, error) }
Interface ...
type Proof ¶
type Proof struct {
// contains filtered or unexported fields
}
Proof represents a DLEq proof
func NewProofWithoutSecret ¶
NewProofWithoutSecret returns a new Proof without a secret from the given proof slice
type VerifyResult ¶
type VerifyResult struct {
// contains filtered or unexported fields
}
VerifyResult contains the public keys resulting from verifying a DLEq proof
func (*VerifyResult) Ed25519PublicKey ¶
func (r *VerifyResult) Ed25519PublicKey() *mcrypto.PublicKey
Ed25519PublicKey returns the ed25519 public key associated with the DLEq verification
func (*VerifyResult) Secp256k1PublicKey ¶
func (r *VerifyResult) Secp256k1PublicKey() *secp256k1.PublicKey
Secp256k1PublicKey returns the secp256k1 public key associated with the DLEq verification