Skip to content

Commit

Permalink
updated imports to v5
Browse files Browse the repository at this point in the history
  • Loading branch information
Pro7ech committed Nov 14, 2023
1 parent e95c51b commit c031b14
Show file tree
Hide file tree
Showing 173 changed files with 539 additions and 539 deletions.
4 changes: 2 additions & 2 deletions core/rgsw/elements.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"bufio"
"io"

"github.com/tuneinsight/lattigo/v4/core/rlwe"
"github.com/tuneinsight/lattigo/v4/utils/buffer"
"github.com/tuneinsight/lattigo/v5/core/rlwe"
"github.com/tuneinsight/lattigo/v5/utils/buffer"
)

// Ciphertext is a generic type for RGSW ciphertext.
Expand Down
4 changes: 2 additions & 2 deletions core/rgsw/encryptor.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package rgsw

import (
"github.com/tuneinsight/lattigo/v4/core/rlwe"
"github.com/tuneinsight/lattigo/v4/ring/ringqp"
"github.com/tuneinsight/lattigo/v5/core/rlwe"
"github.com/tuneinsight/lattigo/v5/ring/ringqp"
)

// Encryptor is a type for encrypting RGSW ciphertexts. It implements the rlwe.Encryptor
Expand Down
6 changes: 3 additions & 3 deletions core/rgsw/evaluator.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package rgsw

import (
"github.com/tuneinsight/lattigo/v4/core/rlwe"
"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/ring/ringqp"
"github.com/tuneinsight/lattigo/v5/core/rlwe"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/ring/ringqp"
)

// Evaluator is a type for evaluating homomorphic operations involving RGSW ciphertexts.
Expand Down
8 changes: 4 additions & 4 deletions core/rgsw/rgsw_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"math/big"
"testing"

"github.com/tuneinsight/lattigo/v4/core/rlwe"
"github.com/tuneinsight/lattigo/v4/ring/ringqp"
"github.com/tuneinsight/lattigo/v4/utils/bignum"
"github.com/tuneinsight/lattigo/v4/utils/buffer"
"github.com/tuneinsight/lattigo/v5/core/rlwe"
"github.com/tuneinsight/lattigo/v5/ring/ringqp"
"github.com/tuneinsight/lattigo/v5/utils/bignum"
"github.com/tuneinsight/lattigo/v5/utils/buffer"

"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions core/rgsw/utils.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package rgsw

import (
"github.com/tuneinsight/lattigo/v4/core/rlwe"
"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v5/core/rlwe"
"github.com/tuneinsight/lattigo/v5/ring"
)

// NoiseRGSWCiphertext returns the log2 of the standard deviation of the noise of each component of the RGSW ciphertext.
Expand Down
4 changes: 2 additions & 2 deletions core/rlwe/ciphertext.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package rlwe
import (
"fmt"

"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/utils/sampling"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/utils/sampling"
)

// Ciphertext is a generic type for RLWE ciphertexts.
Expand Down
4 changes: 2 additions & 2 deletions core/rlwe/decryptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package rlwe
import (
"fmt"

"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/utils"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/utils"
)

// Decryptor is a structure used to decrypt Ciphertext. It stores the secret-key.
Expand Down
2 changes: 1 addition & 1 deletion core/rlwe/distribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package rlwe
import (
"math"

"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v5/ring"
)

type Distribution struct {
Expand Down
10 changes: 5 additions & 5 deletions core/rlwe/element.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"io"

"github.com/google/go-cmp/cmp"
"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/ring/ringqp"
"github.com/tuneinsight/lattigo/v4/utils/buffer"
"github.com/tuneinsight/lattigo/v4/utils/sampling"
"github.com/tuneinsight/lattigo/v4/utils/structs"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/ring/ringqp"
"github.com/tuneinsight/lattigo/v5/utils/buffer"
"github.com/tuneinsight/lattigo/v5/utils/sampling"
"github.com/tuneinsight/lattigo/v5/utils/structs"
)

// ElementInterface is a common interface for Ciphertext and Plaintext types.
Expand Down
8 changes: 4 additions & 4 deletions core/rlwe/encryptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"reflect"

"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/ring/ringqp"
"github.com/tuneinsight/lattigo/v4/utils"
"github.com/tuneinsight/lattigo/v4/utils/sampling"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/ring/ringqp"
"github.com/tuneinsight/lattigo/v5/utils"
"github.com/tuneinsight/lattigo/v5/utils/sampling"
)

