mirror of
https://github.com/sonr-io/crypto.git
synced 2026-08-02 23:41:37 +00:00
refactor(crypto): simplify elliptic curve implementation
This commit is contained in:
@@ -15,11 +15,11 @@ import (
|
||||
|
||||
"golang.org/x/crypto/hkdf"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves"
|
||||
"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/sonr/crypto/sharing"
|
||||
"github.com/sonr-io/crypto/core/curves"
|
||||
"github.com/sonr-io/crypto/core/curves/native"
|
||||
"github.com/sonr-io/crypto/core/curves/native/bls12381"
|
||||
"github.com/sonr-io/crypto/internal"
|
||||
"github.com/sonr-io/crypto/sharing"
|
||||
)
|
||||
|
||||
// Secret key in Fr
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
"math/big"
|
||||
"testing"
|
||||
|
||||
"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/bls12381"
|
||||
"github.com/sonr-io/crypto/internal"
|
||||
)
|
||||
|
||||
func genSecretKey(t *testing.T) *SecretKey {
|
||||
|
||||
@@ -9,9 +9,9 @@ package bls_sig
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"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"
|
||||
)
|
||||
|
||||
// Implement BLS signatures on the BLS12-381 curve
|
||||
|
||||
@@ -9,7 +9,7 @@ package bls_sig
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves/native/bls12381"
|
||||
"github.com/sonr-io/crypto/core/curves/native/bls12381"
|
||||
)
|
||||
|
||||
func generateAugSignatureG1(sk *SecretKey, msg []byte, t *testing.T) *SignatureVt {
|
||||
|
||||
@@ -9,7 +9,7 @@ package bls_sig
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves/native/bls12381"
|
||||
"github.com/sonr-io/crypto/core/curves/native/bls12381"
|
||||
)
|
||||
|
||||
func generateBasicSignatureG1(sk *SecretKey, msg []byte, t *testing.T) *SignatureVt {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves/native/bls12381"
|
||||
"github.com/sonr-io/crypto/core/curves/native/bls12381"
|
||||
)
|
||||
|
||||
const numAggregateG1 = 10
|
||||
|
||||
@@ -9,9 +9,9 @@ package bls_sig
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"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"
|
||||
)
|
||||
|
||||
// Implement BLS signatures on the BLS12-381 curve
|
||||
|
||||
@@ -9,7 +9,7 @@ package bls_sig
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves/native/bls12381"
|
||||
"github.com/sonr-io/crypto/core/curves/native/bls12381"
|
||||
)
|
||||
|
||||
func generateAugSignatureG2(sk *SecretKey, msg []byte, t *testing.T) *Signature {
|
||||
|
||||
@@ -9,7 +9,7 @@ package bls_sig
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves/native/bls12381"
|
||||
"github.com/sonr-io/crypto/core/curves/native/bls12381"
|
||||
)
|
||||
|
||||
func generateBasicSignatureG2(sk *SecretKey, msg []byte, t *testing.T) *Signature {
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves/native/bls12381"
|
||||
"github.com/sonr-io/crypto/core/curves/native/bls12381"
|
||||
)
|
||||
|
||||
const numAggregateG2 = 10
|
||||
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
bls "github.com/sonr-io/sonr/crypto/signatures/bls/bls_sig"
|
||||
bls "github.com/sonr-io/crypto/signatures/bls/bls_sig"
|
||||
)
|
||||
|
||||
type signOp struct {
|
||||
|
||||
Reference in New Issue
Block a user