Skip to content

Commit

Permalink
Merge pull request #2 from mdehoog/gnark-crypto-elements
Browse files Browse the repository at this point in the history
Add support for custom fields + generation parameters
  • Loading branch information
triplewz authored Mar 1, 2024
2 parents 79d8165 + d1f972f commit 7d33728
Show file tree
Hide file tree
Showing 25 changed files with 644 additions and 4,783 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,5 @@ jobs:
run: |
go get -v -t -d ./...
- name: TestBlsCurve
run: go test -v ./bls12_381/... --bench=. -cover

- name: TestBenchmark
run: go test -v --bench=. -cover
run: go test -v --bench=. -cover
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ func main() {

// generate round constants for poseidon hash.
// width=len(input)+1.
cons, _ := GenPoseidonConstants(4)
cons, _ := GenPoseidonConstants[*fr.Element](4)

// use OptimizedStatic hash mode.
h1, _ := Hash(input, cons, OptimizedStatic)
h1, _ := Hash[*fr.Element](input, cons, OptimizedStatic)
// use OptimizedDynamic hash mode.
h2, _ := Hash(input, cons, OptimizedDynamic)
h2, _ := Hash[*fr.Element](input, cons, OptimizedDynamic)
// use Correct hash mode.
h3, _ := Hash(input, cons, Correct)
h3, _ := Hash[*fr.Element](input, cons, Correct)
}
```
# Benchmark
Expand Down
60 changes: 0 additions & 60 deletions bls12_381/arith.go

This file was deleted.

23 changes: 0 additions & 23 deletions bls12_381/asm.go

This file was deleted.

24 changes: 0 additions & 24 deletions bls12_381/asm_noadx.go

This file was deleted.

43 changes: 0 additions & 43 deletions bls12_381/doc.go

This file was deleted.

Loading

0 comments on commit 7d33728

Please sign in to comment.