Skip to content

Rename var_ed25519 to more idiomatic go name #539

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading