Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/athanorlabs/go-dleq
go implementation of cross-group discrete logarithm equality proofs
https://github.com/athanorlabs/go-dleq
cryptography dleq zero-knowledge
Last synced: about 1 month ago
JSON representation
go implementation of cross-group discrete logarithm equality proofs
- Host: GitHub
- URL: https://github.com/athanorlabs/go-dleq
- Owner: AthanorLabs
- License: lgpl-3.0
- Created: 2022-02-06T22:20:57.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-29T00:53:50.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T20:34:15.644Z (9 months ago)
- Topics: cryptography, dleq, zero-knowledge
- Language: Go
- Homepage:
- Size: 43.9 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-dleq
This repo contains an implementation of cross-group discrete logarithm equality as specified in [MRL-0010](https://www.getmonero.org/resources/research-lab/pubs/MRL-0010.pdf). 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
```go
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)
}
```