Skip to content

Commit

Permalink
Go back to v3.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff R. Allen committed Nov 25, 2019
1 parent 758945f commit cf1d7f3
Show file tree
Hide file tree
Showing 103 changed files with 257 additions and 253 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
language: go

go:
- "1.11.x"
- "1.13.x"

go_import_path: go.dedis.ch/kyber/v4
go_import_path: go.dedis.ch/kyber/v3

script: GO111MODULE=on make test

Expand Down
4 changes: 2 additions & 2 deletions encrypt/ecies/ecies.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"errors"
"hash"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/util/random"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/util/random"
"golang.org/x/crypto/hkdf"
)

Expand Down
4 changes: 2 additions & 2 deletions encrypt/ecies/ecies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"

"github.com/stretchr/testify/require"
"go.dedis.ch/kyber/v4/group/edwards25519"
"go.dedis.ch/kyber/v4/util/random"
"go.dedis.ch/kyber/v3/group/edwards25519"
"go.dedis.ch/kyber/v3/util/random"
)

func TestECIES(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions examples/dh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package examples
import (
"fmt"

"go.dedis.ch/kyber/v4/group/edwards25519"
"go.dedis.ch/kyber/v4/xof/blake2xb"
"go.dedis.ch/kyber/v3/group/edwards25519"
"go.dedis.ch/kyber/v3/xof/blake2xb"
)

/*
Expand Down
6 changes: 3 additions & 3 deletions examples/enc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package examples
import (
"fmt"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/edwards25519"
"go.dedis.ch/kyber/v4/util/random"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/group/edwards25519"
"go.dedis.ch/kyber/v3/util/random"
)

func ElGamalEncrypt(group kyber.Group, pubkey kyber.Point, message []byte) (
Expand Down
4 changes: 2 additions & 2 deletions examples/sig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"errors"
"fmt"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/edwards25519"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/group/edwards25519"
)

type Suite interface {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module go.dedis.ch/kyber/v4
module go.dedis.ch/kyber/v3

require (
github.com/stretchr/testify v1.3.0
go.dedis.ch/fixbuf v1.0.3
go.dedis.ch/protobuf v1.0.7
go.dedis.ch/protobuf v1.0.10
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b
golang.org/x/sys v0.0.0-20190124100055-b90733256f2e
)
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs=
go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw=
go.dedis.ch/kyber/v3 v3.0.4 h1:FDuC/S3STkvwxZ0ooo3gcp56QkUKsN7Jy7cpzBxL+vQ=
go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ=
go.dedis.ch/kyber/v4 v4.0.0-pre1 h1:1f5OPESkyxK6kPaCSV3J9BlpnoysIpbGLNujX9Ov8m4=
go.dedis.ch/kyber/v4 v4.0.0-pre1/go.mod h1:cFStqSeD4d3Y7mal8kCRSq7I7QPeTBA0f5cRl1pqEWA=
go.dedis.ch/protobuf v1.0.5 h1:EbF1czEKICxf5KY8Tm7wMF28hcOQbB6yk4IybIFWTYE=
go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRLo=
go.dedis.ch/protobuf v1.0.7 h1:wRUEiq3u0/vBhLjcw9CmAVrol+BnDyq2M0XLukdphyI=
go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4=
go.dedis.ch/protobuf v1.0.10 h1:/8plWfioYRf9sBQdCvoNfLf+XHuQWF1ctC1gWzzmojk=
go.dedis.ch/protobuf v1.0.10/go.mod h1:oIXBd4PkP3jxrN9t/eslifGU2tTeG9JuMUjMFrgfcEc=
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b h1:Elez2XeF2p9uyVj0yEUDqQ56NFcDtcBNkYP7yv8YbUE=
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/sys v0.0.0-20190124100055-b90733256f2e h1:3GIlrlVLfkoipSReOMNAgApI0ajnalyLa/EZHHca/XI=
Expand Down
6 changes: 3 additions & 3 deletions group/curve25519/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"io"
"math/big"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/internal/marshalling"
"go.dedis.ch/kyber/v4/group/mod"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/group/internal/marshalling"
"go.dedis.ch/kyber/v3/group/mod"
)

type basicPoint struct {
Expand Down
2 changes: 1 addition & 1 deletion group/curve25519/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package curve25519
import (
"testing"

"go.dedis.ch/kyber/v4/util/test"
"go.dedis.ch/kyber/v3/util/test"
)

// Test the basic implementation of the Ed25519 curve.
Expand Down
6 changes: 3 additions & 3 deletions group/curve25519/curve.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"fmt"
"math/big"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/mod"
"go.dedis.ch/kyber/v4/util/random"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/group/mod"
"go.dedis.ch/kyber/v3/util/random"
)

var zero = big.NewInt(0)
Expand Down
4 changes: 2 additions & 2 deletions group/curve25519/curve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package curve25519
import (
"testing"

"go.dedis.ch/kyber/v4/group/edwards25519"
"go.dedis.ch/kyber/v4/util/test"
"go.dedis.ch/kyber/v3/group/edwards25519"
"go.dedis.ch/kyber/v3/util/test"
)

var testSuite = NewBlakeSHA256Curve25519(false)
Expand Down
6 changes: 3 additions & 3 deletions group/curve25519/ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"io"
"math/big"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/internal/marshalling"
"go.dedis.ch/kyber/v4/group/mod"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/group/internal/marshalling"
"go.dedis.ch/kyber/v3/group/mod"
)

type extPoint struct {
Expand Down
2 changes: 1 addition & 1 deletion group/curve25519/param.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package curve25519
import (
"math/big"

"go.dedis.ch/kyber/v4/group/mod"
"go.dedis.ch/kyber/v3/group/mod"
)

// Param defines a Twisted Edwards curve (TEC).
Expand Down
6 changes: 3 additions & 3 deletions group/curve25519/proj.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"io"
"math/big"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/internal/marshalling"
"go.dedis.ch/kyber/v4/group/mod"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/group/internal/marshalling"
"go.dedis.ch/kyber/v3/group/mod"
)

type projPoint struct {
Expand Down
10 changes: 5 additions & 5 deletions group/curve25519/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"reflect"

"go.dedis.ch/fixbuf"
"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/internal/marshalling"
"go.dedis.ch/kyber/v4/util/random"
"go.dedis.ch/kyber/v4/xof/blake2xb"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/group/internal/marshalling"
"go.dedis.ch/kyber/v3/util/random"
"go.dedis.ch/kyber/v3/xof/blake2xb"
)

// SuiteCurve25519 is the suite for the 25519 curve
Expand Down Expand Up @@ -49,7 +49,7 @@ func (s *SuiteCurve25519) RandomStream() cipher.Stream {
}

// NewBlakeSHA256Curve25519 returns a cipher suite based on package
// go.dedis.ch/kyber/v4/xof/blake2xb, SHA-256, and Curve25519.
// go.dedis.ch/kyber/v3/xof/blake2xb, SHA-256, and Curve25519.
//
// If fullGroup is false, then the group is the prime-order subgroup.
//
Expand Down
2 changes: 1 addition & 1 deletion group/edwards25519/allowvt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package edwards25519
import (
"testing"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v3"
)

func TestVartime(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions group/edwards25519/curve.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"crypto/cipher"
"crypto/sha512"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/util/random"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/util/random"
)

// Curve represents the Ed25519 group.
Expand Down
2 changes: 1 addition & 1 deletion group/edwards25519/curve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"go.dedis.ch/kyber/v4/util/test"
"go.dedis.ch/kyber/v3/util/test"
)

var tSuite = NewBlakeSHA256Ed25519()
Expand Down
4 changes: 2 additions & 2 deletions group/edwards25519/point.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"errors"
"io"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/internal/marshalling"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/group/internal/marshalling"
)

var marshalPointID = [8]byte{'e', 'd', '.', 'p', 'o', 'i', 'n', 't'}
Expand Down
8 changes: 4 additions & 4 deletions group/edwards25519/scalar.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"io"
"math/big"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/internal/marshalling"
"go.dedis.ch/kyber/v4/group/mod"
"go.dedis.ch/kyber/v4/util/random"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/group/internal/marshalling"
"go.dedis.ch/kyber/v3/group/mod"
"go.dedis.ch/kyber/v3/util/random"
)

// This code is a port of the public domain, "ref10" implementation of ed25519
Expand Down
4 changes: 2 additions & 2 deletions group/edwards25519/scalar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"testing"

"github.com/stretchr/testify/require"
"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/util/random"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/util/random"
)

// SimpleCTScalar implements the scalar operations only using `ScMulAdd` by
Expand Down
12 changes: 6 additions & 6 deletions group/edwards25519/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"reflect"

"go.dedis.ch/fixbuf"
"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/internal/marshalling"
"go.dedis.ch/kyber/v4/util/random"
"go.dedis.ch/kyber/v4/xof/blake2xb"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/group/internal/marshalling"
"go.dedis.ch/kyber/v3/util/random"
"go.dedis.ch/kyber/v3/xof/blake2xb"
)

// SuiteEd25519 implements some basic functionalities such as Group, HashFactory,
Expand Down Expand Up @@ -54,15 +54,15 @@ func (s *SuiteEd25519) RandomStream() cipher.Stream {
}

// NewBlakeSHA256Ed25519 returns a cipher suite based on package
// go.dedis.ch/kyber/v4/xof/blake2xb, SHA-256, and the Ed25519 curve.
// go.dedis.ch/kyber/v3/xof/blake2xb, SHA-256, and the Ed25519 curve.
// It produces cryptographically random numbers via package crypto/rand.
func NewBlakeSHA256Ed25519() *SuiteEd25519 {
suite := new(SuiteEd25519)
return suite
}

// NewBlakeSHA256Ed25519WithRand returns a cipher suite based on package
// go.dedis.ch/kyber/v4/xof/blake2xb, SHA-256, and the Ed25519 curve.
// go.dedis.ch/kyber/v3/xof/blake2xb, SHA-256, and the Ed25519 curve.
// It produces cryptographically random numbers via the provided stream r.
func NewBlakeSHA256Ed25519WithRand(r cipher.Stream) *SuiteEd25519 {
suite := new(SuiteEd25519)
Expand Down
2 changes: 1 addition & 1 deletion group/internal/marshalling/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"io"
"reflect"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v3"
)

// PointMarshalTo provides a generic implementation of Point.EncodeTo
Expand Down
6 changes: 3 additions & 3 deletions group/mod/int.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"io"
"math/big"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/internal/marshalling"
"go.dedis.ch/kyber/v4/util/random"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/group/internal/marshalling"
"go.dedis.ch/kyber/v3/util/random"
)

var one = big.NewInt(1)
Expand Down
8 changes: 4 additions & 4 deletions group/nist/curve.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"io"
"math/big"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/internal/marshalling"
"go.dedis.ch/kyber/v4/group/mod"
"go.dedis.ch/kyber/v4/util/random"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/group/internal/marshalling"
"go.dedis.ch/kyber/v3/group/mod"
"go.dedis.ch/kyber/v3/util/random"
)

type curvePoint struct {
Expand Down
2 changes: 1 addition & 1 deletion group/nist/group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package nist
import (
"testing"

"go.dedis.ch/kyber/v4/util/test"
"go.dedis.ch/kyber/v3/util/test"
)

var testQR512 = NewBlakeSHA256QR512()
Expand Down
10 changes: 5 additions & 5 deletions group/nist/qrsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"reflect"

"go.dedis.ch/fixbuf"
"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/internal/marshalling"
"go.dedis.ch/kyber/v4/util/random"
"go.dedis.ch/kyber/v4/xof/blake2xb"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/group/internal/marshalling"
"go.dedis.ch/kyber/v3/util/random"
"go.dedis.ch/kyber/v3/xof/blake2xb"
)

// QrSuite is a quadratic residue suite
Expand Down Expand Up @@ -50,7 +50,7 @@ func (s *QrSuite) New(t reflect.Type) interface{} {
}

// NewBlakeSHA256QR512 returns a cipher suite based on package
// go.dedis.ch/kyber/v4/xof/blake2xb, SHA-256, and a residue group of
// go.dedis.ch/kyber/v3/xof/blake2xb, SHA-256, and a residue group of
// quadratic residues modulo a 512-bit prime.
//
// This group size should be used only for testing and experimentation.
Expand Down
8 changes: 4 additions & 4 deletions group/nist/residue.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"io"
"math/big"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/group/internal/marshalling"
"go.dedis.ch/kyber/v4/group/mod"
"go.dedis.ch/kyber/v4/util/random"
"go.dedis.ch/kyber/v3"
"go.dedis.ch/kyber/v3/group/internal/marshalling"
"go.dedis.ch/kyber/v3/group/mod"
"go.dedis.ch/kyber/v3/util/random"
)

var one = big.NewInt(1)
Expand Down
Loading

0 comments on commit cf1d7f3

Please sign in to comment.