|
| 1 | +# Changelog |
| 2 | +All notable changes to this library are documented in this file. |
| 3 | + |
| 4 | +## [0.0.1] - 24.06.2024 |
| 5 | + |
| 6 | +Changes affecting the entire library: |
| 7 | +- Refactored how polynomials and their derivative structs (e.g. ciphertexts and keys) are instantiated. |
| 8 | + They now all have the following methods: |
| 9 | + - `.FromBuffer` which allow to assign a new backing to the receiver from an `[]uint64` slice |
| 10 | + - `.BufferSize` which returns the minimum size of the `[]uint64` slice to provide to `.FromBuffer` |
| 11 | +- Calling `New<Something>` will internally call the two here above methods |
| 12 | +- Removed the package `ring/ringqp`: all instances of `RingQP` have been replaced |
| 13 | + by separate calls to `RingQ` and `RingP`. New associated structs have been designed |
| 14 | + to replace the old `ringqp.Poly` (see changes to the `ring` package) |
| 15 | +- Refactored all sampling (see changes to `utils/sampling`), improves related performance by a speedup factor of up to 2x |
| 16 | +- Replaced most instances of `[]*<object>` by `[]<object>`, for example `[]*big.Float -> []big.Float` |
| 17 | +- Optimized the buffers and their size of many objects. |
| 18 | + |
| 19 | +- `he`: |
| 20 | + - Linear Transformations: |
| 21 | + - Generalized implementation of linear transformation such that package specific code (e.g. `heint` or `hefloat`) is not necessary anymore. |
| 22 | + - Significantly improved the search for the best giant step size, which is not anymore constrained to a power of two: |
| 23 | + - Added `OptimalLinearTransformationGiantStep` which replaces `FindBestBSGSRatio` and returns much more optimal values (not constrained to be a power of two anymore) that properly minimize the number of Galois elements. |
| 24 | + - Removed the `LogBSGSRatio` from the |
| 25 | + - `LinearTransformationParameters`: |
| 26 | + - Removed the `LogBSGSRatio` field. |
| 27 | + - Removed the `Naive` field. |
| 28 | + - Added the `GiantStep` field. |
| 29 | + - LinearTransformationParameters: |
| 30 | + - Added `GaloisElements`: returns the set of Galois elements necessary to evaluate the diagonalized matrix. |
| 31 | + - LinearTransformation: |
| 32 | + - Removed the ` LogBabyStepGianStepRatio` field |
| 33 | + - Removed the `N1` field. |
| 34 | + - Added the `GiantStep` field. |
| 35 | + - Diagonals (diagonalized matrix): |
| 36 | + - Added `Add`: add two diagonalized matrices together. |
| 37 | + - Added `Mul`: multiply ttwo diagonalized matrices together. |
| 38 | + - Added `Indexes`: returns the indexes of the non-zero diagonals of the diagonalized matrix. |
| 39 | + - Added `GaloisElements`: returns the set of Galois elements necessary to evaluate the diagonalized matrix. |
| 40 | + - Added `At`: returns a specific diagonal of the diagonalized matrix. |
| 41 | + - Added `Evaluate: evaluates the diagonalized matrix on a vector. |
| 42 | + - Permutation (permutation matrix): |
| 43 | + - Added `Indexes`: returns the indexes of the non-zero diagonals of the permutation. |
| 44 | + - Added `Diagonals`: returns the diagonalized matrix of the permutation. |
| 45 | + - Added `GaloisElements`: returns the set of Galois elements necessary to evaluate the permutation. |
| 46 | + - Improved relinearization patterns when evaluating a polynomial with the flag `lazy=true` |
| 47 | + - Polynomial Evaluation: |
| 48 | + - The output of polynomial evaluation is not rescaled anymore, enabling more optimal noise management. |
| 49 | + - Added `EncodedPolynomial` type, a pre-encoded `VectorPolynomial` into `rlwe.Plaintext`. |
| 50 | + - `PolynomialVector`: |
| 51 | + - Simplified the field `Mapping` which now takes a single slices as mapping, instead of a map of slices. |
| 52 | + - Added `Evaluate`. |
| 53 | + |
| 54 | +- `heint`: |
| 55 | + - Added support for prime power plaintext modulus. |
| 56 | + - Merged `schemes/bgv/` into `heint` |
| 57 | + - Removed package specific code for linear transformations (this functionality now solely depends on the `he` package) |
| 58 | + |
| 59 | +- `hefloat`: |
| 60 | + - Bootstrapping: |
| 61 | + - Fixed wrong returned `MinimumInputLevel` |
| 62 | + - Added API to estimate the failure probability: |
| 63 | + - `FailureProbability` returns PR[||I(X)|| > K]. |
| 64 | + - `FindSuitableK` returns the smallest K satisfying PR[||I(X)|| > K] <= 2^{logfailure}. |
| 65 | + - `ModifiedIrwinHall` estimates PR[||I(X)|| > K] |
| 66 | + |
| 67 | + - Evaluator: |
| 68 | + - Added `MatchScalesForMul` |
| 69 | + - InverseEvaluator: |
| 70 | + - Changed `log2Min` and `log2Max` to `Min` and `Max` respectively. This enables a more human friendly parameterization. |
| 71 | + - Added `InvSqrt`, which returns 1/sqrt(x) by Newton iterations. Contrary to the GoldschmidtDivision algorithm, it can be used to refine a value already close to the ideal value, enabling composition with polynomial approximation. |
| 72 | + - GoldschmidtDivision takes as operand the number of iterations instead of automatically estimating them. |
| 73 | + - IntervalNormalization uses one less level per iteration (2 instead of 3), and use one less bootstrapping per iteration if using the Conjugate Invariant ring. |
| 74 | + - Added affine transformation for EvalMod1 |
| 75 | + - Merged `schemes/ckks` into `hefloat` |
| 76 | + - Removed package specific code for linear transformations (this functionality now solely depends on the `he` package) |
| 77 | + - Improved statistics, which now also display the standard deviation as well as the error statistics |
| 78 | + |
| 79 | + - `hefloat/bootstrapping`: |
| 80 | + - Improved serialization support for `bootstrapping.ParametersLiteral` |
| 81 | + |
| 82 | +- `mhe`: |
| 83 | + - General rework, uniformization and simplification of the API of all protocols. |
| 84 | + - Greatly reduced code and code complexity of all protocols: |
| 85 | + - Protocols use the `rlwe.Encryptor` instead of re-implementing encryption routines |
| 86 | + - Shares are now standardized using the new structs defined in the `ring` package |
| 87 | + - New non-interactive protocols: |
| 88 | + - `mhe.CircularCiphertextProtocol`: non-interactive generation of `RLWE(ms)`. |
| 89 | + - `mhe.CircularGadgetCiphertextProtocol`: non-interactive generation of `GRLWE(ms)`. |
| 90 | + - These two protocols enable a fully non-interactive setup for `heint`, `hefloat` and `hebin`. |
| 91 | + - Improved the interactive relinearization key gen protocol (https://eprint.iacr.org/2021/1085). |
| 92 | + - Added full support for deterministic share generation. |
| 93 | + |
| 94 | +- `core`: |
| 95 | + - Removed `core` |
| 96 | + |
| 97 | + - `rlwe`: |
| 98 | + - Moved out of `core` |
| 99 | + - Expanded the API of the `Encryptor` to support deterministic encryption and be able to perform key-switching |
| 100 | + - Added support for signed digit decomposition |
| 101 | + - Parameters can be specified with any combination of (`Q`, `LogQ`) and (`P`, `LogP`) |
| 102 | + - Added `NoiseCiphertext`, which returns the base 2 logarithm of the standard deviation of the |
| 103 | + residual noise in an `rlwe.Ciphertext` |
| 104 | + - Removed field `nbPi` in `DecomposeNTT` |
| 105 | + - Added [Optimizing HE operations via Level-aware Key-switching Framework](https://eprint.iacr.org/2023/1328) |
| 106 | + |
| 107 | + - `rgsw`: |
| 108 | + - Moved out of `core` |
| 109 | + - Added support for `RGSWxRGSW` product |
| 110 | + - Added `.FromGadgetCiphertext` which produces an `rgsw.Ciphertext` from an `rlwe.GadgetCiphertext` |
| 111 | + - Added signed digit decomposition |
| 112 | + |
| 113 | +- `schemes`: |
| 114 | + - `bfv`: removed |
| 115 | + - `bgv`: merged into `he/heint` |
| 116 | + - `ckks`: merged into `he/hefloat` |
| 117 | + |
| 118 | +- `examples`: |
| 119 | + - Refactored all examples |
| 120 | + |
| 121 | +- `ring`: |
| 122 | + - `Ring`: |
| 123 | + - Renamed `Ring` to `RNSRing` and `SubRing` to `Ring` |
| 124 | + - Renamed `Poly` to `RNSPoly` which is now a slice of `Poly` and added type `Poly`, a slice of `[]uint64`. |
| 125 | + - Greatly simplified struct `RNSRing` which is now simply `[]*Ring`. |
| 126 | + - Updated vectorized operations to accept slices that are not multiples of 8 (and not trigger buffer overflows). |
| 127 | + - Added `Modulus` which returns the modulus of the ring (`.AtLevel(level).Modulus()` replaces `.ModulusAtLevel[level]`). |
| 128 | + - Added `RescaleConstants` which returns the rescaling constant for a given level (`.RescaleConstants(level)` replaces `RescaleConstants[level]`). |
| 129 | + - Added `Concat` which returns the concatenation of two rings |
| 130 | + - Added `AddModuli` which returns an instance of a ring with additional moduli. |
| 131 | + - `BasisExtender`: |
| 132 | + - Removed and replaced by methods on the `RNSRing` type. Constants are now computed on the fly. |
| 133 | + - Refactored the samplers which now take a `sampling.Source` as random coins generator |
| 134 | + - `ring.Poly` is now a reslice of an 1D `[]uint64` backing array instead of |
| 135 | + a collection of independently allocated 1D arrays |
| 136 | + - Added `Point`, `Vector` and `Matrix` structs with many associated methods |
| 137 | + - Added the `Stats` method which returns log2(std) and mean of a Poly. |
| 138 | + |
| 139 | +- `utils`: |
| 140 | + - Removed many slices utilities, which are now available through the native package `slice` |
| 141 | + - Removed `Min` and `Max` which now have native supported in Go as `min` and `max` |
| 142 | + |
| 143 | + - `structs`: |
| 144 | + - Added `Copyer` interface and support (TODO review copy/clone) |
| 145 | + |
| 146 | + - `sampling`: |
| 147 | + - Replaced the blake2b based XOF (`sampling.PRNG`) by the `math/rand/v2` ChaCha8-based CSPRNG (`sampling.Source`). |
| 148 | + - The `sampling.Source` struct is now used for all sampling the library |
| 149 | + |
| 150 | + - `bignum`: |
| 151 | + - Refactored and fixed many bugs in the multi-interval Remez minimax polynomial approximation algorithm which now properly works when doing multi-interval approximations. |
| 152 | + - Added `Log2ErfC` which returns the base 2 logarithm of the complementary error function. |
| 153 | + - Added `Stats([]big.Int, prec)`, which returns the base 2 logarithm of the standard deviation and the mean |
| 154 | + - Added `ToComplexSlice` to cast a numerical slice to a `[]bignum.Complex` |
| 155 | + |
| 156 | + - `concurrency`: |
| 157 | + - New package providing basic support for concurrency. |
| 158 | + |
| 159 | +Others: |
| 160 | +- Improved issue template |
| 161 | + |
| 162 | +## [0.0.0] - 12.06.2024 |
| 163 | + |
| 164 | +- Fork of Lattigo v5.0.2 |
0 commit comments