// EncryptionKey is an interface for encryption keys. Valid encryption
Expand Down
6 changes: 3 additions & 3 deletions core/rlwe/evaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package rlwe
import (
"fmt"

"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/ring/ringqp"
"github.com/tuneinsight/lattigo/v4/utils"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/ring/ringqp"
"github.com/tuneinsight/lattigo/v5/utils"
)

// Evaluator is a struct that holds the necessary elements to execute general homomorphic
Expand Down
6 changes: 3 additions & 3 deletions core/rlwe/evaluator_automorphism.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package rlwe
import (
"fmt"

"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/ring/ringqp"
"github.com/tuneinsight/lattigo/v4/utils"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/ring/ringqp"
"github.com/tuneinsight/lattigo/v5/utils"
)

// Automorphism computes phi(ct), where phi is the map X -> X^galEl. The method requires
Expand Down
4 changes: 2 additions & 2 deletions core/rlwe/evaluator_evaluationkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package rlwe
import (
"fmt"

"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/utils"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/utils"
)

// ApplyEvaluationKey is a generic method to apply an EvaluationKey on a ciphertext.
Expand Down
6 changes: 3 additions & 3 deletions core/rlwe/evaluator_gadget_product.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package rlwe
import (
"fmt"

"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/ring/ringqp"
"github.com/tuneinsight/lattigo/v4/utils"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/ring/ringqp"
"github.com/tuneinsight/lattigo/v5/utils"
)

// GadgetProduct evaluates poly x Gadget -> RLWE where
Expand Down
10 changes: 5 additions & 5 deletions core/rlwe/gadgetciphertext.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"io"

"github.com/google/go-cmp/cmp"
"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/ring/ringqp"
"github.com/tuneinsight/lattigo/v4/utils"
"github.com/tuneinsight/lattigo/v4/utils/buffer"
"github.com/tuneinsight/lattigo/v4/utils/structs"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/ring/ringqp"
"github.com/tuneinsight/lattigo/v5/utils"
"github.com/tuneinsight/lattigo/v5/utils/buffer"
"github.com/tuneinsight/lattigo/v5/utils/structs"
)

// GadgetCiphertext is a struct for storing an encrypted
Expand Down
6 changes: 3 additions & 3 deletions core/rlwe/inner_sum.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package rlwe

import (
"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/ring/ringqp"
"github.com/tuneinsight/lattigo/v4/utils"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/ring/ringqp"
"github.com/tuneinsight/lattigo/v5/utils"
)

// InnerSum applies an optimized inner sum on the Ciphertext (log2(n) + HW(n) rotations with double hoisting).
Expand Down
6 changes: 3 additions & 3 deletions core/rlwe/keygenerator.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package rlwe
import (
"fmt"

"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/ring/ringqp"
"github.com/tuneinsight/lattigo/v4/utils"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/ring/ringqp"
"github.com/tuneinsight/lattigo/v5/utils"
)

// KeyGenerator is a structure that stores the elements required to create new keys,
Expand Down
6 changes: 3 additions & 3 deletions core/rlwe/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"io"

"github.com/google/go-cmp/cmp"
"github.com/tuneinsight/lattigo/v4/ring/ringqp"
"github.com/tuneinsight/lattigo/v4/utils/buffer"
"github.com/tuneinsight/lattigo/v4/utils/structs"
"github.com/tuneinsight/lattigo/v5/ring/ringqp"
"github.com/tuneinsight/lattigo/v5/utils/buffer"
"github.com/tuneinsight/lattigo/v5/utils/structs"
)

// SecretKey is a type for generic RLWE secret keys.
Expand Down
4 changes: 2 additions & 2 deletions core/rlwe/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"math/big"

"github.com/google/go-cmp/cmp"
"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/utils/bignum"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/utils/bignum"
)

// MetaData is a struct storing metadata.
Expand Down
4 changes: 2 additions & 2 deletions core/rlwe/packing.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"math/big"
"math/bits"

"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/utils"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/utils"
)

// Trace maps X -> sum((-1)^i * X^{i*n+1}) for n <= i < N
Expand Down
6 changes: 3 additions & 3 deletions core/rlwe/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"math/bits"

"github.com/google/go-cmp/cmp"
"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/ring/ringqp"
"github.com/tuneinsight/lattigo/v4/utils"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/ring/ringqp"
"github.com/tuneinsight/lattigo/v5/utils"
)

// MaxLogN is the log2 of the largest supported polynomial modulus degree.
Expand Down
4 changes: 2 additions & 2 deletions core/rlwe/plaintext.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package rlwe
import (
"io"

"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/utils/sampling"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/utils/sampling"
)

