Skip to content

Commit

Permalink
fix: removed seed from mimc (fixes Consensys#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasPiellard committed Feb 2, 2022
1 parent e8a15f4 commit 13a5294
Show file tree
Hide file tree
Showing 16 changed files with 108 additions and 187 deletions.
33 changes: 11 additions & 22 deletions ecc/bls12-377/fr/mimc/mimc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions ecc/bls12-377/twistededwards/eddsa/eddsa_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 11 additions & 22 deletions ecc/bls12-381/fr/mimc/mimc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions ecc/bls12-381/twistededwards/bandersnatch/eddsa/eddsa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by consensys/gnark-crypto DO NOT EDIT

package eddsa

import (
Expand All @@ -32,7 +30,7 @@ import (

func Example() {
// instantiate hash function
hFunc := hash.MIMC_BLS12_381.New("seed")
hFunc := hash.MIMC_BLS12_381.New()

// create a eddsa key pair
privateKey, _ := signature.EDDSA_BLS12_381.New(crand.Reader)
Expand Down Expand Up @@ -108,7 +106,7 @@ func TestEddsaMIMC(t *testing.T) {
t.Fatal(nil)
}
pubKey := privKey.Public()
hFunc := hash.MIMC_BLS12_381.New("seed")
hFunc := hash.MIMC_BLS12_381.New()

var frMsg fr.Element
frMsg.SetString("44717650746155748460101257525078853138837311576962212923649547644148297035978")
Expand Down Expand Up @@ -188,7 +186,7 @@ func BenchmarkVerify(b *testing.B) {
src := rand.NewSource(0)
r := rand.New(src)

hFunc := hash.MIMC_BLS12_381.New("seed")
hFunc := hash.MIMC_BLS12_381.New()

// create eddsa obj and sign a message
privKey, err := signature.EDDSA_BLS12_381.New(r)
Expand Down
6 changes: 3 additions & 3 deletions ecc/bls12-381/twistededwards/eddsa/eddsa_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 11 additions & 22 deletions ecc/bls24-315/fr/mimc/mimc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions ecc/bls24-315/twistededwards/eddsa/eddsa_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 13a5294

Please sign in to comment.