mirror of
https://github.com/luxfi/lattice.git
synced 2026-09-24 00:25:44 +00:00
v4.0.0 release
This commit is contained in:
+2
-1
@@ -2,7 +2,8 @@
|
||||
# Changelog
|
||||
All notable changes to this library are documented in this file.
|
||||
|
||||
# UNRELEASED
|
||||
## - [4.0.0] 2022-10-04
|
||||
|
||||
- Added BGV/DBGV schemes.
|
||||
- ALL: added default parameters for LogN=11 and LogN=10.
|
||||
- RING: prime generation no longer skips the first candidate.
|
||||
|
||||
@@ -57,15 +57,15 @@ Starting with the release of version 3.0.0, Lattigo is maintained and supported
|
||||
SA](https://tuneinsight.com).
|
||||
|
||||
Also starting with from version 3.0.0, the module name has changed to
|
||||
github.com/tuneinsight/lattigo/v3, and the official repository has been moved to
|
||||
`github.com/tuneinsight/lattigo/v[X]`, and the official repository has been moved to
|
||||
https://github.com/tuneinsight/lattigo. This has the following implications for modules that depend
|
||||
on Lattigo:
|
||||
- Modules that require `github.com/ldsec/lattigo/v2` will still build correctly.
|
||||
- To upgrade to a version >= 3.0.0, depending modules must require `github.com/tuneinsight/lattigo/v3/`,
|
||||
for example by changing the imports to `github.com/tuneinsight/lattigo/v3/[package]` and by
|
||||
- To upgrade to a version X.y.z >= 3.0.0, depending modules must require `github.com/tuneinsight/lattigo/v[X]/`,
|
||||
for example by changing the imports to `github.com/tuneinsight/lattigo/v[X]/[package]` and by
|
||||
running `go mod tidy`.
|
||||
|
||||
The current version of Lattigo, (v3.x.x) is fast-evolving and in constant development. Consequently,
|
||||
The current version of Lattigo, (v4.x.x) is fast-evolving and in constant development. Consequently,
|
||||
there will still be backward-incompatible changes within this major version, in addition to many bug
|
||||
fixes and new features. Hence, we encourage all Lattigo users to update to the latest Lattigo version.
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
func BenchmarkBFV(b *testing.B) {
|
||||
|
||||
+3
-3
@@ -11,9 +11,9 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
var flagLongTest = flag.Bool("long", false, "run the long test suite (all parameters). Overrides -short and requires -timeout=0.")
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package bfv
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Ciphertext is a *ring.Poly array representing a polynomial of degree > 0 with coefficients in R_Q.
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package bfv
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// Decryptor is an interface wrapping a rlwe.Decryptor.
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@ package bfv
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// GaloisGen is an integer of order N=2^d modulo M=2N and that spans Z_M with the integer -1.
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package bfv
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Encryptor an encryption interface for the BFV scheme.
|
||||
|
||||
+3
-3
@@ -5,9 +5,9 @@ import (
|
||||
"math"
|
||||
"math/big"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Operand is a common interface for Ciphertext and Plaintext.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package bfv
|
||||
|
||||
import "github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
import "github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
|
||||
// NewKeyGenerator creates a rlwe.KeyGenerator instance from the BFV parameters.
|
||||
func NewKeyGenerator(params Parameters) rlwe.KeyGenerator {
|
||||
|
||||
+3
-3
@@ -7,9 +7,9 @@ import (
|
||||
"math"
|
||||
"math/bits"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package bfv
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// Plaintext is a Element with only one Poly. It represents a Plaintext element in R_q that is the
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"math/bits"
|
||||
"runtime"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Polynomial is a struct storing the coefficients of a plaintext
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@ package bfv
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Scaler is an interface that rescales polynomial coefficients by a fraction t/Q.
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import (
|
||||
"math"
|
||||
"math/big"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// Noise decrypts a ciphertext and returns the log2
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
func BenchmarkBGV(b *testing.B) {
|
||||
|
||||
+3
-3
@@ -5,9 +5,9 @@ import (
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
+3
-3
@@ -4,9 +4,9 @@ import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Ciphertext is a *ring.Poly array representing a polynomial of degree > 0 with coefficients in R_Q.
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@ import (
|
||||
"math"
|
||||
"math/big"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// Decryptor is an interface wrapping a rlwe.Decryptor.
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@ package bgv
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// GaloisGen is an integer of order N=2^d modulo M=2N and that spans Z_M with the integer -1.
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package bgv
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// Encryptor is an interface wrapping a rlwe.Encryptor, and modified
|
||||
|
||||
+4
-4
@@ -5,10 +5,10 @@ import (
|
||||
"math/big"
|
||||
"math/bits"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Operand is a common interface for Ciphertext and Plaintext.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package bgv
|
||||
|
||||
import "github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
import "github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
|
||||
// NewKeyGenerator creates a rlwe.KeyGenerator instance from the BGV parameters.
|
||||
func NewKeyGenerator(params Parameters) rlwe.KeyGenerator {
|
||||
|
||||
@@ -3,9 +3,9 @@ package bgv
|
||||
import (
|
||||
"runtime"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// InnerSumLog applies an optimized inner sum on the ciphertext (log2(n) + HW(n) rotations with double hoisting).
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@ import (
|
||||
"fmt"
|
||||
"math/bits"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package bgv
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// Plaintext is is a Element with only one Poly.
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"math/bits"
|
||||
"runtime"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Polynomial is a struct storing the coefficients of a plaintext
|
||||
|
||||
@@ -4,10 +4,10 @@ package advanced
|
||||
import (
|
||||
"math"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
)
|
||||
|
||||
// Evaluator is an interface embedding the ckks.Evaluator interface with
|
||||
|
||||
@@ -3,8 +3,8 @@ package advanced
|
||||
import (
|
||||
"math"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// LinearTransformType is a type used to distinguish different linear transformations.
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
var printPrecisionStats = flag.Bool("print-precision", false, "print precision stats")
|
||||
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"math"
|
||||
"math/cmplx"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// SineType is the type of function used during the bootstrapping
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
func TestHomomorphicMod(t *testing.T) {
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/ckks/advanced"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks/advanced"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// Bootstrapper is a struct to store a memory buffer with the plaintext matrices,
|
||||
|
||||
@@ -4,8 +4,8 @@ package bootstrapping
|
||||
import (
|
||||
"math"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
)
|
||||
|
||||
// Bootstrap re-encrypts a ciphertext at lvl Q0 to a ciphertext at MaxLevel-k where k is the depth of the bootstrapping circuit.
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
)
|
||||
|
||||
func BenchmarkBootstrap(b *testing.B) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package bootstrapping
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/ckks/advanced"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks/advanced"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Parameters is a struct for the default bootstrapping parameters
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
var minPrec float64 = 12.0
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package bootstrapping
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/ckks/advanced"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks/advanced"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
type defaultParametersLiteral struct {
|
||||
|
||||
+3
-3
@@ -3,9 +3,9 @@ package ckks
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// DomainSwitcher is a type for switching between the standard CKKS domain (which encrypts vectors of complex numbers)
|
||||
|
||||
+3
-3
@@ -5,9 +5,9 @@ import (
|
||||
"errors"
|
||||
"math"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Ciphertext is *ring.Poly array representing a polynomial of degree > 0 with coefficients in R_Q.
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
func BenchmarkCKKSScheme(b *testing.B) {
|
||||
|
||||
+3
-3
@@ -11,9 +11,9 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
var flagLongTest = flag.Bool("long", false, "run the long test suite (all parameters + secure bootstrapping). Overrides -short and requires -timeout=0.")
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package ckks
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// Decryptor is an interface wrapping a rlwe.Decryptor.
|
||||
|
||||
+3
-3
@@ -8,9 +8,9 @@ import (
|
||||
"math/big"
|
||||
"math/bits"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// GaloisGen is an integer of order N/2 modulo M and that spans Z_M with the integer -1.
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package ckks
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Encryptor an encryption interface for the CKKS scheme.
|
||||
|
||||
+4
-4
@@ -4,10 +4,10 @@ import (
|
||||
"errors"
|
||||
"math"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Operand is a common interface for Ciphertext and Plaintext types.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package ckks
|
||||
|
||||
import "github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
import "github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
|
||||
// KeyGenerator is an interface for the generation of CKKS keys.
|
||||
type KeyGenerator interface {
|
||||
|
||||
@@ -3,9 +3,9 @@ package ckks
|
||||
import (
|
||||
"runtime"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Trace maps X -> sum((-1)^i * X^{i*n+1}) for 0 <= i < N
|
||||
|
||||
+3
-3
@@ -8,9 +8,9 @@ import (
|
||||
"math/big"
|
||||
"math/bits"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
var minLogSlots = 0
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package ckks
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// Plaintext is is a Element with only one Poly.
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"math/bits"
|
||||
"runtime"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Polynomial is a struct storing the coefficients of a polynomial
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import (
|
||||
"math"
|
||||
"math/big"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
)
|
||||
|
||||
// StandardDeviation computes the scaled standard deviation of the input vector.
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/bfv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/bfv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
func BenchmarkDBFV(b *testing.B) {
|
||||
|
||||
+5
-5
@@ -10,11 +10,11 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/tuneinsight/lattigo/v3/bfv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/bfv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
var flagLongTest = flag.Bool("long", false, "run the long test suite (all parameters). Overrides -short and requires -timeout=0.")
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package dbfv
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/bfv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/bfv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
)
|
||||
|
||||
// NewCKGProtocol creates a new drlwe.CKGProtocol instance from the BFV parameters
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
package dbfv
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/bfv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/bfv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
)
|
||||
|
||||
// CKSProtocol is a structure storing the parameters for the collective key-switching protocol.
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package dbfv
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/bfv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/bfv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// RefreshProtocol is a struct storing the relevant parameters for the Refresh protocol.
|
||||
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
package dbfv
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/bfv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/bfv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// E2SProtocol is the structure storing the parameters and temporary buffers
|
||||
|
||||
+5
-5
@@ -3,11 +3,11 @@ package dbfv
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/bfv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/bfv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// MaskedTransformProtocol is a struct storing the parameters for the MaskedTransformProtocol protocol.
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/bgv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/bgv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
func BenchmarkDBGV(b *testing.B) {
|
||||
|
||||
+5
-5
@@ -9,11 +9,11 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/tuneinsight/lattigo/v3/bgv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/bgv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
var flagLongTest = flag.Bool("long", false, "run the long test suite (all parameters). Overrides -short and requires -timeout=0.")
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
package dbgv
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/bgv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/bgv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
)
|
||||
|
||||
// CKGProtocol is the structure storing the parameters and state for a party in the collective key generation protocol.
|
||||
|
||||
+5
-5
@@ -3,11 +3,11 @@ package dbgv
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/bgv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/bgv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// CKSProtocol is a structure storing the parameters for the collective key-switching protocol.
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package dbgv
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/bgv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/bgv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// RefreshProtocol is a struct storing the relevant parameters for the Refresh protocol.
|
||||
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
package dbgv
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/bgv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/bgv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// E2SProtocol is the structure storing the parameters and temporary buffers
|
||||
|
||||
+5
-5
@@ -4,11 +4,11 @@ import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/bgv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/bgv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// MaskedTransformProtocol is a struct storing the parameters for the MaskedTransformProtocol protocol.
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
func BenchmarkDCKKS(b *testing.B) {
|
||||
|
||||
+5
-5
@@ -9,11 +9,11 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
var flagLongTest = flag.Bool("long", false, "run the long test suite (all parameters + secure bootstrapping). Overrides -short and requires -timeout=0.")
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package dckks
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
)
|
||||
|
||||
// NewCKGProtocol creates a new drlwe.CKGProtocol instance from the CKKS parameters
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
package dckks
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
)
|
||||
|
||||
// CKSProtocol is a structure storing the parameters for the collective key-switching protocol.
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
package dckks
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// RefreshProtocol is a struct storing the relevant parameters for the Refresh protocol.
|
||||
|
||||
+5
-5
@@ -3,11 +3,11 @@ package dckks
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// E2SProtocol is the structure storing the parameters and temporary buffers
|
||||
|
||||
+5
-5
@@ -6,11 +6,11 @@ import (
|
||||
|
||||
"encoding/binary"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// MaskedTransformProtocol is a struct storing the parameters for the MaskedTransformProtocol protocol.
|
||||
|
||||
+3
-3
@@ -4,9 +4,9 @@ import (
|
||||
"math"
|
||||
"math/bits"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// GetMinimumLevelForBootstrapping takes the security parameter lambda, the ciphertext scale, the number of parties and the moduli chain
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package drlwe
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// CRS is an interface for Common Reference Strings.
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
func BenchmarkDRLWE(b *testing.B) {
|
||||
|
||||
+3
-3
@@ -10,9 +10,9 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
var nbParties = int(10)
|
||||
|
||||
+4
-4
@@ -2,10 +2,10 @@
|
||||
package drlwe
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// CKGProtocol is the structure storing the parameters and and precomputations for the collective key generation protocol.
|
||||
|
||||
@@ -3,10 +3,10 @@ package drlwe
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// RKGProtocol is the structure storing the parameters and and precomputations for the collective relinearization key generation protocol.
|
||||
|
||||
+4
-4
@@ -3,10 +3,10 @@ package drlwe
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// RTGShare is represent a Party's share in the RTG protocol.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package drlwe
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// PCKSShare represents a party's share in the PCKS protocol.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package drlwe
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// CKSProtocol is the structure storing the parameters and and precomputations for the collective key-switching protocol.
|
||||
|
||||
+4
-4
@@ -3,10 +3,10 @@ package drlwe
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Thresholdizer is a type for generating secret-shares of ringqp.Poly types such that
|
||||
|
||||
@@ -5,11 +5,11 @@ import (
|
||||
"math"
|
||||
"math/bits"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/bfv"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/bfv"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
)
|
||||
|
||||
func obliviousRiding() {
|
||||
|
||||
@@ -5,11 +5,11 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
ckksAdvanced "github.com/tuneinsight/lattigo/v3/ckks/advanced"
|
||||
"github.com/tuneinsight/lattigo/v3/rgsw/lut"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
ckksAdvanced "github.com/tuneinsight/lattigo/v4/ckks/advanced"
|
||||
"github.com/tuneinsight/lattigo/v4/rgsw/lut"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// This example showcases how lookup tables can complement the CKKS scheme to compute non-linear functions
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/ckks/bootstrapping"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks/bootstrapping"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
var flagShort = flag.Bool("short", false, "run the example with a smaller and insecure ring degree.")
|
||||
@@ -31,7 +31,7 @@ func main() {
|
||||
// Bootstrapping parameters
|
||||
// Two sets of four parameters each, DefaultParametersSparse and DefaultParametersDense,
|
||||
// (each index 0 to 3) ensuring 128 bit of security are available in
|
||||
// github.com/tuneinsight/lattigo/v3/ckks/bootstrapping/default_params.go
|
||||
// github.com/tuneinsight/lattigo/v4/ckks/bootstrapping/default_params.go
|
||||
//
|
||||
// LogSlots is hardcoded to 15 in the parameters, but can be changed from 1 to 15.
|
||||
// When changing LogSlots make sure that the number of levels allocated to CtS and StC is
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"math/cmplx"
|
||||
"time"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
func example() {
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ckks"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ckks"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
func chebyshevinterpolation() {
|
||||
|
||||
@@ -7,11 +7,11 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/bfv"
|
||||
"github.com/tuneinsight/lattigo/v3/dbfv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/bfv"
|
||||
"github.com/tuneinsight/lattigo/v4/dbfv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
func check(err error) {
|
||||
|
||||
@@ -7,11 +7,11 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/bfv"
|
||||
"github.com/tuneinsight/lattigo/v3/dbfv"
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/bfv"
|
||||
"github.com/tuneinsight/lattigo/v4/dbfv"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
func check(err error) {
|
||||
|
||||
@@ -9,9 +9,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/drlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// This example showcases the use of the drlwe package to generate an evaluation key in a multiparty setting.
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"math/big"
|
||||
"time"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/utils"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/utils"
|
||||
)
|
||||
|
||||
// Vectorized oblivious evaluation is a two-party protocol for the function f(x) = ax + b where a sender
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
module github.com/tuneinsight/lattigo/v3
|
||||
module github.com/tuneinsight/lattigo/v4
|
||||
|
||||
go 1.13
|
||||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/stretchr/testify v1.7.1
|
||||
golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167
|
||||
golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a // indirect
|
||||
github.com/kr/pretty v0.3.0 // indirect
|
||||
github.com/rogpeppe/go-internal v1.9.0 // indirect
|
||||
github.com/stretchr/testify v1.8.0
|
||||
golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be
|
||||
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99 // indirect
|
||||
)
|
||||
|
||||
@@ -2,31 +2,41 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 h1:O8uGbHCqlTp2P6QJSLmCojM4mN6UemYv8K+dCnmHmu0=
|
||||
golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be h1:fmw3UbQh+nxngCAHrDCCztao/kbYFnWjoqop8dHx05A=
|
||||
golang.org/x/crypto v0.0.0-20220926161630-eccd6366d1be/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a h1:N2T1jUrTQE9Re6TFF5PhvEHXHCguynGhKjWVsIUt5cY=
|
||||
golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec h1:BkDtF2Ih9xZ7le9ndzTA7KJow28VbQW3odyk/8drmuI=
|
||||
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99 h1:dbuHpmKjkDzSOMKAWl10QNlgaZUd3V1q99xc81tt2Kc=
|
||||
gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@
|
||||
package rgsw
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
)
|
||||
|
||||
// Ciphertext is a generic type for RGSW ciphertext.
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package rgsw
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
)
|
||||
|
||||
// Encryptor is a type for encrypting RGSW ciphertexts. It implements the rlwe.Encryptor
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
package rgsw
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
)
|
||||
|
||||
// Evaluator is a type for evaluating homomorphic operations involving RGSW ciphertexts.
|
||||
|
||||
@@ -3,10 +3,10 @@ package lut
|
||||
import (
|
||||
"math/big"
|
||||
|
||||
"github.com/tuneinsight/lattigo/v3/rgsw"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe/ringqp"
|
||||
"github.com/tuneinsight/lattigo/v4/rgsw"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe/ringqp"
|
||||
)
|
||||
|
||||
// Evaluator is a struct that stores the necessary
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
package lut
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/rgsw"
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v3/rlwe"
|
||||
"github.com/tuneinsight/lattigo/v4/rgsw"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/rlwe"
|
||||
)
|
||||
|
||||
// EvaluationKey is a struct storing the encryption
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
package lut
|
||||
|
||||
import (
|
||||
"github.com/tuneinsight/lattigo/v3/ring"
|
||||
"github.com/tuneinsight/lattigo/v4/ring"
|
||||
)
|
||||
|
||||
// InitLUT takes a function g, and creates a LUT polynomial for the function in the interval [a, b].
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user