refactor(crypto): simplify elliptic curve implementation

This commit is contained in:
Prad Nukala
2025-10-09 15:11:59 -04:00
parent a934caa7d3
commit 7d339ae522
205 changed files with 380 additions and 380 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ package bls12381
import (
"math/bits"
"github.com/sonr-io/sonr/crypto/core/curves/native"
"github.com/sonr-io/crypto/core/curves/native"
)
var fqModulusBytes = [native.FieldBytes]byte{
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"io"
"math/big"
"github.com/sonr-io/sonr/crypto/core/curves/native"
"github.com/sonr-io/sonr/crypto/internal"
"github.com/sonr-io/crypto/core/curves/native"
"github.com/sonr-io/crypto/internal"
)
// fp field element mod p
+1 -1
View File
@@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/sonr-io/sonr/crypto/internal"
"github.com/sonr-io/crypto/internal"
)
func TestFpSetOne(t *testing.T) {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"math/big"
"sync"
"github.com/sonr-io/sonr/crypto/core/curves/native"
"github.com/sonr-io/crypto/core/curves/native"
)
type Fq [native.FieldLimbs]uint64
+2 -2
View File
@@ -14,8 +14,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/sonr-io/sonr/crypto/core/curves/native"
"github.com/sonr-io/sonr/crypto/internal"
"github.com/sonr-io/crypto/core/curves/native"
"github.com/sonr-io/crypto/internal"
)
func TestFqSetOne(t *testing.T) {
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"github.com/pkg/errors"
"github.com/sonr-io/sonr/crypto/core/curves/native"
"github.com/sonr-io/sonr/crypto/internal"
"github.com/sonr-io/crypto/core/curves/native"
"github.com/sonr-io/crypto/internal"
)
var (
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/sonr-io/sonr/crypto/core/curves/native"
"github.com/sonr-io/crypto/core/curves/native"
)
func TestG1IsOnCurve(t *testing.T) {
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"github.com/pkg/errors"
"github.com/sonr-io/sonr/crypto/core/curves/native"
"github.com/sonr-io/sonr/crypto/internal"
"github.com/sonr-io/crypto/core/curves/native"
"github.com/sonr-io/crypto/internal"
)
var (
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/sonr-io/sonr/crypto/core/curves/native"
"github.com/sonr-io/crypto/core/curves/native"
)
func TestG2IsOnCurve(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package bls12381
import (
"io"
"github.com/sonr-io/sonr/crypto/core/curves/native"
"github.com/sonr-io/sonr/crypto/internal"
"github.com/sonr-io/crypto/core/curves/native"
"github.com/sonr-io/crypto/internal"
)
// GtFieldBytes is the number of bytes needed to represent this field
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/sonr-io/sonr/crypto/core/curves/native"
"github.com/sonr-io/crypto/core/curves/native"
)
func TestSinglePairing(t *testing.T) {