Skip to content

Commit

Permalink
Uncommented tests and fixed the errors that arised. Excluded the "_de…
Browse files Browse the repository at this point in the history
…cl.go" files from the linter
  • Loading branch information
Robingoumaz committed Apr 14, 2024
1 parent 1f8da36 commit 16a0920
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,4 @@ issues:
- linters:
- govet
text: "shadow: declaration of \"err\" shadows declaration"
- path: ".*_decl.go"
10 changes: 4 additions & 6 deletions encrypt/ibe/ibe_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package ibe

/*
import (
"encoding/hex"
"strings"
"testing"

bls "github.com/drand/kyber-bls12381"
"github.com/stretchr/testify/require"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/pairing"
bls "go.dedis.ch/kyber/v3/pairing/circl_bls12381"
"go.dedis.ch/kyber/v3/util/random"
)

Expand All @@ -22,7 +21,7 @@ func newSetting(i uint) (
panic("invalid test")
}
if i == 1 {
suite := bls.NewBLS12381Suite()
suite := bls.NewSuiteBLS12381()
P := suite.G1().Point().Base()
s := suite.G1().Scalar().Pick(random.New())
Ppub := suite.G1().Point().Mul(s, P)
Expand All @@ -34,7 +33,7 @@ func newSetting(i uint) (
return suite, Ppub, ID, sQid, EncryptCCAonG1, DecryptCCAonG1
}
// i == 2
suite := bls.NewBLS12381Suite()
suite := bls.NewSuiteBLS12381()
P := suite.G2().Point().Base()
s := suite.G2().Scalar().Pick(random.New())
Ppub := suite.G2().Point().Mul(s, P)
Expand Down Expand Up @@ -245,7 +244,7 @@ func TestBackwardsInteropWithTypescript(t *testing.T) {
}

func TestCPAEncryptOnG1(t *testing.T) {
suite := bls.NewBLS12381Suite()
suite := bls.NewSuiteBLS12381()
P := suite.G1().Point().Pick(random.New())
s := suite.G1().Scalar().Pick(random.New())
Ppub := suite.G1().Point().Mul(s, P)
Expand All @@ -260,4 +259,3 @@ func TestCPAEncryptOnG1(t *testing.T) {
require.NoError(t, err)
require.Equal(t, msg, msg2)
}
*/
6 changes: 2 additions & 4 deletions sign/test/bls_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
package test

/*
import (
"testing"

bls "github.com/drand/kyber-bls12381"
bls "go.dedis.ch/kyber/v3/pairing/circl_bls12381"
sign "go.dedis.ch/kyber/v3/sign/bls"
)

func TestBLS12381(t *testing.T) {
suite := bls.NewBLS12381Suite()
suite := bls.NewSuiteBLS12381()
scheme := sign.NewSchemeOnG1(suite)
SchemeTesting(t, scheme)
}
*/

0 comments on commit 16a0920

Please sign in to comment.