mirror of
https://github.com/sonr-io/crypto.git
synced 2026-08-04 00:01:38 +00:00
refactor(crypto): simplify elliptic curve implementation
This commit is contained in:
@@ -10,8 +10,8 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves"
|
||||
"github.com/sonr-io/sonr/crypto/signatures/common"
|
||||
"github.com/sonr-io/crypto/core/curves"
|
||||
"github.com/sonr-io/crypto/signatures/common"
|
||||
)
|
||||
|
||||
// BlindSignature is a BBS+ blind signature
|
||||
|
||||
@@ -14,9 +14,9 @@ import (
|
||||
"github.com/gtank/merlin"
|
||||
"golang.org/x/crypto/sha3"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves"
|
||||
"github.com/sonr-io/sonr/crypto/internal"
|
||||
"github.com/sonr-io/sonr/crypto/signatures/common"
|
||||
"github.com/sonr-io/crypto/core/curves"
|
||||
"github.com/sonr-io/crypto/internal"
|
||||
"github.com/sonr-io/crypto/signatures/common"
|
||||
)
|
||||
|
||||
// BlindSignatureContext contains the data used for computing
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
func TestBlindSignatureContext(t *testing.T) {
|
||||
|
||||
@@ -9,7 +9,7 @@ package bbs
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves"
|
||||
"github.com/sonr-io/crypto/core/curves"
|
||||
)
|
||||
|
||||
// MessageGenerators are used to sign a vector of commitments for
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
|
||||
"github.com/gtank/merlin"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves"
|
||||
"github.com/sonr-io/sonr/crypto/signatures/common"
|
||||
"github.com/sonr-io/crypto/core/curves"
|
||||
"github.com/sonr-io/crypto/signatures/common"
|
||||
)
|
||||
|
||||
// PokSignature a.k.a. Proof of Knowledge of a Signature
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
|
||||
"github.com/gtank/merlin"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves"
|
||||
"github.com/sonr-io/sonr/crypto/signatures/common"
|
||||
"github.com/sonr-io/crypto/core/curves"
|
||||
"github.com/sonr-io/crypto/signatures/common"
|
||||
)
|
||||
|
||||
// PokSignatureProof is the actual proof sent from a prover
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
"github.com/gtank/merlin"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves"
|
||||
"github.com/sonr-io/sonr/crypto/signatures/common"
|
||||
"github.com/sonr-io/crypto/core/curves"
|
||||
"github.com/sonr-io/crypto/signatures/common"
|
||||
)
|
||||
|
||||
func TestPokSignatureProofSomeMessagesRevealed(t *testing.T) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves"
|
||||
"github.com/sonr-io/crypto/core/curves"
|
||||
)
|
||||
|
||||
// PublicKey is a BBS+ verification key
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"golang.org/x/crypto/hkdf"
|
||||
"golang.org/x/crypto/sha3"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves"
|
||||
"github.com/sonr-io/crypto/core/curves"
|
||||
)
|
||||
|
||||
// SecretKey is a BBS+ signing key
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves"
|
||||
"github.com/sonr-io/crypto/core/curves"
|
||||
)
|
||||
|
||||
// Signature is a BBS+ signature
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/sonr-io/sonr/crypto/core/curves"
|
||||
"github.com/sonr-io/crypto/core/curves"
|
||||
)
|
||||
|
||||
func TestSignatureWorks(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user