Categorygithub.com/athanorlabs/go-dleq
modulepackage
0.1.0
Repository: https://github.com/athanorlabs/go-dleq.git
Documentation: pkg.go.dev

# README

go-dleq

This repo contains an implementation of cross-group discrete logarithm equality as specified in MRL-0010. In addition to what's specified in the paper, it contains an additional proof of knowledge of the witness ie. a signature on both curves. Currently, secp256k1 and ed25519 are supported. The library is written such that other curves can be added.

Usage

import (
    "github.com/athanorlabs/go-dleq"
    "github.com/athanorlabs/go-dleq/ed25519"
    "github.com/athanorlabs/go-dleq/secp256k1"
)

curveA := secp256k1.NewCurve()
curveB := ed25519.NewCurve()
x, err := dleq.GenerateSecretForCurves(curveA, curveB)
if err != nil {
    panic(err)
}

proof, err := dleq.NewProof(curveA, curveB, x)
if err != nil {
    panic(err)
}

err = proof.Verify(curveA, curveB)
if err != nil {
    panic(err)
}

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

GenerateSecretForCurves generates a secret value that has a corresponding commitment on both curves.
NewProof returns a new proof for the given secret on the given curves.

# Structs

Proof represents a DLEq proof and commitment to the witness.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author