mirror of
https://github.com/sonr-io/crypto.git
synced 2026-08-02 15:31:38 +00:00
refactor(crypto): simplify elliptic curve implementation
This commit is contained in:
@@ -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{}
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user