// Plaintext is a common base type for RLWE plaintexts.
Expand Down
2 changes: 1 addition & 1 deletion core/rlwe/rlwe_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/stretchr/testify/require"
"github.com/tuneinsight/lattigo/v4/utils"
"github.com/tuneinsight/lattigo/v5/utils"
)

func BenchmarkRLWE(b *testing.B) {
Expand Down
12 changes: 6 additions & 6 deletions core/rlwe/rlwe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (

"github.com/stretchr/testify/require"

"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/ring/ringqp"
"github.com/tuneinsight/lattigo/v4/utils"
"github.com/tuneinsight/lattigo/v4/utils/buffer"
"github.com/tuneinsight/lattigo/v4/utils/sampling"
"github.com/tuneinsight/lattigo/v4/utils/structs"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/ring/ringqp"
"github.com/tuneinsight/lattigo/v5/utils"
"github.com/tuneinsight/lattigo/v5/utils/buffer"
"github.com/tuneinsight/lattigo/v5/utils/sampling"
"github.com/tuneinsight/lattigo/v5/utils/structs"
)

var flagParamString = flag.String("params", "", "specify the test cryptographic parameters as a JSON string. Overrides -short and -long.")
Expand Down
2 changes: 1 addition & 1 deletion core/rlwe/scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"math"
"math/big"

"github.com/tuneinsight/lattigo/v4/utils/bignum"
"github.com/tuneinsight/lattigo/v5/utils/bignum"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion core/rlwe/security.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package rlwe

import "github.com/tuneinsight/lattigo/v4/ring"
import "github.com/tuneinsight/lattigo/v5/ring"

const (
// XsUniformTernary is the standard deviation of a ternary key with uniform distribution
Expand Down
4 changes: 2 additions & 2 deletions core/rlwe/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"math"
"math/big"

"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/utils"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/utils"
)

// NoisePublicKey returns the log2 of the standard deviation of the input public-key with respect to the given secret-key and parameters.
Expand Down
4 changes: 2 additions & 2 deletions examples/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package examples
import (
"testing"

"github.com/tuneinsight/lattigo/v4/he/hefloat"
"github.com/tuneinsight/lattigo/v4/he/heint"
"github.com/tuneinsight/lattigo/v5/he/hefloat"
"github.com/tuneinsight/lattigo/v5/he/heint"
)

func TestExampleParams(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions examples/multi_party/int_pir/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"sync"
"time"

"github.com/tuneinsight/lattigo/v4/core/rlwe"
"github.com/tuneinsight/lattigo/v4/he/heint"
"github.com/tuneinsight/lattigo/v4/mhe"
"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/utils/sampling"
"github.com/tuneinsight/lattigo/v5/core/rlwe"
"github.com/tuneinsight/lattigo/v5/he/heint"
"github.com/tuneinsight/lattigo/v5/mhe"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/utils/sampling"
)

func check(err error) {
Expand Down
10 changes: 5 additions & 5 deletions examples/multi_party/int_psi/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"sync"
"time"

"github.com/tuneinsight/lattigo/v4/core/rlwe"
"github.com/tuneinsight/lattigo/v4/he/heint"
"github.com/tuneinsight/lattigo/v4/mhe"
"github.com/tuneinsight/lattigo/v4/ring"
"github.com/tuneinsight/lattigo/v4/utils/sampling"
"github.com/tuneinsight/lattigo/v5/core/rlwe"
"github.com/tuneinsight/lattigo/v5/he/heint"
"github.com/tuneinsight/lattigo/v5/mhe"
"github.com/tuneinsight/lattigo/v5/ring"
"github.com/tuneinsight/lattigo/v5/utils/sampling"
)

func check(err error) {
Expand Down
6 changes: 3 additions & 3 deletions examples/multi_party/thresh_eval_key_gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"sync"
"time"

"github.com/tuneinsight/lattigo/v4/core/rlwe"
"github.com/tuneinsight/lattigo/v4/mhe"
"github.com/tuneinsight/lattigo/v4/utils/sampling"
"github.com/tuneinsight/lattigo/v5/core/rlwe"
"github.com/tuneinsight/lattigo/v5/mhe"
"github.com/tuneinsight/lattigo/v5/utils/sampling"
)

// This example showcases the use of the mhe package to generate an evaluation key in a multiparty setting.
Expand Down
Loading

0 comments on commit c031b14

Please sign in to comment.