diff --git a/core/rgsw/elements.go b/core/rgsw/elements.go index d4f2ce88..b83fdffb 100644 --- a/core/rgsw/elements.go +++ b/core/rgsw/elements.go @@ -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. diff --git a/core/rgsw/encryptor.go b/core/rgsw/encryptor.go index fa7485e1..b926e739 100644 --- a/core/rgsw/encryptor.go +++ b/core/rgsw/encryptor.go @@ -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 diff --git a/core/rgsw/evaluator.go b/core/rgsw/evaluator.go index 771a52dc..cec20fb5 100644 --- a/core/rgsw/evaluator.go +++ b/core/rgsw/evaluator.go @@ -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. diff --git a/core/rgsw/rgsw_test.go b/core/rgsw/rgsw_test.go index d9746810..cf43845a 100644 --- a/core/rgsw/rgsw_test.go +++ b/core/rgsw/rgsw_test.go @@ -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" ) diff --git a/core/rgsw/utils.go b/core/rgsw/utils.go index fc9f2667..15c86830 100644 --- a/core/rgsw/utils.go +++ b/core/rgsw/utils.go @@ -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. diff --git a/core/rlwe/ciphertext.go b/core/rlwe/ciphertext.go index 135bf5a6..16375bb4 100644 --- a/core/rlwe/ciphertext.go +++ b/core/rlwe/ciphertext.go @@ -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. diff --git a/core/rlwe/decryptor.go b/core/rlwe/decryptor.go index 9447661c..69895984 100644 --- a/core/rlwe/decryptor.go +++ b/core/rlwe/decryptor.go @@ -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. diff --git a/core/rlwe/distribution.go b/core/rlwe/distribution.go index beadb795..3cf7557c 100644 --- a/core/rlwe/distribution.go +++ b/core/rlwe/distribution.go @@ -3,7 +3,7 @@ package rlwe import ( "math" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/ring" ) type Distribution struct { diff --git a/core/rlwe/element.go b/core/rlwe/element.go index 4978b392..ba0d968c 100644 --- a/core/rlwe/element.go +++ b/core/rlwe/element.go @@ -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. diff --git a/core/rlwe/encryptor.go b/core/rlwe/encryptor.go index 9181baec..9f940172 100644 --- a/core/rlwe/encryptor.go +++ b/core/rlwe/encryptor.go @@ -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 diff --git a/core/rlwe/evaluator.go b/core/rlwe/evaluator.go index 99019434..6d4072eb 100644 --- a/core/rlwe/evaluator.go +++ b/core/rlwe/evaluator.go @@ -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 diff --git a/core/rlwe/evaluator_automorphism.go b/core/rlwe/evaluator_automorphism.go index 32010ccc..7e03555f 100644 --- a/core/rlwe/evaluator_automorphism.go +++ b/core/rlwe/evaluator_automorphism.go @@ -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 diff --git a/core/rlwe/evaluator_evaluationkey.go b/core/rlwe/evaluator_evaluationkey.go index 7733ed03..7b90cd01 100644 --- a/core/rlwe/evaluator_evaluationkey.go +++ b/core/rlwe/evaluator_evaluationkey.go @@ -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. diff --git a/core/rlwe/evaluator_gadget_product.go b/core/rlwe/evaluator_gadget_product.go index 487c4832..447f852b 100644 --- a/core/rlwe/evaluator_gadget_product.go +++ b/core/rlwe/evaluator_gadget_product.go @@ -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 diff --git a/core/rlwe/gadgetciphertext.go b/core/rlwe/gadgetciphertext.go index 73780571..ef680e52 100644 --- a/core/rlwe/gadgetciphertext.go +++ b/core/rlwe/gadgetciphertext.go @@ -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 diff --git a/core/rlwe/inner_sum.go b/core/rlwe/inner_sum.go index a7ceae6e..7291c7d7 100644 --- a/core/rlwe/inner_sum.go +++ b/core/rlwe/inner_sum.go @@ -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). diff --git a/core/rlwe/keygenerator.go b/core/rlwe/keygenerator.go index 303f18d0..547f52df 100644 --- a/core/rlwe/keygenerator.go +++ b/core/rlwe/keygenerator.go @@ -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, diff --git a/core/rlwe/keys.go b/core/rlwe/keys.go index 3ad36740..7ac9de07 100644 --- a/core/rlwe/keys.go +++ b/core/rlwe/keys.go @@ -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. diff --git a/core/rlwe/metadata.go b/core/rlwe/metadata.go index 5be15518..f6621edb 100644 --- a/core/rlwe/metadata.go +++ b/core/rlwe/metadata.go @@ -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. diff --git a/core/rlwe/packing.go b/core/rlwe/packing.go index 55e32865..a000aad0 100644 --- a/core/rlwe/packing.go +++ b/core/rlwe/packing.go @@ -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 diff --git a/core/rlwe/params.go b/core/rlwe/params.go index a90c5a59..1d9e6174 100644 --- a/core/rlwe/params.go +++ b/core/rlwe/params.go @@ -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. diff --git a/core/rlwe/plaintext.go b/core/rlwe/plaintext.go index 602d30a1..f375e6f6 100644 --- a/core/rlwe/plaintext.go +++ b/core/rlwe/plaintext.go @@ -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. diff --git a/core/rlwe/rlwe_benchmark_test.go b/core/rlwe/rlwe_benchmark_test.go index 2951d227..f31b3aeb 100644 --- a/core/rlwe/rlwe_benchmark_test.go +++ b/core/rlwe/rlwe_benchmark_test.go @@ -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) { diff --git a/core/rlwe/rlwe_test.go b/core/rlwe/rlwe_test.go index f7307e95..e3337d82 100644 --- a/core/rlwe/rlwe_test.go +++ b/core/rlwe/rlwe_test.go @@ -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.") diff --git a/core/rlwe/scale.go b/core/rlwe/scale.go index 48c7ce73..8d2721a4 100644 --- a/core/rlwe/scale.go +++ b/core/rlwe/scale.go @@ -6,7 +6,7 @@ import ( "math" "math/big" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) const ( diff --git a/core/rlwe/security.go b/core/rlwe/security.go index c6ba7acf..09edc635 100644 --- a/core/rlwe/security.go +++ b/core/rlwe/security.go @@ -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 diff --git a/core/rlwe/utils.go b/core/rlwe/utils.go index 68cd241d..74925807 100644 --- a/core/rlwe/utils.go +++ b/core/rlwe/utils.go @@ -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. diff --git a/examples/example_test.go b/examples/example_test.go index 42264e01..2e909871 100644 --- a/examples/example_test.go +++ b/examples/example_test.go @@ -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) { diff --git a/examples/multi_party/int_pir/main.go b/examples/multi_party/int_pir/main.go index 5bc8fd4e..93d9cc86 100644 --- a/examples/multi_party/int_pir/main.go +++ b/examples/multi_party/int_pir/main.go @@ -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) { diff --git a/examples/multi_party/int_psi/main.go b/examples/multi_party/int_psi/main.go index 69c79c3e..e0e179e0 100644 --- a/examples/multi_party/int_psi/main.go +++ b/examples/multi_party/int_psi/main.go @@ -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) { diff --git a/examples/multi_party/thresh_eval_key_gen/main.go b/examples/multi_party/thresh_eval_key_gen/main.go index daae8c0f..765b0c96 100644 --- a/examples/multi_party/thresh_eval_key_gen/main.go +++ b/examples/multi_party/thresh_eval_key_gen/main.go @@ -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. diff --git a/examples/params.go b/examples/params.go index 1f8a26cf..614b25b4 100644 --- a/examples/params.go +++ b/examples/params.go @@ -1,9 +1,9 @@ package examples import ( - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/he/heint" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/he/heint" + "github.com/tuneinsight/lattigo/v5/ring" ) var ( diff --git a/examples/single_party/applications/bin_blind_rotations/main.go b/examples/single_party/applications/bin_blind_rotations/main.go index 3ab83c61..77d2dcee 100644 --- a/examples/single_party/applications/bin_blind_rotations/main.go +++ b/examples/single_party/applications/bin_blind_rotations/main.go @@ -6,10 +6,10 @@ import ( "fmt" "time" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hebin" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hebin" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" ) // Function to evaluate diff --git a/examples/single_party/applications/int_ride_hailing/main.go b/examples/single_party/applications/int_ride_hailing/main.go index 209c96aa..c82885eb 100644 --- a/examples/single_party/applications/int_ride_hailing/main.go +++ b/examples/single_party/applications/int_ride_hailing/main.go @@ -6,11 +6,11 @@ import ( "math" "math/bits" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/utils/sampling" - "github.com/tuneinsight/lattigo/v4/he/heint" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/he/heint" + "github.com/tuneinsight/lattigo/v5/ring" ) var flagShort = flag.Bool("short", false, "run the example with a smaller and insecure ring degree.") diff --git a/examples/single_party/applications/int_vectorized_OLE/main.go b/examples/single_party/applications/int_vectorized_OLE/main.go index c069af99..fc1e6155 100644 --- a/examples/single_party/applications/int_vectorized_OLE/main.go +++ b/examples/single_party/applications/int_vectorized_OLE/main.go @@ -6,9 +6,9 @@ import ( "math/big" "time" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) // Vectorized oblivious evaluation is a two-party protocol for the function f(x) = ax + b where a sender diff --git a/examples/single_party/applications/reals_bootstrapping/basics/main.go b/examples/single_party/applications/reals_bootstrapping/basics/main.go index 99b337fe..97fbedd1 100644 --- a/examples/single_party/applications/reals_bootstrapping/basics/main.go +++ b/examples/single_party/applications/reals_bootstrapping/basics/main.go @@ -10,12 +10,12 @@ import ( "fmt" "math" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/he/hefloat/bootstrapping" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/he/hefloat/bootstrapping" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) var flagShort = flag.Bool("short", false, "run the example with a smaller and insecure ring degree.") diff --git a/examples/single_party/applications/reals_bootstrapping/high_precision/main.go b/examples/single_party/applications/reals_bootstrapping/high_precision/main.go index d02db45b..574547db 100644 --- a/examples/single_party/applications/reals_bootstrapping/high_precision/main.go +++ b/examples/single_party/applications/reals_bootstrapping/high_precision/main.go @@ -24,13 +24,13 @@ import ( "fmt" "math" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/he/hefloat/bootstrapping" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/he/hefloat/bootstrapping" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) var flagShort = flag.Bool("short", false, "run the example with a smaller and insecure ring degree.") diff --git a/examples/single_party/applications/reals_bootstrapping/slim/main.go b/examples/single_party/applications/reals_bootstrapping/slim/main.go index d174c6f9..8b6bdc51 100644 --- a/examples/single_party/applications/reals_bootstrapping/slim/main.go +++ b/examples/single_party/applications/reals_bootstrapping/slim/main.go @@ -38,12 +38,12 @@ import ( "math" "math/big" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/he/hefloat/bootstrapping" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/he/hefloat/bootstrapping" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) var flagShort = flag.Bool("short", false, "run the example with a smaller and insecure ring degree.") diff --git a/examples/single_party/applications/reals_scheme_switching/main.go b/examples/single_party/applications/reals_scheme_switching/main.go index 8824c322..9cb615c4 100644 --- a/examples/single_party/applications/reals_scheme_switching/main.go +++ b/examples/single_party/applications/reals_scheme_switching/main.go @@ -13,11 +13,11 @@ import ( "math/big" "time" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hebin" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hebin" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" ) // ======================================== diff --git a/examples/single_party/applications/reals_sigmoid_chebyshev/main.go b/examples/single_party/applications/reals_sigmoid_chebyshev/main.go index 234b8c15..6f553c8d 100644 --- a/examples/single_party/applications/reals_sigmoid_chebyshev/main.go +++ b/examples/single_party/applications/reals_sigmoid_chebyshev/main.go @@ -6,11 +6,11 @@ import ( "math" "math/big" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) func main() { diff --git a/examples/single_party/applications/reals_sigmoid_minimax/main.go b/examples/single_party/applications/reals_sigmoid_minimax/main.go index fd01837b..89533a93 100644 --- a/examples/single_party/applications/reals_sigmoid_minimax/main.go +++ b/examples/single_party/applications/reals_sigmoid_minimax/main.go @@ -6,11 +6,11 @@ import ( "math" "math/big" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) func main() { diff --git a/examples/single_party/applications/reals_vectorized_polynomial_evaluation/main.go b/examples/single_party/applications/reals_vectorized_polynomial_evaluation/main.go index ddd463f9..76b82124 100644 --- a/examples/single_party/applications/reals_vectorized_polynomial_evaluation/main.go +++ b/examples/single_party/applications/reals_vectorized_polynomial_evaluation/main.go @@ -6,11 +6,11 @@ import ( "math" "math/big" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) func main() { diff --git a/examples/single_party/templates/int/main.go b/examples/single_party/templates/int/main.go index 163cba6a..49702bf8 100644 --- a/examples/single_party/templates/int/main.go +++ b/examples/single_party/templates/int/main.go @@ -5,9 +5,9 @@ import ( "fmt" "math/rand" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/heint" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/heint" + "github.com/tuneinsight/lattigo/v5/utils" ) func main() { diff --git a/examples/single_party/templates/reals/main.go b/examples/single_party/templates/reals/main.go index 46b888cd..f9e75d48 100644 --- a/examples/single_party/templates/reals/main.go +++ b/examples/single_party/templates/reals/main.go @@ -5,8 +5,8 @@ import ( "fmt" "math/rand" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" ) func main() { diff --git a/examples/single_party/tutorials/reals/main.go b/examples/single_party/tutorials/reals/main.go index 23515746..0998413a 100644 --- a/examples/single_party/tutorials/reals/main.go +++ b/examples/single_party/tutorials/reals/main.go @@ -5,11 +5,11 @@ import ( "math/cmplx" "math/rand" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) func main() { diff --git a/go.mod b/go.mod index b431e872..63cbe70d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/tuneinsight/lattigo/v4 +module github.com/tuneinsight/lattigo/v5 go 1.18 diff --git a/he/he.go b/he/he.go index dbf36810..726a6209 100644 --- a/he/he.go +++ b/he/he.go @@ -2,9 +2,9 @@ package he 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" ) // Encoder defines a set of common and scheme agnostic method provided by an Encoder struct. diff --git a/he/hebin/blindrotation.go b/he/hebin/blindrotation.go index ee2a725a..34be7890 100644 --- a/he/hebin/blindrotation.go +++ b/he/hebin/blindrotation.go @@ -2,8 +2,8 @@ package hebin 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" ) // InitTestPolynomial takes a function g, and creates a test polynomial polynomial for the function in the interval [a, b]. diff --git a/he/hebin/blindrotation_test.go b/he/hebin/blindrotation_test.go index d8f76247..3966523e 100644 --- a/he/hebin/blindrotation_test.go +++ b/he/hebin/blindrotation_test.go @@ -7,9 +7,9 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" ) func testString(params rlwe.Parameters, opname string) string { diff --git a/he/hebin/evaluator.go b/he/hebin/evaluator.go index daa3d179..4987f03a 100644 --- a/he/hebin/evaluator.go +++ b/he/hebin/evaluator.go @@ -4,10 +4,10 @@ import ( "fmt" "math/big" - "github.com/tuneinsight/lattigo/v4/core/rgsw" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rgsw" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // Evaluator is a struct that stores the necessary diff --git a/he/hebin/keys.go b/he/hebin/keys.go index d5da27d9..93d94fd7 100644 --- a/he/hebin/keys.go +++ b/he/hebin/keys.go @@ -3,10 +3,10 @@ package hebin import ( "math/big" - "github.com/tuneinsight/lattigo/v4/core/rgsw" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rgsw" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" ) const ( diff --git a/he/hebin/utils.go b/he/hebin/utils.go index f6ff7ccc..191ab17c 100644 --- a/he/hebin/utils.go +++ b/he/hebin/utils.go @@ -3,8 +3,8 @@ package hebin import ( "math/big" - "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" ) // MulBySmallMonomialMod2N multiplies pol by x^n, with 0 <= n < N diff --git a/he/hefloat/bootstrapping/bootstrapper.go b/he/hefloat/bootstrapping/bootstrapper.go index fa41e993..0d6832dd 100644 --- a/he/hefloat/bootstrapping/bootstrapper.go +++ b/he/hefloat/bootstrapping/bootstrapper.go @@ -3,9 +3,9 @@ package bootstrapping import ( "fmt" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he" + "github.com/tuneinsight/lattigo/v5/ring" ) // Ensures that the Evaluator complies to the he.Bootstrapper interface diff --git a/he/hefloat/bootstrapping/bootstrapper_test.go b/he/hefloat/bootstrapping/bootstrapper_test.go index e78ad0f0..bb0455f0 100644 --- a/he/hefloat/bootstrapping/bootstrapper_test.go +++ b/he/hefloat/bootstrapping/bootstrapper_test.go @@ -6,11 +6,11 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) var flagLongTest = flag.Bool("long", false, "run the long test suite (all parameters + secure bootstrapping). Overrides -short and requires -timeout=0.") diff --git a/he/hefloat/bootstrapping/bootstrapping.go b/he/hefloat/bootstrapping/bootstrapping.go index 7580a69a..449954fe 100644 --- a/he/hefloat/bootstrapping/bootstrapping.go +++ b/he/hefloat/bootstrapping/bootstrapping.go @@ -7,12 +7,12 @@ import ( "math/big" "math/bits" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/schemes/ckks" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/schemes/ckks" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // Evaluate re-encrypts a ciphertext to a ciphertext at MaxLevel - k where k is the depth of the bootstrapping circuit. diff --git a/he/hefloat/bootstrapping/default_parameter.go b/he/hefloat/bootstrapping/default_parameter.go index f344c08a..4c9c3a85 100644 --- a/he/hefloat/bootstrapping/default_parameter.go +++ b/he/hefloat/bootstrapping/default_parameter.go @@ -1,9 +1,9 @@ package bootstrapping import ( - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" ) type defaultParametersLiteral struct { diff --git a/he/hefloat/bootstrapping/evaluator.go b/he/hefloat/bootstrapping/evaluator.go index 21c532d4..db8b9372 100644 --- a/he/hefloat/bootstrapping/evaluator.go +++ b/he/hefloat/bootstrapping/evaluator.go @@ -5,10 +5,10 @@ import ( "math" "math/big" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/schemes/ckks" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/schemes/ckks" ) // Evaluator is a struct to store a memory buffer with the plaintext matrices, diff --git a/he/hefloat/bootstrapping/evaluator_bench_test.go b/he/hefloat/bootstrapping/evaluator_bench_test.go index f429b705..817e7ca4 100644 --- a/he/hefloat/bootstrapping/evaluator_bench_test.go +++ b/he/hefloat/bootstrapping/evaluator_bench_test.go @@ -5,8 +5,8 @@ import ( "time" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" ) func BenchmarkBootstrap(b *testing.B) { diff --git a/he/hefloat/bootstrapping/evaluator_test.go b/he/hefloat/bootstrapping/evaluator_test.go index 70e650b8..434c6c4f 100644 --- a/he/hefloat/bootstrapping/evaluator_test.go +++ b/he/hefloat/bootstrapping/evaluator_test.go @@ -7,10 +7,10 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) var minPrec float64 = 12.0 diff --git a/he/hefloat/bootstrapping/keys.go b/he/hefloat/bootstrapping/keys.go index 48436815..6a366f0a 100644 --- a/he/hefloat/bootstrapping/keys.go +++ b/he/hefloat/bootstrapping/keys.go @@ -1,8 +1,8 @@ package bootstrapping 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" ) // EvaluationKeys is a struct storing the different diff --git a/he/hefloat/bootstrapping/parameters.go b/he/hefloat/bootstrapping/parameters.go index 0412eaba..719bfe4c 100644 --- a/he/hefloat/bootstrapping/parameters.go +++ b/he/hefloat/bootstrapping/parameters.go @@ -6,10 +6,10 @@ import ( "github.com/google/go-cmp/cmp" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/schemes/ckks" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/schemes/ckks" + "github.com/tuneinsight/lattigo/v5/utils" ) // Parameters is a struct storing the parameters diff --git a/he/hefloat/bootstrapping/parameters_literal.go b/he/hefloat/bootstrapping/parameters_literal.go index 5883aad6..4efc6a09 100644 --- a/he/hefloat/bootstrapping/parameters_literal.go +++ b/he/hefloat/bootstrapping/parameters_literal.go @@ -6,10 +6,10 @@ import ( "math" "math/bits" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" ) // ParametersLiteral is a struct to parameterize the bootstrapping parameters. diff --git a/he/hefloat/bootstrapping/sk_bootstrapper.go b/he/hefloat/bootstrapping/sk_bootstrapper.go index 8f20cc04..00ad33ec 100644 --- a/he/hefloat/bootstrapping/sk_bootstrapper.go +++ b/he/hefloat/bootstrapping/sk_bootstrapper.go @@ -1,9 +1,9 @@ package bootstrapping import ( - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // SecretKeyBootstrapper is an implementation of the rlwe.Bootstrapping interface that diff --git a/he/hefloat/comparisons.go b/he/hefloat/comparisons.go index 87bb8a68..4a0ab260 100644 --- a/he/hefloat/comparisons.go +++ b/he/hefloat/comparisons.go @@ -3,10 +3,10 @@ package hefloat import ( "math/big" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // ComparisonEvaluator is an evaluator providing an API for homomorphic comparisons. diff --git a/he/hefloat/comparisons_test.go b/he/hefloat/comparisons_test.go index cd01748f..667c31f4 100644 --- a/he/hefloat/comparisons_test.go +++ b/he/hefloat/comparisons_test.go @@ -4,10 +4,10 @@ import ( "math/big" "testing" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/he/hefloat/bootstrapping" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/he/hefloat/bootstrapping" + "github.com/tuneinsight/lattigo/v5/ring" "github.com/stretchr/testify/require" ) diff --git a/he/hefloat/cosine/cosine_approx.go b/he/hefloat/cosine/cosine_approx.go index efd16d1e..83f229e9 100644 --- a/he/hefloat/cosine/cosine_approx.go +++ b/he/hefloat/cosine/cosine_approx.go @@ -11,7 +11,7 @@ import ( "math" "math/big" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) const ( diff --git a/he/hefloat/dft.go b/he/hefloat/dft.go index a2050e43..73a4b5c0 100644 --- a/he/hefloat/dft.go +++ b/he/hefloat/dft.go @@ -6,12 +6,12 @@ import ( "math" "math/big" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/schemes/ckks" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/schemes/ckks" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // EvaluatorForDFT is an interface defining the set of methods required to instantiate a DFTEvaluator. diff --git a/he/hefloat/dft_test.go b/he/hefloat/dft_test.go index 00b10e9a..d843c67d 100644 --- a/he/hefloat/dft_test.go +++ b/he/hefloat/dft_test.go @@ -7,12 +7,12 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) func TestHomomorphicDFT(t *testing.T) { diff --git a/he/hefloat/hefloat.go b/he/hefloat/hefloat.go index 4ce865c4..fd848323 100644 --- a/he/hefloat/hefloat.go +++ b/he/hefloat/hefloat.go @@ -4,8 +4,8 @@ package hefloat import ( "testing" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/schemes/ckks" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/schemes/ckks" ) type Float interface { diff --git a/he/hefloat/hefloat_test.go b/he/hefloat/hefloat_test.go index 31669245..0bd3dc15 100644 --- a/he/hefloat/hefloat_test.go +++ b/he/hefloat/hefloat_test.go @@ -10,12 +10,12 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) var flagParamString = flag.String("params", "", "specify the test cryptographic parameters as a JSON string. Overrides -short.") diff --git a/he/hefloat/inverse.go b/he/hefloat/inverse.go index 83183507..845f067d 100644 --- a/he/hefloat/inverse.go +++ b/he/hefloat/inverse.go @@ -4,9 +4,9 @@ import ( "fmt" "math" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he" + "github.com/tuneinsight/lattigo/v5/utils" ) // EvaluatorForInverse defines a set of common and scheme agnostic diff --git a/he/hefloat/inverse_test.go b/he/hefloat/inverse_test.go index bf2b5802..21d78f25 100644 --- a/he/hefloat/inverse_test.go +++ b/he/hefloat/inverse_test.go @@ -6,11 +6,11 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/he/hefloat/bootstrapping" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/he/hefloat/bootstrapping" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) func TestInverse(t *testing.T) { diff --git a/he/hefloat/linear_transformation.go b/he/hefloat/linear_transformation.go index f3ed093c..7d5427d4 100644 --- a/he/hefloat/linear_transformation.go +++ b/he/hefloat/linear_transformation.go @@ -1,10 +1,10 @@ package hefloat import ( - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he" - "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/he" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/ring/ringqp" ) type floatEncoder[T Float, U ring.Poly | ringqp.Poly | *rlwe.Plaintext] struct { diff --git a/he/hefloat/minimax_composite_polynomial.go b/he/hefloat/minimax_composite_polynomial.go index a96981f9..183ef5fb 100644 --- a/he/hefloat/minimax_composite_polynomial.go +++ b/he/hefloat/minimax_composite_polynomial.go @@ -5,8 +5,8 @@ import ( "math" "math/big" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // MinimaxCompositePolynomial is a struct storing P(x) = pk(x) o pk-1(x) o ... o p1(x) o p0(x). diff --git a/he/hefloat/minimax_composite_polynomial_evaluator.go b/he/hefloat/minimax_composite_polynomial_evaluator.go index 25c0ff79..39d0be38 100644 --- a/he/hefloat/minimax_composite_polynomial_evaluator.go +++ b/he/hefloat/minimax_composite_polynomial_evaluator.go @@ -3,9 +3,9 @@ package hefloat import ( "fmt" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he" + "github.com/tuneinsight/lattigo/v5/ring" ) // EvaluatorForMinimaxCompositePolynomial defines a set of common and scheme agnostic method that are necessary to instantiate a MinimaxCompositePolynomialEvaluator. diff --git a/he/hefloat/mod1_evaluator.go b/he/hefloat/mod1_evaluator.go index 196485f5..96f73559 100644 --- a/he/hefloat/mod1_evaluator.go +++ b/he/hefloat/mod1_evaluator.go @@ -4,8 +4,8 @@ import ( "fmt" "math/big" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he" ) // EvaluatorForMod1 defines a set of common and scheme agnostic diff --git a/he/hefloat/mod1_parameters.go b/he/hefloat/mod1_parameters.go index 1474c123..bdde2ec8 100644 --- a/he/hefloat/mod1_parameters.go +++ b/he/hefloat/mod1_parameters.go @@ -7,10 +7,10 @@ import ( "math/big" "math/bits" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat/cosine" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat/cosine" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // Mod1Type is the type of function/approximation used to evaluate x mod 1. diff --git a/he/hefloat/mod1_test.go b/he/hefloat/mod1_test.go index 2e0981e1..d35ab1c7 100644 --- a/he/hefloat/mod1_test.go +++ b/he/hefloat/mod1_test.go @@ -7,10 +7,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "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/hefloat" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) func TestMod1(t *testing.T) { diff --git a/he/hefloat/polynomial.go b/he/hefloat/polynomial.go index b29e39d1..6ef70ab8 100644 --- a/he/hefloat/polynomial.go +++ b/he/hefloat/polynomial.go @@ -3,8 +3,8 @@ package hefloat import ( "math/big" - "github.com/tuneinsight/lattigo/v4/he" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/he" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // Polynomial is a type wrapping the type he.Polynomial. diff --git a/he/hefloat/polynomial_evaluator.go b/he/hefloat/polynomial_evaluator.go index 67496563..0bcca7bf 100644 --- a/he/hefloat/polynomial_evaluator.go +++ b/he/hefloat/polynomial_evaluator.go @@ -3,9 +3,9 @@ package hefloat import ( "fmt" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // PolynomialEvaluator is a wrapper of the he.PolynomialEvaluator. diff --git a/he/hefloat/polynomial_evaluator_sim.go b/he/hefloat/polynomial_evaluator_sim.go index 687f030a..1019cced 100644 --- a/he/hefloat/polynomial_evaluator_sim.go +++ b/he/hefloat/polynomial_evaluator_sim.go @@ -4,10 +4,10 @@ import ( "math/big" "math/bits" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // simEvaluator is a struct used to pre-computed the scaling diff --git a/he/hefloat/test_parameters_test.go b/he/hefloat/test_parameters_test.go index 55a7537c..ec9203a6 100644 --- a/he/hefloat/test_parameters_test.go +++ b/he/hefloat/test_parameters_test.go @@ -1,7 +1,7 @@ package hefloat_test import ( - "github.com/tuneinsight/lattigo/v4/he/hefloat" + "github.com/tuneinsight/lattigo/v5/he/hefloat" ) var ( diff --git a/he/heint/heint.go b/he/heint/heint.go index a83f7ea5..59ded7d3 100644 --- a/he/heint/heint.go +++ b/he/heint/heint.go @@ -2,8 +2,8 @@ package heint import ( - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/schemes/bgv" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/schemes/bgv" ) type Integer interface { diff --git a/he/heint/heint_test.go b/he/heint/heint_test.go index 31d1736c..5b37c9a4 100644 --- a/he/heint/heint_test.go +++ b/he/heint/heint_test.go @@ -9,14 +9,14 @@ import ( "runtime" "testing" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/heint" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/heint" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) var flagPrintNoise = flag.Bool("print-noise", false, "print the residual noise") diff --git a/he/heint/linear_transformation.go b/he/heint/linear_transformation.go index 67478c4b..e512352f 100644 --- a/he/heint/linear_transformation.go +++ b/he/heint/linear_transformation.go @@ -1,10 +1,10 @@ package heint import ( - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he" - "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/he" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/ring/ringqp" ) type intEncoder[T Integer, U ring.Poly | ringqp.Poly | *rlwe.Plaintext] struct { diff --git a/he/heint/parameters_test.go b/he/heint/parameters_test.go index 14654ce5..ef49fd59 100644 --- a/he/heint/parameters_test.go +++ b/he/heint/parameters_test.go @@ -1,7 +1,7 @@ package heint_test import ( - "github.com/tuneinsight/lattigo/v4/he/heint" + "github.com/tuneinsight/lattigo/v5/he/heint" ) var ( diff --git a/he/heint/polynomial.go b/he/heint/polynomial.go index f1377f43..4ed55dcc 100644 --- a/he/heint/polynomial.go +++ b/he/heint/polynomial.go @@ -1,8 +1,8 @@ package heint import ( - "github.com/tuneinsight/lattigo/v4/he" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/he" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // Polynomial is a type wrapping the type he.Polynomial. diff --git a/he/heint/polynomial_evaluator.go b/he/heint/polynomial_evaluator.go index 661eae86..bc4056f6 100644 --- a/he/heint/polynomial_evaluator.go +++ b/he/heint/polynomial_evaluator.go @@ -3,11 +3,11 @@ package heint import ( "fmt" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he" - "github.com/tuneinsight/lattigo/v4/schemes/bfv" - "github.com/tuneinsight/lattigo/v4/schemes/bgv" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he" + "github.com/tuneinsight/lattigo/v5/schemes/bfv" + "github.com/tuneinsight/lattigo/v5/schemes/bgv" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // PolynomialEvaluator is a wrapper of the he.PolynomialEvaluator. diff --git a/he/heint/polynomial_evaluator_sim.go b/he/heint/polynomial_evaluator_sim.go index e21924c3..23b0f39d 100644 --- a/he/heint/polynomial_evaluator_sim.go +++ b/he/heint/polynomial_evaluator_sim.go @@ -4,10 +4,10 @@ import ( "math/big" "math/bits" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he" - "github.com/tuneinsight/lattigo/v4/schemes/bgv" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he" + "github.com/tuneinsight/lattigo/v5/schemes/bgv" + "github.com/tuneinsight/lattigo/v5/utils" ) // simEvaluator is a struct used to pre-computed the scaling diff --git a/he/linear_transformation.go b/he/linear_transformation.go index 5da11d7c..e895b22d 100644 --- a/he/linear_transformation.go +++ b/he/linear_transformation.go @@ -4,10 +4,10 @@ import ( "fmt" "sort" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/ring/ringqp" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/ring/ringqp" + "github.com/tuneinsight/lattigo/v5/utils" ) // LinearTransformationParameters is a struct storing the parameterization of a diff --git a/he/linear_transformation_evaluator.go b/he/linear_transformation_evaluator.go index 3bf3bba6..6efcd74c 100644 --- a/he/linear_transformation_evaluator.go +++ b/he/linear_transformation_evaluator.go @@ -3,10 +3,10 @@ package he import ( "fmt" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/ring/ringqp" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/ring/ringqp" + "github.com/tuneinsight/lattigo/v5/utils" ) // EvaluatorForLinearTransformation defines a set of common and scheme agnostic method necessary to instantiate an LinearTransformationEvaluator. diff --git a/he/polynomial.go b/he/polynomial.go index 45ac5f3d..ebe418bb 100644 --- a/he/polynomial.go +++ b/he/polynomial.go @@ -4,9 +4,9 @@ import ( "fmt" "math/bits" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // Polynomial is a struct for representing plaintext polynomials diff --git a/he/polynomial_evaluator.go b/he/polynomial_evaluator.go index d5abcee3..bc94b128 100644 --- a/he/polynomial_evaluator.go +++ b/he/polynomial_evaluator.go @@ -4,9 +4,9 @@ import ( "fmt" "math/bits" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // EvaluatorForPolynomial defines a set of common and scheme agnostic method that are necessary to instantiate a PolynomialVectorEvaluator. diff --git a/he/polynomial_evaluator_sim.go b/he/polynomial_evaluator_sim.go index 7ed7f742..6a7546c5 100644 --- a/he/polynomial_evaluator_sim.go +++ b/he/polynomial_evaluator_sim.go @@ -1,7 +1,7 @@ package he import ( - "github.com/tuneinsight/lattigo/v4/core/rlwe" + "github.com/tuneinsight/lattigo/v5/core/rlwe" ) // SimOperand is a dummy operand that diff --git a/he/power_basis.go b/he/power_basis.go index 03462fe7..4d20bab5 100644 --- a/he/power_basis.go +++ b/he/power_basis.go @@ -6,10 +6,10 @@ import ( "io" "math/bits" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/buffer" - "github.com/tuneinsight/lattigo/v4/utils/structs" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/buffer" + "github.com/tuneinsight/lattigo/v5/utils/structs" ) // PowerBasis is a struct storing powers of a ciphertext. diff --git a/he/power_basis_test.go b/he/power_basis_test.go index 1ee19ed2..3c34e246 100644 --- a/he/power_basis_test.go +++ b/he/power_basis_test.go @@ -3,10 +3,10 @@ package he import ( "testing" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/buffer" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/buffer" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) func TestPowerBasis(t *testing.T) { diff --git a/mhe/additive_shares.go b/mhe/additive_shares.go index 8e067452..02eef35a 100644 --- a/mhe/additive_shares.go +++ b/mhe/additive_shares.go @@ -3,7 +3,7 @@ package mhe import ( "math/big" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/ring" ) // AdditiveShare is a type for storing additively shared values in Z_Q[X] (RNS domain). diff --git a/mhe/crs.go b/mhe/crs.go index b7e62af7..0f60892e 100644 --- a/mhe/crs.go +++ b/mhe/crs.go @@ -1,7 +1,7 @@ package mhe import ( - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) // CRS is an interface for Common Reference Strings. diff --git a/mhe/keygen_cpk.go b/mhe/keygen_cpk.go index 987b5ecd..64b1491d 100644 --- a/mhe/keygen_cpk.go +++ b/mhe/keygen_cpk.go @@ -3,10 +3,10 @@ package mhe import ( "io" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/ring/ringqp" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/ring/ringqp" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) // PublicKeyGenProtocol is the structure storing the parameters and and precomputations for diff --git a/mhe/keygen_evk.go b/mhe/keygen_evk.go index a0db244f..4b3f9772 100644 --- a/mhe/keygen_evk.go +++ b/mhe/keygen_evk.go @@ -4,12 +4,12 @@ import ( "fmt" "io" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "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/v4/utils/structs" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "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" + "github.com/tuneinsight/lattigo/v5/utils/structs" ) // EvaluationKeyGenProtocol is the structure storing the parameters for the collective EvaluationKey generation. diff --git a/mhe/keygen_gal.go b/mhe/keygen_gal.go index d2248ad6..52219875 100644 --- a/mhe/keygen_gal.go +++ b/mhe/keygen_gal.go @@ -5,10 +5,10 @@ import ( "fmt" "io" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/ring/ringqp" - "github.com/tuneinsight/lattigo/v4/utils/buffer" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/ring/ringqp" + "github.com/tuneinsight/lattigo/v5/utils/buffer" ) // GaloisKeyGenProtocol is the structure storing the parameters for the collective GaloisKeys generation. diff --git a/mhe/keygen_relin.go b/mhe/keygen_relin.go index 9c8dd152..7d8c0963 100644 --- a/mhe/keygen_relin.go +++ b/mhe/keygen_relin.go @@ -3,12 +3,12 @@ package mhe import ( "io" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "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/v4/utils/structs" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "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" + "github.com/tuneinsight/lattigo/v5/utils/structs" ) // RelinearizationKeyGenProtocol is the structure storing the parameters and and precomputations for the collective relinearization key generation protocol. diff --git a/mhe/keyswitch_pk.go b/mhe/keyswitch_pk.go index ae3db96f..19a2cbc2 100644 --- a/mhe/keyswitch_pk.go +++ b/mhe/keyswitch_pk.go @@ -4,11 +4,11 @@ import ( "fmt" "io" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/ring" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) // PublicKeySwitchProtocol is the structure storing the parameters for the collective public key-switching. diff --git a/mhe/keyswitch_sk.go b/mhe/keyswitch_sk.go index 9a11fcae..f13271cc 100644 --- a/mhe/keyswitch_sk.go +++ b/mhe/keyswitch_sk.go @@ -5,11 +5,11 @@ import ( "io" "math" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/ring" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) // KeySwitchProtocol is the structure storing the parameters and and precomputations for the collective key-switching protocol. diff --git a/mhe/mhe_benchmark_test.go b/mhe/mhe_benchmark_test.go index 8a8f927c..1f47c726 100644 --- a/mhe/mhe_benchmark_test.go +++ b/mhe/mhe_benchmark_test.go @@ -5,10 +5,10 @@ import ( "fmt" "testing" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) func BenchmarkMHE(b *testing.B) { diff --git a/mhe/mhe_test.go b/mhe/mhe_test.go index d2f0d8cb..88336ab5 100644 --- a/mhe/mhe_test.go +++ b/mhe/mhe_test.go @@ -9,11 +9,11 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/buffer" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/buffer" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) var nbParties = int(5) diff --git a/mhe/mhefloat/mhe_test.go b/mhe/mhefloat/mhe_test.go index acf1fd84..565cee5f 100644 --- a/mhe/mhefloat/mhe_test.go +++ b/mhe/mhefloat/mhe_test.go @@ -11,13 +11,13 @@ import ( "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/mhe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/mhe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) var flagParamString = flag.String("params", "", "specify the test cryptographic parameters as a JSON string. Overrides -short and -long.") diff --git a/mhe/mhefloat/mhefloat_benchmark_test.go b/mhe/mhefloat/mhefloat_benchmark_test.go index 84703211..ed850a2a 100644 --- a/mhe/mhefloat/mhefloat_benchmark_test.go +++ b/mhe/mhefloat/mhefloat_benchmark_test.go @@ -5,11 +5,11 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/mhe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/mhe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) func BenchmarkMHEFloat(b *testing.B) { diff --git a/mhe/mhefloat/refresh.go b/mhe/mhefloat/refresh.go index 54486580..05650811 100644 --- a/mhe/mhefloat/refresh.go +++ b/mhe/mhefloat/refresh.go @@ -1,11 +1,11 @@ package mhefloat import ( - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/mhe" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/mhe" + "github.com/tuneinsight/lattigo/v5/ring" - "github.com/tuneinsight/lattigo/v4/core/rlwe" + "github.com/tuneinsight/lattigo/v5/core/rlwe" ) // RefreshProtocol is a struct storing the relevant parameters for the Refresh protocol. diff --git a/mhe/mhefloat/sharing.go b/mhe/mhefloat/sharing.go index 59bdb9e2..f92caa3f 100644 --- a/mhe/mhefloat/sharing.go +++ b/mhe/mhefloat/sharing.go @@ -4,14 +4,14 @@ import ( "fmt" "math/big" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/mhe" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/mhe" + "github.com/tuneinsight/lattigo/v5/ring" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) // EncToShareProtocol is the structure storing the parameters and temporary buffers diff --git a/mhe/mhefloat/test_params.go b/mhe/mhefloat/test_params.go index aa88f675..9a4a3adc 100644 --- a/mhe/mhefloat/test_params.go +++ b/mhe/mhefloat/test_params.go @@ -1,7 +1,7 @@ package mhefloat import ( - "github.com/tuneinsight/lattigo/v4/he/hefloat" + "github.com/tuneinsight/lattigo/v5/he/hefloat" ) var ( diff --git a/mhe/mhefloat/transform.go b/mhe/mhefloat/transform.go index fe196c44..eeb7754e 100644 --- a/mhe/mhefloat/transform.go +++ b/mhe/mhefloat/transform.go @@ -4,13 +4,13 @@ import ( "fmt" "math/big" - "github.com/tuneinsight/lattigo/v4/he/hefloat" - "github.com/tuneinsight/lattigo/v4/mhe" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/he/hefloat" + "github.com/tuneinsight/lattigo/v5/mhe" + "github.com/tuneinsight/lattigo/v5/ring" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) // MaskedLinearTransformationProtocol is a struct storing the parameters for the MaskedLinearTransformationProtocol protocol. diff --git a/mhe/mhefloat/utils.go b/mhe/mhefloat/utils.go index f4e85e26..4e727a1a 100644 --- a/mhe/mhefloat/utils.go +++ b/mhe/mhefloat/utils.go @@ -3,7 +3,7 @@ package mhefloat import ( "math" - "github.com/tuneinsight/lattigo/v4/core/rlwe" + "github.com/tuneinsight/lattigo/v5/core/rlwe" ) // GetMinimumLevelForRefresh takes the security parameter lambda, the ciphertext scale, the number of parties and the moduli chain diff --git a/mhe/mheint/mheint_benchmark_test.go b/mhe/mheint/mheint_benchmark_test.go index d186904c..1211d61b 100644 --- a/mhe/mheint/mheint_benchmark_test.go +++ b/mhe/mheint/mheint_benchmark_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/he/heint" - "github.com/tuneinsight/lattigo/v4/mhe" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/he/heint" + "github.com/tuneinsight/lattigo/v5/mhe" ) func BenchmarkInteger(b *testing.B) { diff --git a/mhe/mheint/mheint_test.go b/mhe/mheint/mheint_test.go index 1433a17c..91ecc783 100644 --- a/mhe/mheint/mheint_test.go +++ b/mhe/mheint/mheint_test.go @@ -10,12 +10,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "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" - "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" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) var flagParamString = flag.String("params", "", "specify the test cryptographic parameters as a JSON string. Overrides -short and -long.") diff --git a/mhe/mheint/refresh.go b/mhe/mheint/refresh.go index 62c2dbe3..3504d588 100644 --- a/mhe/mheint/refresh.go +++ b/mhe/mheint/refresh.go @@ -1,11 +1,11 @@ package mheint import ( - "github.com/tuneinsight/lattigo/v4/he/heint" - "github.com/tuneinsight/lattigo/v4/mhe" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/he/heint" + "github.com/tuneinsight/lattigo/v5/mhe" + "github.com/tuneinsight/lattigo/v5/ring" - "github.com/tuneinsight/lattigo/v4/core/rlwe" + "github.com/tuneinsight/lattigo/v5/core/rlwe" ) // RefreshProtocol is a struct storing the relevant parameters for the Refresh protocol. diff --git a/mhe/mheint/sharing.go b/mhe/mheint/sharing.go index ec91c416..38195b29 100644 --- a/mhe/mheint/sharing.go +++ b/mhe/mheint/sharing.go @@ -3,12 +3,12 @@ package mheint import ( "fmt" - "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" - "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" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) // EncToShareProtocol is the structure storing the parameters and temporary buffers diff --git a/mhe/mheint/test_parameters.go b/mhe/mheint/test_parameters.go index 09617094..8e6810af 100644 --- a/mhe/mheint/test_parameters.go +++ b/mhe/mheint/test_parameters.go @@ -1,7 +1,7 @@ package mheint import ( - "github.com/tuneinsight/lattigo/v4/he/heint" + "github.com/tuneinsight/lattigo/v5/he/heint" ) var ( diff --git a/mhe/mheint/transform.go b/mhe/mheint/transform.go index e78427fb..e6d2ed64 100644 --- a/mhe/mheint/transform.go +++ b/mhe/mheint/transform.go @@ -3,12 +3,12 @@ package mheint import ( "fmt" - "github.com/tuneinsight/lattigo/v4/he/heint" - "github.com/tuneinsight/lattigo/v4/mhe" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/he/heint" + "github.com/tuneinsight/lattigo/v5/mhe" + "github.com/tuneinsight/lattigo/v5/ring" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) // MaskedTransformProtocol is a struct storing the parameters for the MaskedTransformProtocol protocol. diff --git a/mhe/refresh.go b/mhe/refresh.go index 187cc510..5d6d3b3f 100644 --- a/mhe/refresh.go +++ b/mhe/refresh.go @@ -4,7 +4,7 @@ import ( "bufio" "io" - "github.com/tuneinsight/lattigo/v4/utils/buffer" + "github.com/tuneinsight/lattigo/v5/utils/buffer" ) // RefreshShare is a struct storing the decryption and recryption shares. diff --git a/mhe/test_params.go b/mhe/test_params.go index c4eb4534..38cbd0a0 100644 --- a/mhe/test_params.go +++ b/mhe/test_params.go @@ -1,7 +1,7 @@ package mhe import ( - "github.com/tuneinsight/lattigo/v4/core/rlwe" + "github.com/tuneinsight/lattigo/v5/core/rlwe" ) type TestParametersLiteral struct { diff --git a/mhe/threshold.go b/mhe/threshold.go index 60e1a471..ce1f6356 100644 --- a/mhe/threshold.go +++ b/mhe/threshold.go @@ -4,11 +4,11 @@ import ( "fmt" "io" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/ring/ringqp" - "github.com/tuneinsight/lattigo/v4/utils/sampling" - "github.com/tuneinsight/lattigo/v4/utils/structs" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/ring/ringqp" + "github.com/tuneinsight/lattigo/v5/utils/sampling" + "github.com/tuneinsight/lattigo/v5/utils/structs" ) // Thresholdizer is a type for generating secret-shares of ringqp.Poly types such that diff --git a/mhe/utils.go b/mhe/utils.go index c334bf4d..255dd5c9 100644 --- a/mhe/utils.go +++ b/mhe/utils.go @@ -3,7 +3,7 @@ package mhe import ( "math" - "github.com/tuneinsight/lattigo/v4/core/rlwe" + "github.com/tuneinsight/lattigo/v5/core/rlwe" ) // NoiseRelinearizationKey returns the standard deviation of the noise of each individual elements in the collective RelinearizationKey. diff --git a/ring/automorphism.go b/ring/automorphism.go index 2e30a412..f074a9c5 100644 --- a/ring/automorphism.go +++ b/ring/automorphism.go @@ -5,7 +5,7 @@ import ( "math/bits" "unsafe" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/utils" ) // AutomorphismNTTIndex computes the look-up table for the automorphism X^{i} -> X^{i*k mod NthRoot}. diff --git a/ring/basis_extension.go b/ring/basis_extension.go index 06da4972..2538fb15 100644 --- a/ring/basis_extension.go +++ b/ring/basis_extension.go @@ -5,7 +5,7 @@ import ( "math/bits" "unsafe" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // BasisExtender stores the necessary parameters for RNS basis extension. diff --git a/ring/modular_reduction.go b/ring/modular_reduction.go index bac3a7c3..05b0b9b5 100644 --- a/ring/modular_reduction.go +++ b/ring/modular_reduction.go @@ -3,7 +3,7 @@ package ring import ( "math/bits" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // MForm switches a to the Montgomery domain by computing diff --git a/ring/operations.go b/ring/operations.go index 48a4b93d..8c7723c0 100644 --- a/ring/operations.go +++ b/ring/operations.go @@ -3,8 +3,8 @@ package ring import ( "math/big" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // Add evaluates p3 = p1 + p2 coefficient-wise in the ring. diff --git a/ring/poly.go b/ring/poly.go index 3ce0219d..b8d4ecbd 100644 --- a/ring/poly.go +++ b/ring/poly.go @@ -4,9 +4,9 @@ import ( "bufio" "io" - "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/utils" + "github.com/tuneinsight/lattigo/v5/utils/buffer" + "github.com/tuneinsight/lattigo/v5/utils/structs" ) // Poly is the structure that contains the coefficients of a polynomial. diff --git a/ring/primes.go b/ring/primes.go index db5a7f87..7af4cf33 100644 --- a/ring/primes.go +++ b/ring/primes.go @@ -4,7 +4,7 @@ import ( "fmt" "math" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // IsPrime applies the Baillie-PSW, which is 100% accurate for numbers bellow 2^64. diff --git a/ring/ring.go b/ring/ring.go index a1b2b725..b9e2c58a 100644 --- a/ring/ring.go +++ b/ring/ring.go @@ -9,8 +9,8 @@ import ( "math/big" "math/bits" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) const ( diff --git a/ring/ring_benchmark_test.go b/ring/ring_benchmark_test.go index 270d931c..d96a6a0b 100644 --- a/ring/ring_benchmark_test.go +++ b/ring/ring_benchmark_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) func BenchmarkRing(b *testing.B) { diff --git a/ring/ring_test.go b/ring/ring_test.go index 3e53e087..7881d792 100644 --- a/ring/ring_test.go +++ b/ring/ring_test.go @@ -7,12 +7,12 @@ import ( "math/big" "testing" - "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/utils/buffer" + "github.com/tuneinsight/lattigo/v5/utils/sampling" + "github.com/tuneinsight/lattigo/v5/utils/structs" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) var T = uint64(0x3ee0001) diff --git a/ring/ringqp/operations.go b/ring/ringqp/operations.go index 283f63a8..b5e77044 100644 --- a/ring/ringqp/operations.go +++ b/ring/ringqp/operations.go @@ -1,7 +1,7 @@ package ringqp import ( - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/ring" ) // Add adds p1 to p2 coefficient-wise and writes the result on p3. diff --git a/ring/ringqp/poly.go b/ring/ringqp/poly.go index 46f276ec..8acc6773 100644 --- a/ring/ringqp/poly.go +++ b/ring/ringqp/poly.go @@ -4,9 +4,9 @@ import ( "bufio" "io" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/buffer" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/buffer" ) // Poly represents a polynomial in the ring of polynomial modulo Q*P. diff --git a/ring/ringqp/ring.go b/ring/ringqp/ring.go index 25c6bb55..1b955074 100644 --- a/ring/ringqp/ring.go +++ b/ring/ringqp/ring.go @@ -5,8 +5,8 @@ import ( "math" "math/big" - "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" ) // Ring is a structure that implements the operation in the ring R_QP. diff --git a/ring/ringqp/ring_test.go b/ring/ringqp/ring_test.go index 904d1a72..abfb036e 100644 --- a/ring/ringqp/ring_test.go +++ b/ring/ringqp/ring_test.go @@ -3,10 +3,10 @@ package ringqp import ( "testing" - "github.com/tuneinsight/lattigo/v4/ring" - "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/utils/buffer" + "github.com/tuneinsight/lattigo/v5/utils/sampling" + "github.com/tuneinsight/lattigo/v5/utils/structs" "github.com/stretchr/testify/require" ) diff --git a/ring/ringqp/samplers.go b/ring/ringqp/samplers.go index 3c4313ca..d7ae03d4 100644 --- a/ring/ringqp/samplers.go +++ b/ring/ringqp/samplers.go @@ -1,8 +1,8 @@ package ringqp import ( - "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" ) // UniformSampler is a type for sampling polynomials in Ring. diff --git a/ring/sampler.go b/ring/sampler.go index 22670ee2..aa5788f9 100644 --- a/ring/sampler.go +++ b/ring/sampler.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) const ( diff --git a/ring/sampler_gaussian.go b/ring/sampler_gaussian.go index 4e6b655a..1e968c44 100644 --- a/ring/sampler_gaussian.go +++ b/ring/sampler_gaussian.go @@ -5,8 +5,8 @@ import ( "math" "math/big" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) const ( diff --git a/ring/sampler_ternary.go b/ring/sampler_ternary.go index a2c9472c..d1d15b68 100644 --- a/ring/sampler_ternary.go +++ b/ring/sampler_ternary.go @@ -5,7 +5,7 @@ import ( "math" "math/bits" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) const ternarySamplerPrecision = uint64(56) diff --git a/ring/sampler_uniform.go b/ring/sampler_uniform.go index 19049e2e..539b21f7 100644 --- a/ring/sampler_uniform.go +++ b/ring/sampler_uniform.go @@ -3,8 +3,8 @@ package ring import ( "encoding/binary" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) // UniformSampler wraps a util.PRNG and represents the state of a sampler of uniform polynomials. diff --git a/ring/subring.go b/ring/subring.go index 3dbb8a67..e3c40710 100644 --- a/ring/subring.go +++ b/ring/subring.go @@ -5,8 +5,8 @@ import ( "math/big" "math/bits" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/factorization" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/factorization" ) // SubRing is a struct storing precomputation diff --git a/schemes/bfv/bfv.go b/schemes/bfv/bfv.go index ed5621a3..5fe2ea7a 100644 --- a/schemes/bfv/bfv.go +++ b/schemes/bfv/bfv.go @@ -5,9 +5,9 @@ package bfv import ( "fmt" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/schemes/bgv" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/schemes/bgv" ) // NewPlaintext allocates a new rlwe.Plaintext from the BFV parameters, at the diff --git a/schemes/bfv/bfv_benchmark_test.go b/schemes/bfv/bfv_benchmark_test.go index 9d9fed6f..b48c62e7 100644 --- a/schemes/bfv/bfv_benchmark_test.go +++ b/schemes/bfv/bfv_benchmark_test.go @@ -5,7 +5,7 @@ import ( "runtime" "testing" - "github.com/tuneinsight/lattigo/v4/core/rlwe" + "github.com/tuneinsight/lattigo/v5/core/rlwe" ) func BenchmarkBFV(b *testing.B) { diff --git a/schemes/bfv/bfv_test.go b/schemes/bfv/bfv_test.go index 41d4e19b..10e8e828 100644 --- a/schemes/bfv/bfv_test.go +++ b/schemes/bfv/bfv_test.go @@ -8,10 +8,10 @@ import ( "runtime" "testing" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/sampling" "github.com/stretchr/testify/require" ) diff --git a/schemes/bfv/params.go b/schemes/bfv/params.go index 21ba4344..e2f00c50 100644 --- a/schemes/bfv/params.go +++ b/schemes/bfv/params.go @@ -3,9 +3,9 @@ package bfv import ( "encoding/json" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/schemes/bgv" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/schemes/bgv" ) // NewParameters instantiate a set of BFV parameters from the generic RLWE parameters and a plaintext modulus t. diff --git a/schemes/bgv/bgv.go b/schemes/bgv/bgv.go index f4d27bf7..8688fb99 100644 --- a/schemes/bgv/bgv.go +++ b/schemes/bgv/bgv.go @@ -2,7 +2,7 @@ package bgv import ( - "github.com/tuneinsight/lattigo/v4/core/rlwe" + "github.com/tuneinsight/lattigo/v5/core/rlwe" ) // NewPlaintext allocates a new rlwe.Plaintext. diff --git a/schemes/bgv/bgv_benchmark_test.go b/schemes/bgv/bgv_benchmark_test.go index 7740d7d9..32f8b04a 100644 --- a/schemes/bgv/bgv_benchmark_test.go +++ b/schemes/bgv/bgv_benchmark_test.go @@ -5,7 +5,7 @@ import ( "runtime" "testing" - "github.com/tuneinsight/lattigo/v4/core/rlwe" + "github.com/tuneinsight/lattigo/v5/core/rlwe" ) func BenchmarkBGV(b *testing.B) { diff --git a/schemes/bgv/bgv_test.go b/schemes/bgv/bgv_test.go index 5f879b1b..043c8745 100644 --- a/schemes/bgv/bgv_test.go +++ b/schemes/bgv/bgv_test.go @@ -8,12 +8,12 @@ import ( "runtime" "testing" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) var flagPrintNoise = flag.Bool("print-noise", false, "print the residual noise") diff --git a/schemes/bgv/encoder.go b/schemes/bgv/encoder.go index 7853c92d..22dfbd1a 100644 --- a/schemes/bgv/encoder.go +++ b/schemes/bgv/encoder.go @@ -4,10 +4,10 @@ import ( "fmt" "math/big" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/ring/ringqp" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/ring/ringqp" + "github.com/tuneinsight/lattigo/v5/utils" ) type Integer interface { diff --git a/schemes/bgv/evaluator.go b/schemes/bgv/evaluator.go index ad1fa169..b8b29482 100644 --- a/schemes/bgv/evaluator.go +++ b/schemes/bgv/evaluator.go @@ -5,10 +5,10 @@ import ( "math" "math/big" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/ring/ringqp" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "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 perform the homomorphic operations between ciphertexts and/or plaintexts. diff --git a/schemes/bgv/params.go b/schemes/bgv/params.go index 8b37e301..a3ecacc7 100644 --- a/schemes/bgv/params.go +++ b/schemes/bgv/params.go @@ -6,9 +6,9 @@ import ( "math" "math/bits" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" ) const ( diff --git a/schemes/ckks/bridge.go b/schemes/ckks/bridge.go index 565f25ef..a2a63907 100644 --- a/schemes/ckks/bridge.go +++ b/schemes/ckks/bridge.go @@ -3,9 +3,9 @@ package ckks import ( "fmt" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" ) // DomainSwitcher is a type for switching between the standard CKKS domain (which encrypts vectors of complex numbers) diff --git a/schemes/ckks/ckks.go b/schemes/ckks/ckks.go index 70f99851..f9cee8db 100644 --- a/schemes/ckks/ckks.go +++ b/schemes/ckks/ckks.go @@ -3,7 +3,7 @@ package ckks import ( - "github.com/tuneinsight/lattigo/v4/core/rlwe" + "github.com/tuneinsight/lattigo/v5/core/rlwe" ) // NewPlaintext allocates a new rlwe.Plaintext. diff --git a/schemes/ckks/ckks_benchmarks_test.go b/schemes/ckks/ckks_benchmarks_test.go index d0f04401..ac6fe148 100644 --- a/schemes/ckks/ckks_benchmarks_test.go +++ b/schemes/ckks/ckks_benchmarks_test.go @@ -4,9 +4,9 @@ import ( "encoding/json" "testing" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "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/ring" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) func BenchmarkCKKSScheme(b *testing.B) { diff --git a/schemes/ckks/ckks_test.go b/schemes/ckks/ckks_test.go index 5447ecac..50c93f4a 100644 --- a/schemes/ckks/ckks_test.go +++ b/schemes/ckks/ckks_test.go @@ -10,11 +10,11 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/ring" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/utils/bignum" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) var flagParamString = flag.String("params", "", "specify the test cryptographic parameters as a JSON string. Overrides -short and -long.") diff --git a/schemes/ckks/ckks_vector_ops.go b/schemes/ckks/ckks_vector_ops.go index 6f3e526f..f3b78b9e 100644 --- a/schemes/ckks/ckks_vector_ops.go +++ b/schemes/ckks/ckks_vector_ops.go @@ -6,8 +6,8 @@ import ( "math/bits" "unsafe" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) const ( diff --git a/schemes/ckks/encoder.go b/schemes/ckks/encoder.go index 8cc6f571..77ef2a26 100644 --- a/schemes/ckks/encoder.go +++ b/schemes/ckks/encoder.go @@ -5,12 +5,12 @@ import ( "math" "math/big" - "github.com/tuneinsight/lattigo/v4/ring" + "github.com/tuneinsight/lattigo/v5/ring" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring/ringqp" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring/ringqp" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) type Float interface { diff --git a/schemes/ckks/evaluator.go b/schemes/ckks/evaluator.go index 6969def4..40279f86 100644 --- a/schemes/ckks/evaluator.go +++ b/schemes/ckks/evaluator.go @@ -4,11 +4,11 @@ import ( "fmt" "math/big" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "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/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "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/bignum" ) // Evaluator is a struct that holds the necessary elements to execute the homomorphic operations between Ciphertexts and/or Plaintexts. diff --git a/schemes/ckks/example_parameters.go b/schemes/ckks/example_parameters.go index c691fe33..6b33ba81 100644 --- a/schemes/ckks/example_parameters.go +++ b/schemes/ckks/example_parameters.go @@ -1,8 +1,8 @@ package ckks 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" ) var ( diff --git a/schemes/ckks/linear_transformation.go b/schemes/ckks/linear_transformation.go index 5e7861c4..94cff69c 100644 --- a/schemes/ckks/linear_transformation.go +++ b/schemes/ckks/linear_transformation.go @@ -3,9 +3,9 @@ package ckks import ( "fmt" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils" ) // TraceNew maps X -> sum((-1)^i * X^{i*n+1}) for 0 <= i < N and returns the result on a new ciphertext. diff --git a/schemes/ckks/params.go b/schemes/ckks/params.go index 558fadce..3c189bb5 100644 --- a/schemes/ckks/params.go +++ b/schemes/ckks/params.go @@ -6,9 +6,9 @@ import ( "math" "math/big" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // PrecisionMode is a variable that defines how many primes (one diff --git a/schemes/ckks/precision.go b/schemes/ckks/precision.go index d37a173a..306a310e 100644 --- a/schemes/ckks/precision.go +++ b/schemes/ckks/precision.go @@ -8,9 +8,9 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // PrecisionStats is a struct storing statistic about the precision of a CKKS plaintext diff --git a/schemes/ckks/scaling.go b/schemes/ckks/scaling.go index 2981d3d7..922a645e 100644 --- a/schemes/ckks/scaling.go +++ b/schemes/ckks/scaling.go @@ -3,8 +3,8 @@ package ckks import ( "math/big" - "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" ) func bigComplexToRNSScalar(r *ring.Ring, scale *big.Float, cmplx *bignum.Complex) (RNSReal, RNSImag ring.RNSScalar) { diff --git a/schemes/ckks/utils.go b/schemes/ckks/utils.go index a002b4f0..5731e005 100644 --- a/schemes/ckks/utils.go +++ b/schemes/ckks/utils.go @@ -4,9 +4,9 @@ import ( "math" "math/big" - "github.com/tuneinsight/lattigo/v4/core/rlwe" - "github.com/tuneinsight/lattigo/v4/ring" - "github.com/tuneinsight/lattigo/v4/utils/bignum" + "github.com/tuneinsight/lattigo/v5/core/rlwe" + "github.com/tuneinsight/lattigo/v5/ring" + "github.com/tuneinsight/lattigo/v5/utils/bignum" ) // GetRootsBigComplex returns the roots e^{2*pi*i/m *j} for 0 <= j <= NthRoot diff --git a/utils/bignum/complex.go b/utils/bignum/complex.go index 6694ea6b..a0c8e6a2 100644 --- a/utils/bignum/complex.go +++ b/utils/bignum/complex.go @@ -4,7 +4,7 @@ import ( "fmt" "math/big" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/utils" ) // Complex is a type for arbitrary precision complex number diff --git a/utils/buffer/utils.go b/utils/buffer/utils.go index b87fb7a8..0f79231b 100644 --- a/utils/buffer/utils.go +++ b/utils/buffer/utils.go @@ -11,7 +11,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/utils" + "github.com/tuneinsight/lattigo/v5/utils" ) // binarySerializer is a testing interface for byte encoding and decoding. diff --git a/utils/factorization/factorization_test.go b/utils/factorization/factorization_test.go index cbdeb7bb..9be59d14 100644 --- a/utils/factorization/factorization_test.go +++ b/utils/factorization/factorization_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/utils/factorization" + "github.com/tuneinsight/lattigo/v5/utils/factorization" ) const ( diff --git a/utils/factorization/weierstrass.go b/utils/factorization/weierstrass.go index b6d91e17..9e1db45f 100644 --- a/utils/factorization/weierstrass.go +++ b/utils/factorization/weierstrass.go @@ -3,7 +3,7 @@ package factorization import ( "math/big" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) // Weierstrass is an elliptic curve y^2 = x^3 + ax + b mod N. diff --git a/utils/sampling/prng_test.go b/utils/sampling/prng_test.go index 35b7bfd1..337b1443 100644 --- a/utils/sampling/prng_test.go +++ b/utils/sampling/prng_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/tuneinsight/lattigo/v4/utils/sampling" + "github.com/tuneinsight/lattigo/v5/utils/sampling" ) func Test_PRNG(t *testing.T) { diff --git a/utils/structs/map.go b/utils/structs/map.go index 64b0b3f2..092c37a6 100644 --- a/utils/structs/map.go +++ b/utils/structs/map.go @@ -5,8 +5,8 @@ import ( "fmt" "io" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/buffer" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/buffer" "golang.org/x/exp/constraints" ) diff --git a/utils/structs/matrix.go b/utils/structs/matrix.go index 745a5bd8..95c87aad 100644 --- a/utils/structs/matrix.go +++ b/utils/structs/matrix.go @@ -5,8 +5,8 @@ import ( "fmt" "io" - "github.com/tuneinsight/lattigo/v4/utils" - "github.com/tuneinsight/lattigo/v4/utils/buffer" + "github.com/tuneinsight/lattigo/v5/utils" + "github.com/tuneinsight/lattigo/v5/utils/buffer" ) // Matrix is a struct wrapping a double slice of components of type T. diff --git a/utils/structs/vector.go b/utils/structs/vector.go index 045d3b21..f7afd6c5 100644 --- a/utils/structs/vector.go +++ b/utils/structs/vector.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - "github.com/tuneinsight/lattigo/v4/utils/buffer" + "github.com/tuneinsight/lattigo/v5/utils/buffer" ) // Vector is a struct wrapping a slice of components of type T.