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
@@ -9,7 +9,7 @@ package mina
import (
"fmt"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves"
)
type MinaTSchnorrHandler struct{}
+3 -3
View File
@@ -17,9 +17,9 @@ import (
"github.com/mr-tron/base58"
"golang.org/x/crypto/blake2b"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/sonr/crypto/core/curves/native/pasta/fp"
"github.com/sonr-io/sonr/crypto/core/curves/native/pasta/fq"
"github.com/sonr-io/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves/native/pasta/fp"
"github.com/sonr-io/crypto/core/curves/native/pasta/fq"
)
const (
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/sonr-io/sonr/crypto/core/curves/native/pasta/fq"
"github.com/sonr-io/crypto/core/curves/native/pasta/fq"
)
func TestNewKeys(t *testing.T) {
+1 -1
View File
@@ -7,7 +7,7 @@
package mina
import (
"github.com/sonr-io/sonr/crypto/core/curves/native/pasta/fp"
"github.com/sonr-io/crypto/core/curves/native/pasta/fp"
)
// SBox is the type of exponentiation to perform
+2 -2
View File
@@ -7,8 +7,8 @@
package mina
import (
"github.com/sonr-io/sonr/crypto/core/curves/native/pasta/fp"
"github.com/sonr-io/sonr/crypto/core/curves/native/pasta/fq"
"github.com/sonr-io/crypto/core/curves/native/pasta/fp"
"github.com/sonr-io/crypto/core/curves/native/pasta/fq"
)
type Context struct {
@@ -12,8 +12,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/sonr-io/sonr/crypto/core/curves/native/pasta/fp"
"github.com/sonr-io/sonr/crypto/core/curves/native/pasta/fq"
"github.com/sonr-io/crypto/core/curves/native/pasta/fp"
"github.com/sonr-io/crypto/core/curves/native/pasta/fq"
)
func TestPoseidonHash(t *testing.T) {
+2 -2
View File
@@ -7,8 +7,8 @@
package mina
import (
"github.com/sonr-io/sonr/crypto/core/curves/native/pasta/fp"
"github.com/sonr-io/sonr/crypto/core/curves/native/pasta/fq"
"github.com/sonr-io/crypto/core/curves/native/pasta/fp"
"github.com/sonr-io/crypto/core/curves/native/pasta/fq"
)
// Handles the packing of bits and fields according to Mina spec
+2 -2
View File
@@ -9,8 +9,8 @@ package mina
import (
"fmt"
"github.com/sonr-io/sonr/crypto/core/curves/native/pasta/fp"
"github.com/sonr-io/sonr/crypto/core/curves/native/pasta/fq"
"github.com/sonr-io/crypto/core/curves/native/pasta/fp"
"github.com/sonr-io/crypto/core/curves/native/pasta/fq"
)
// Signature is a Mina compatible signature either for payment or delegation
+1 -1
View File
@@ -13,7 +13,7 @@ import (
"github.com/cosmos/btcutil/base58"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves"
)
// Transaction is a Mina transaction for payments or delegations
+1 -1
View File
@@ -27,7 +27,7 @@ import (
"filippo.io/edwards25519"
"golang.org/x/crypto/sha3"
"github.com/sonr-io/sonr/crypto/internal"
"github.com/sonr-io/crypto/internal"
)
const (