refactor(crypto): simplify elliptic curve implementation

This commit is contained in:
2025-10-09 15:11:59 -04:00
parent a934caa7d3
commit 7d339ae522
205 changed files with 380 additions and 380 deletions

View File

@@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves"
)
var testCurve = curves.ED25519()

View File

@@ -10,7 +10,7 @@ import (
"fmt"
"io"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves"
)
type FeldmanVerifier struct {

View File

@@ -10,7 +10,7 @@ import (
"fmt"
"io"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves"
)
// Pedersen Verifiable Secret Sharing Scheme

View File

@@ -9,7 +9,7 @@ package sharing
import (
"io"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves"
)
type Polynomial struct {

View File

@@ -18,7 +18,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves"
)
func TestNewPoly(t *testing.T) {

View File

@@ -16,7 +16,7 @@ import (
"fmt"
"io"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves"
)
type ShamirShare struct {

View File

@@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves"
)
func TestShamirSplitInvalidArgs(t *testing.T) {

View File

@@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves"
)
var (

View File

@@ -11,9 +11,9 @@ import (
"math/big"
"sync"
"github.com/sonr-io/sonr/crypto/core/curves/native"
"github.com/sonr-io/sonr/crypto/core/curves/native/bls12381"
"github.com/sonr-io/sonr/crypto/internal"
"github.com/sonr-io/crypto/core/curves/native"
"github.com/sonr-io/crypto/core/curves/native/bls12381"
"github.com/sonr-io/crypto/internal"
)
var (

View File

@@ -11,8 +11,8 @@ import (
"math/big"
"sync"
"github.com/sonr-io/sonr/crypto/core/curves/native"
"github.com/sonr-io/sonr/crypto/core/curves/native/bls12381"
"github.com/sonr-io/crypto/core/curves/native"
"github.com/sonr-io/crypto/core/curves/native/bls12381"
)
var (

View File

@@ -7,7 +7,7 @@
package v1
import (
kryptology "github.com/sonr-io/sonr/crypto/core/curves"
kryptology "github.com/sonr-io/crypto/core/curves"
)
// ShareVerifier is used to verify secret shares from Feldman or Pedersen VSS

View File

@@ -14,8 +14,8 @@ import (
"filippo.io/edwards25519"
"github.com/stretchr/testify/require"
core "github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/sonr/crypto/internal"
core "github.com/sonr-io/crypto/core/curves"
"github.com/sonr-io/crypto/internal"
)
var (

View File

@@ -13,8 +13,8 @@ import (
ed "filippo.io/edwards25519"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/sonr/crypto/internal"
"github.com/sonr-io/crypto/core/curves"
"github.com/sonr-io/crypto/internal"
)
var (

View File

@@ -11,7 +11,7 @@ import (
"encoding/binary"
"fmt"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves"
)
// Feldman Verifiable Secret Sharing Scheme

View File

@@ -13,7 +13,7 @@ import (
"github.com/btcsuite/btcd/btcec/v2"
"github.com/stretchr/testify/require"
core "github.com/sonr-io/sonr/crypto/core/curves"
core "github.com/sonr-io/crypto/core/curves"
)
var (

View File

@@ -12,8 +12,8 @@ import (
"fmt"
"math/big"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/sonr/crypto/internal"
"github.com/sonr-io/crypto/core/curves"
"github.com/sonr-io/crypto/internal"
)
// Pedersen Verifiable Secret Sharing Scheme

View File

@@ -7,7 +7,7 @@
package v1
import (
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves"
)
type polynomial struct {

View File

@@ -11,7 +11,7 @@ import (
"fmt"
"math/big"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves"
)
// ShamirShare is the data from splitting a secret

View File

@@ -13,7 +13,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/sonr-io/sonr/crypto/core/curves"
"github.com/sonr-io/crypto/core/curves"
)
func TestShamirSplitInvalidArgs(t *testing.T) {