Documentation ¶
Overview ¶
Package examples contains several example Go applications that use Lattigo in both the single- and multiparty settings, as well as several example parameter sets. See examples/README.md for more information about the examples.
Note that the code in this package, including the example parameter sets, is solely meant to illustrate the use of the library and facilitate quick experiments. It should not be depended upon and may at any time be changed or be removed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // BGVParamsN12QP109 is an example parameter set for the `bgv` package logN=12 and logQP=109. // These parameters expect the user to use the regular tensoring (i.e. Evaluator.Mul) followed // by the rescaling (i.e. Evaluator.Rescale). BGVParamsN12QP109 = bgv.ParametersLiteral{ LogN: 12, LogQ: []int{39, 31}, LogP: []int{39}, PlaintextModulus: 0x10001, } // BGVParamsN13QP218 is an example parameter set for the `bgv` package with logN=13 and logQP=218. // These parameters expect the user to use the regular tensoring (i.e. Evaluator.Mul) followed // by the rescaling (i.e. Evaluator.Rescale). BGVParamsN13QP218 = bgv.ParametersLiteral{ LogN: 13, LogQ: []int{42, 33, 33, 33, 33}, LogP: []int{44}, PlaintextModulus: 0x10001, } // BGVParamsN14QP438 is an example parameter set for the `bgv` package with logN=14 and logQP=438. // These parameters expect the user to use the regular tensoring (i.e. Evaluator.Mul) followed // by the rescaling (i.e. Evaluator.Rescale). BGVParamsN14QP438 = bgv.ParametersLiteral{ LogN: 14, LogQ: []int{44, 34, 34, 34, 34, 34, 34, 34, 34, 34}, LogP: []int{44, 44}, PlaintextModulus: 0x10001, } // BGVParamsN15QP880 is an example parameter set for the `bgv` package with logN=15 and logQP=881. // These parameters expect the user to use the regular tensoring (i.e. Evaluator.Mul) followed // by the rescaling (i.e. Evaluator.Rescale). BGVParamsN15QP880 = bgv.ParametersLiteral{ LogN: 15, LogQ: []int{47, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34}, LogP: []int{47, 47, 47, 47}, PlaintextModulus: 0x10001, } // BGVScaleInvariantParamsN12QP109 is an example parameter set for the `bgv` package logN=12 and logQP=109. // These parameters expect the user to use the scale invariant tensoring (i.e. Evaluator.MulScaleInvariant). BGVScaleInvariantParamsN12QP109 = bgv.ParametersLiteral{ LogN: 12, LogQ: []int{39, 39}, LogP: []int{31}, PlaintextModulus: 0x10001, } // BGVScaleInvariantParamsN13QP218 is an example parameter set for the `bgv` package with logN=13 and logQP=218. // These parameters expect the user to use the scale invariant tensoring (i.e. Evaluator.MulScaleInvariant). BGVScaleInvariantParamsN13QP218 = bgv.ParametersLiteral{ LogN: 13, LogQ: []int{55, 54, 54}, LogP: []int{55}, PlaintextModulus: 0x10001, } // BGVScaleInvariantParamsN14QP438 is an example parameter set for the `bgv` package with logN=14 and logQP=438. // These parameters expect the user to use the scale invariant tensoring (i.e. Evaluator.MulScaleInvariant). BGVScaleInvariantParamsN14QP438 = bgv.ParametersLiteral{ LogN: 14, LogQ: []int{55, 55, 55, 54, 54, 54}, LogP: []int{56, 55}, PlaintextModulus: 0x10001, } // BGVScaleInvariantParamsN15QP880 is an example parameter set for the `bgv` package with logN=15 and logQP=881. // These parameters expect the user to use the scale invariant tensoring (i.e. Evaluator.MulScaleInvariant). BGVScaleInvariantParamsN15QP880 = bgv.ParametersLiteral{ LogN: 15, LogQ: []int{60, 60, 59, 58, 58, 58, 58, 58, 58, 58, 58, 58}, LogP: []int{60, 60, 60}, PlaintextModulus: 0x10001, } // CKKSComplexParamsN12QP109 is an example parameter set for the `ckks` package with logN=12 and logQP=109. // These parameters instantiate `ckks` over the complex field with N/2 SIMD slots. CKKSComplexParamsN12QP109 = ckks.ParametersLiteral{ LogN: 12, LogQ: []int{38, 32}, LogP: []int{39}, LogDefaultScale: 32, } // CKKSComplexParamsN13QP218 is an example parameter set for the `ckks` package with logN=13 and logQP=218. // These parameters instantiate `ckks` over the complex field with N/2 SIMD slots. CKKSComplexParamsN13QP218 = ckks.ParametersLiteral{ LogN: 13, LogQ: []int{33, 30, 30, 30, 30, 30}, LogP: []int{35}, LogDefaultScale: 30, } // CKKSComplexParamsN14QP438 is an example parameter set for the `ckks` package with logN=14 and logQP=438. // These parameters instantiate `ckks` over the complex field with N/2 SIMD slots. CKKSComplexParamsN14QP438 = ckks.ParametersLiteral{ LogN: 14, LogQ: []int{45, 34, 34, 34, 34, 34, 34, 34, 34, 34}, LogP: []int{44, 43}, LogDefaultScale: 34, } // CKKSComplexParamsN15QP880 is an example parameter set for the `ckks` package with logN=15 and logQP=881. // These parameters instantiate `ckks` over the complex field with N/2 SIMD slots. CKKSComplexParamsN15QP881 = ckks.ParametersLiteral{ LogN: 15, LogQ: []int{51, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40}, LogP: []int{50, 50, 50}, LogDefaultScale: 40, } // CKKSComplexParamsPN16QP1761 is an example parameter set for the `ckks` package with logN=16 and logQP = 1761. // These parameters instantiate `ckks` over the complex field with N/2 SIMD slots. CKKSComplexParamsPN16QP1761 = ckks.ParametersLiteral{ LogN: 16, LogQ: []int{56, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45}, LogP: []int{55, 55, 55, 55}, LogDefaultScale: 45, } // CKKSRealParamsN12QP109 is an example parameter set for the `ckks` package with conjugate-invariant CKKS and logN=12 and logQP=109. // These parameters instantiate `ckks` over the real field with N SIMD slots. CKKSRealParamsN12QP109 = ckks.ParametersLiteral{ LogN: 12, LogQ: []int{38, 32}, LogP: []int{39}, LogDefaultScale: 32, RingType: ring.ConjugateInvariant, } // CKKSRealParamsN13QP218 is an example parameter set for the `ckks` package with conjugate-invariant CKKS and logN=13 and logQP=218 // These parameters instantiate `ckks` over the real field with N SIMD slots. CKKSRealParamsN13QP218 = ckks.ParametersLiteral{ LogN: 13, LogQ: []int{33, 30, 30, 30, 30, 30}, LogP: []int{35}, LogDefaultScale: 30, RingType: ring.ConjugateInvariant, } // CKKSRealParamsN14QP438 is an example parameter set for the `ckks` package with logN=14 and logQP=438. // These parameters instantiate `ckks` over the real field with N SIMD slots. CKKSRealParamsN14QP438 = ckks.ParametersLiteral{ LogN: 14, LogQ: []int{46, 34, 34, 34, 34, 34, 34, 34, 34, 34}, LogP: []int{43, 43}, LogDefaultScale: 34, RingType: ring.ConjugateInvariant, } // CKKSRealParamsN15QP880 is an example parameter set for the `ckks` package with logN=15 and logQP=881. // These parameters instantiate `ckks` over the real field with N SIMD slots. CKKSRealParamsN15QP881 = ckks.ParametersLiteral{ LogN: 15, LogQ: []int{51, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40}, LogP: []int{50, 50, 50}, LogDefaultScale: 40, RingType: ring.ConjugateInvariant, } // CKKSRealParamsPN16QP1761 is an example parameter set for the `ckks` package with logN=16 and logQP = 1761 // These parameters instantiate `ckks` over the real field with N SIMD slots. CKKSRealParamsPN16QP1761 = ckks.ParametersLiteral{ LogN: 16, LogQ: []int{56, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45}, LogP: []int{55, 55, 55, 55}, LogDefaultScale: 45, RingType: ring.ConjugateInvariant, } )
View Source
var BGVParams = []bgv.ParametersLiteral{BGVParamsN12QP109, BGVParamsN13QP218, BGVParamsN14QP438, BGVParamsN15QP880}
View Source
var BGVScaleInvariantParams = []bgv.ParametersLiteral{BGVScaleInvariantParamsN12QP109, BGVScaleInvariantParamsN13QP218, BGVScaleInvariantParamsN14QP438, BGVScaleInvariantParamsN15QP880}
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
multiparty
|
|
singleparty
|
|
ckks_bootstrapping/basics
Package main implements an example showcasing the basics of the bootstrapping for fixed-point approximate arithmetic over the reals/complexes.
|
Package main implements an example showcasing the basics of the bootstrapping for fixed-point approximate arithmetic over the reals/complexes. |
ckks_bootstrapping/high_precision
Package main implements an example showcasing high-precision bootstrapping for high-precision fixed- point approximate arithmetic over the reals/complexes.
|
Package main implements an example showcasing high-precision bootstrapping for high-precision fixed- point approximate arithmetic over the reals/complexes. |
ckks_bootstrapping/slim
Package main implements an example showcasing slim for bootstrapping for fixed-point approximate arithmetic over the reals/complexes numbers.
|
Package main implements an example showcasing slim for bootstrapping for fixed-point approximate arithmetic over the reals/complexes numbers. |
ckks_scheme_switching
Package main showcases how lookup tables can complement fixed-point approximate homomorphic encryption to compute non-linear functions such as sign.
|
Package main showcases how lookup tables can complement fixed-point approximate homomorphic encryption to compute non-linear functions such as sign. |
ckks_sigmoid_chebyshev
Package main implements an example of smooth function approximation using Chebyshev polynomial interpolation.
|
Package main implements an example of smooth function approximation using Chebyshev polynomial interpolation. |
ckks_sigmoid_minimax
Package main implements an example of smooth function approximation using minimax polynomial interpolation.
|
Package main implements an example of smooth function approximation using minimax polynomial interpolation. |
ckks_vectorized_polynomial_evaluation
Package main implements an example of vectorized polynomial evaluation.
|
Package main implements an example of vectorized polynomial evaluation. |
rgsw_blind_rotations
Package main implements an example of Blind Rotation (a.k.a.
|
Package main implements an example of Blind Rotation (a.k.a. |
templates/bgv
Package main is a template encrypted modular arithmetic integers, with a set of example parameters, key generation, encoding, encryption, decryption and decoding.
|
Package main is a template encrypted modular arithmetic integers, with a set of example parameters, key generation, encoding, encryption, decryption and decoding. |
templates/ckks
Package main is a template encrypted arithmetic with floating point values, with a set of example parameters, key generation, encoding, encryption, decryption and decoding.
|
Package main is a template encrypted arithmetic with floating point values, with a set of example parameters, key generation, encoding, encryption, decryption and decoding. |
Click to show internal directories.
Click to hide internal directories.