Skip to content

Commit

Permalink
Merge pull request #539 from dedis/idiomatic-package-name
Browse files Browse the repository at this point in the history
Rename var_ed25519 to more idiomatic go name
  • Loading branch information
K1li4nL authored Aug 6, 2024
2 parents f907bcc + 54563c3 commit b172e02
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 21 deletions.
5 changes: 0 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,6 @@ issues:
- path: "group/edwards25519/scalar.go"
linters:
- ineffassign
- path: "pairing|group"
linters:
- revive
- stylecheck
text: "var-naming: don't use an underscore in package name|ST1003: should not use underscores in package names"
- path: "pairing/(circl_bls12381|bn254)/."
linters:
- errcheck #TODO: proper error handling
Expand Down
6 changes: 3 additions & 3 deletions encrypt/ecies/ecies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/require"
"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/edwards25519"
"go.dedis.ch/kyber/v4/group/edwards25519vartime"
"go.dedis.ch/kyber/v4/group/p256"
"go.dedis.ch/kyber/v4/group/var_ed25519"
"go.dedis.ch/kyber/v4/util/random"
)

Expand Down Expand Up @@ -54,8 +54,8 @@ func BenchmarkECIES(b *testing.B) {
kyber.Group
}{
{edwards25519.NewBlakeSHA256Ed25519()},
{var_ed25519.NewBlakeSHA256Ed25519(false)},
{var_ed25519.NewBlakeSHA256Ed25519(true)},
{edwards25519vartime.NewBlakeSHA256Ed25519(false)},
{edwards25519vartime.NewBlakeSHA256Ed25519(true)},
{p256.NewBlakeSHA256P256()},
{p256.NewBlakeSHA256QR512()},
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//go:build experimental
// +build experimental

package var_ed25519
package edwards25519vartime

import (
"crypto/cipher"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//go:build experimental
// +build experimental

package var_ed25519
package edwards25519vartime

import (
"testing"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package var_ed25519
package edwards25519vartime

import (
"crypto/cipher"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package var_ed25519
package edwards25519vartime

import (
"testing"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package var_ed25519
package edwards25519vartime

import (
"crypto/cipher"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package var_ed25519 contains several implementations of Twisted Edwards Curves,
// Package edwards25519vartime contains several implementations of Twisted Edwards Curves,
// from general and unoptimized to highly specialized and optimized.
//
// Twisted Edwards curves are elliptic curves satisfying the equation:
Expand All @@ -10,7 +10,7 @@
// are isomorphic to curves having c == 1.
//
// For details see Bernstein et al, "Twisted Edwards Curves", http://eprint.iacr.org/2008/013.pdf
package var_ed25519
package edwards25519vartime

import (
"math/big"
Expand Down Expand Up @@ -74,7 +74,7 @@ func Param1174() *Param {
func ParamEd25519() *Param {
var p Param
var qs big.Int
p.Name = "var_ed25519"
p.Name = "edwards25519vartime"
p.P.SetBit(zero, 255, 1).Sub(&p.P, big.NewInt(19))
qs.SetString("27742317777372353535851937790883648493", 10)
p.Q.SetBit(zero, 252, 1).Add(&p.Q, &qs)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package var_ed25519
package edwards25519vartime

import (
"crypto/cipher"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package var_ed25519
package edwards25519vartime

import (
"crypto/cipher"
Expand Down
6 changes: 3 additions & 3 deletions proof/proof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/edwards25519"
"go.dedis.ch/kyber/v4/group/edwards25519vartime"
"go.dedis.ch/kyber/v4/group/p256"
"go.dedis.ch/kyber/v4/group/var_ed25519"
"go.dedis.ch/kyber/v4/xof/blake2xb"
)

Expand Down Expand Up @@ -256,8 +256,8 @@ func BenchmarkProof(b *testing.B) {
Suite
}{
{edwards25519.NewBlakeSHA256Ed25519()},
{var_ed25519.NewBlakeSHA256Ed25519(false)},
{var_ed25519.NewBlakeSHA256Ed25519(true)},
{edwards25519vartime.NewBlakeSHA256Ed25519(false)},
{edwards25519vartime.NewBlakeSHA256Ed25519(true)},
{p256.NewBlakeSHA256P256()},
{p256.NewBlakeSHA256QR512()},
}
Expand Down

0 comments on commit b172e02

Please sign in to comment.