You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**fri:** modified challenge generation so it fits in a snark variable
15
+
-**fri:** added check of correctness between rounds
14
16
15
17
### Fix
16
18
19
+
- Handle edge case in Karabina decompression ([#219](https://github.com/ConsenSys/gnark-crypto/issues/219))
20
+
- check nbTasks config when running msm, test all possible c-bit windows in when testing.Short not set) ([#226](https://github.com/ConsenSys/gnark-crypto/issues/226))
21
+
- element.SetString(_) returns error if invalid input instead of panic
22
+
- expand_msg_xmd copy bug, a few tests ([#201](https://github.com/ConsenSys/gnark-crypto/issues/201))
17
23
- closes [#199](https://github.com/ConsenSys/gnark-crypto/issues/199). Correct bound in eddsa key gen template
18
24
19
-
### Refactor & Cosmetics
25
+
### Perf
26
+
27
+
- remove unecessary inverse in KZG-verify
28
+
- faster GLV scalar decompostion
29
+
30
+
### Refactor & Docs
20
31
32
+
- moved consensys/goff into field/goff ([#204](https://github.com/ConsenSys/gnark-crypto/issues/204))
21
33
- clean comments in curves ([#193](https://github.com/ConsenSys/gnark-crypto/issues/193))
22
-
- replace modulus generated by constants ([#194](https://github.com/ConsenSys/gnark-crypto/issues/194))
34
+
- remove dead code ([#230](https://github.com/ConsenSys/gnark-crypto/issues/230))
- polish readme.md with updated godoc subpackage links ([#235](https://github.com/ConsenSys/gnark-crypto/issues/235))
39
+
- acknowledge that inv(0)==0 in comments as a convention ([#233](https://github.com/ConsenSys/gnark-crypto/issues/233))
40
+
- added note in pairing godoc - doesn't check inputs are in correct subgroup ([#231](https://github.com/ConsenSys/gnark-crypto/issues/231))
41
+
- add security estimates of implemented curves in comments
42
+
43
+
### Test
44
+
45
+
- fix [#205](https://github.com/ConsenSys/gnark-crypto/issues/205) - msm bench with different bases ([#206](https://github.com/ConsenSys/gnark-crypto/issues/206))
46
+
- vectors generated using <https://github.com/armfazh/h2c-go-ref>
47
+
-**all curves:** compress/decompress pairing result
26
48
27
49
### Pull Requests
28
50
51
+
- Merge pull request [#232](https://github.com/ConsenSys/gnark-crypto/issues/232) from ConsenSys/docs/comments
52
+
- Merge pull request [#229](https://github.com/ConsenSys/gnark-crypto/issues/229) from ConsenSys/update_deps
53
+
- Merge pull request [#227](https://github.com/ConsenSys/gnark-crypto/issues/227) from ConsenSys/fix/element_setstring
54
+
- Merge pull request [#228](https://github.com/ConsenSys/gnark-crypto/issues/228) from ConsenSys/fix/race/test
55
+
- Merge pull request [#224](https://github.com/ConsenSys/gnark-crypto/issues/224) from ConsenSys/refactor/scalarmul
56
+
- Merge pull request [#220](https://github.com/ConsenSys/gnark-crypto/issues/220) from ConsenSys/perf/kzg-verify
57
+
- Merge pull request [#223](https://github.com/ConsenSys/gnark-crypto/issues/223) from ConsenSys/doc/security-estimates-curves
58
+
- Merge pull request [#216](https://github.com/ConsenSys/gnark-crypto/issues/216) from ConsenSys/feat/poly
59
+
- Merge pull request [#217](https://github.com/ConsenSys/gnark-crypto/issues/217) from ConsenSys/string-utils
60
+
- Merge pull request [#213](https://github.com/ConsenSys/gnark-crypto/issues/213) from ConsenSys/perf/glv
61
+
- Merge pull request [#129](https://github.com/ConsenSys/gnark-crypto/issues/129) from ConsenSys/feat/GT-compression
62
+
- Merge pull request [#209](https://github.com/ConsenSys/gnark-crypto/issues/209) from ConsenSys/codegen/svdw-not-e4
63
+
- Merge pull request [#203](https://github.com/ConsenSys/gnark-crypto/issues/203) from ConsenSys/tests/bn254-vectors
64
+
- Merge pull request [#196](https://github.com/ConsenSys/gnark-crypto/issues/196) from ConsenSys/patch/hashToFpGeneric
29
65
- Merge pull request [#202](https://github.com/ConsenSys/gnark-crypto/issues/202) from ConsenSys/gbotrel/issue199
30
66
- Merge pull request [#200](https://github.com/ConsenSys/gnark-crypto/issues/200) from tyGavinZJU/develop
31
67
- Merge pull request [#85](https://github.com/ConsenSys/gnark-crypto/issues/85) from ConsenSys/feat/fri
*[Elliptic curve cryptography](ecc/ecc.md) (+pairing) on BN254, BLS12-381, BLS12-377, BW6-761, BLS24-315, BLS24-317, BW6-633, BLS12-378 and BW6-756
7
-
*[Finite field arithmetic](field/field.md) (fast big.Int)
8
-
* FFT
9
-
* Polynomial commitment schemes
10
-
* MiMC
11
-
* EdDSA (on the "companion" twisted edwards curves)
5
+
`gnark-crypto` provides efficient cryptographic primitives, in Go:
6
+
7
+
* Elliptic curve cryptography & **Pairing** on:
8
+
*[`bn254`] ([audit report]())
9
+
*[`bls12-381`] ([audit report]())
10
+
*[`bls24-317`]
11
+
*[`bls12-377`] / [`bw6-761`]
12
+
*[`bls24-315`] / [`bw6-633`]
13
+
*[`bls12-378`] / [`bw6-756`]
14
+
* Each of these curve has a [`twistededwards`] sub-package with its companion curve which allow efficient elliptic curve cryptography inside zkSNARK circuits.
15
+
*[`field/goff`] - Finite field arithmetic code generator (blazingly fast big.Int)
16
+
*[`fft`] - Fast Fourier Transform
17
+
*[`fri`] - FRI (multiplicative) commitment scheme
18
+
*[`fiatshamir`] - Fiat-Shamir transcript builder
19
+
*[`mimc`] - MiMC hash function using Miyaguchi-Preneel construction
20
+
*[`kzg`] - KZG commitment scheme
21
+
*[`permutation`] - Permutation proofs
22
+
*[`plookup`] - Plookup proofs
23
+
*[`eddsa`] - EdDSA signatures (on the companion [`twistededwards`] curves)
12
24
13
25
`gnark-crypto` is actively developed and maintained by the team (gnark@consensys.net | [HackMD](https://hackmd.io/@gnark)) behind:
14
-
*[`gnark`: a framework to execute (and verify) algorithms in zero-knowledge](https://github.com/consensys/gnark)
26
+
27
+
*[`gnark`: a framework to execute (and verify) algorithms in zero-knowledge](https://github.com/consensys/gnark)
15
28
16
29
## Warning
17
-
**`gnark-crypto` has not been audited and is provided as-is, use at your own risk. In particular, `gnark-crypto` makes no security guarantees such as constant time implementation or side-channel attack resistance.**
30
+
31
+
**`gnark-crypto` is not fully audited and is provided as-is, use at your own risk. In particular, `gnark-crypto` makes no security guarantees such as constant time implementation or side-channel attack resistance.**
18
32
19
33
**To report a security bug, please refer to [`gnark` Security Policy](https://github.com/ConsenSys/gnark/blob/master/SECURITY.md).**
20
34
@@ -24,7 +38,7 @@
24
38
25
39
### Go version
26
40
27
-
`gnark-crypto` is tested with the last 2 major releases of Go (1.16 and 1.17).
41
+
`gnark-crypto` is tested with the last 2 major releases of Go (1.17 and 1.18).
28
42
29
43
### Install `gnark-crypto`
30
44
@@ -34,24 +48,19 @@ go get github.com/consensys/gnark-crypto
34
48
35
49
Note if that if you use go modules, in `go.mod` the module path is case sensitive (use `consensys` and not `ConsenSys`).
The APIs are consistent accross the curves. For example, [here is `bn254` godoc](https://pkg.go.dev/github.com/consensys/gnark-crypto/ecc/bn254#pkg-overview).
42
-
43
51
### Development
44
52
45
53
Most (but not all) of the code is generated from the templates in `internal/generator`.
46
54
47
-
The generated code contains little to no interfaces and is strongly typed with a base field (generated by the `gnark-crypto/field`). The two main factors driving this design choice are:
55
+
The generated code contains little to no interfaces and is strongly typed with a field (generated by the `gnark-crypto/field` package). The two main factors driving this design choice are:
48
56
49
57
1. Performance: `gnark-crypto` algorithms manipulates millions (if not billions) of field elements. Interface indirection at this level, plus garbage collection indexing takes a heavy toll on perf.
50
-
2.No generics in Go: need to derive (mostly) identical code for various moduli and curves, with consistent APIs
58
+
2.Need to derive (mostly) identical code for various moduli and curves, with consistent APIs. Generics introduce significant performance overhead and are not yet suited for high performance computing.
51
59
52
60
To regenerate the files, see `internal/generator/main.go`. Run:
53
-
```
54
-
go generate ./internal/...
61
+
62
+
```bash
63
+
go generate ./...
55
64
```
56
65
57
66
## Benchmarks
@@ -86,7 +95,26 @@ Please use the following BibTeX to cite the most recent release.
86
95
87
96
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/consensys/gnark-crypto/tags).
88
97
89
-
90
98
## License
91
99
92
-
This project is licensed under the Apache 2 License - see the [LICENSE](LICENSE) file for details
100
+
This project is licensed under the Apache 2 License - see the [LICENSE](LICENSE) file for details.
// Security: estimated 126-bit level following [https://eprint.iacr.org/2019/885.pdf]
18
+
// (r is 253 bits and p¹² is 4521 bits)
19
+
//
20
+
// Warning
21
+
//
22
+
// This code has not been audited and is provided as-is. In particular, there is no security guarantees such as constant time implementation or side-channel attack resistance.
0 commit comments