Releases: microsoft/SEAL
Releases · microsoft/SEAL
Release list
Release 3.6.1
- Fixed a bug reported in (Issue 248) and (Issue 249): in in-place Zstandard compression the input buffer head location was not correctly updated, resulting in huge memory use.
Release 3.6.0
Hotfix - 12/2/2020
- Fixed an issue with CMake system where a shared Zstandard was not correctly handled (it is not supported).
Hotfix - 11/17/2020
- Fixed issue with CMake system where
BUILD_SHARED_LIBS=ONandSEAL_BUILD_DEPS=ONresulted in Zstandard header files not being visible to the build (Issue 242).
Hotfix - 11/16/2020
- Fixed issues with CMake system overwriting existing
FETCHCONTENT_BASE_DIR(Issue 242). - Corrected mistakes and typos in README.md.
New Features
- Added support for Zstandard compression as a much more efficient alternative to ZLIB.
The performance improvement is around 20–30x. - Added support for iOS in the NuGet package of Microsoft SEAL.
- The build system is unified for all platforms.
There is no longer a Visual Studio solution file (seal.sln) for Windows.
There is a separate solution file for the dotnet library (dotnet/SEALNet.sln). - Added support for Shake256 (FIPS-202) XOF for pseudo-random number generation in addition to the default Blake2xb (faster).
- Microsoft SEAL 3.6 is backwards compatible with 3.4 and 3.5 when deserializing, but it does not support serializing in the old formats.
Major API Changes
- All C++
enumlabels are consistently in lowercase. Most importantly,scheme_type::BFVandscheme_type::CKKSare changed toscheme_type::bfvandscheme_type::ckks. - Changed
seal::SEAL_BYTEtoseal::seal_byte; all uppercase names are used only for preprocessor macros. - Removed
BatchEncoderAPI for encoding and decodingPlaintextobjects inplace.
This is because aPlaintextobject with slot-data written into the coefficients is (confusingly) not valid to be used for encryption. - Removed
IntegerEncoderandBigUIntclasses.
IntegerEncoderresults in inefficient homomorphic evaluation and lacks sane correctness properties, so it was basically impossible to use in real applications.
TheBigUIntclass was only used by theIntegerEncoder. - All
Encryptor::encryptvariants have now two overloads: one that takes aCiphertextout-parameter, and one that returns aSerializable<Ciphertext>. - Changed the names of the public key generation functions to clearly express that a new key is created each time, e.g.,
KeyGenerator::create_public_key. - Removed the
KeyGenerator::relin_keys_localandKeyGenerator::galois_keys_localfunctions.
These were poorly named and have been replaced with overloads ofKeyGenerator::create_relin_keysandKeyGenerator::create_galois_keysthat take an out-parameter of typeRelinKeysorGaloisKeys. - Renamed
IntArraytoDynArray(dynamic array) and removed unnecessary limitations on the object type template parameter. - Added public API for modular reduction to the
Modulusclass. - Added API for creating
DynArrayandPlaintextobjects from agsl::span<std::uint64_t>(C++) orIEnumerable<ulong>(C#).
Minor API Changes
- Added
std::hashimplementation forEncryptionParameters(in addition toparms_id_type) so it is possible to create e.g.std::unordered_mapofEncryptionParameters. - Added API to
UniformRandomGeneratorFactoryto find whether the factory uses a default seed and to retrieve that seed. - Added const overloads for
DynArray::beginandDynArray::end. - Added a
Shake256PRNGandShake256PRNGFactoryclasses.
RenamedBlakePRNGclass toBlake2xbPRNG, andBlakePRNGFactoryclass toBlake2xbPRNGFactory. - Added a serializable
UniformRandomGeneratorInfoclass that represents the type of an extendable output function and a seed value. - Added native/src/seal/version.h defining a struct
SEALVersion.
This is used internally to route deserialization logic to correct functions depending on loadedSEALHeaderversion.
New Build Options
SEAL_BUILD_DEPScontrols whether dependencies are downloaded and built into Microsoft SEAL or searched from the system.- Only a shared library will be built when
BUILD_SHARED_LIBSis set toON. Previously a static library was always built. - Encryption error is sampled from a Centered Binomial Distribution (CBD) by default unless
SEAL_USE_GAUSSIAN_NOISEis set toON.
Sampling from a CBD is constant-time and faster than sampling from a Gaussian distribution, which is why it is used by many of the NIST PQC finalists. SEAL_DEFAULT_PRNGcontrols which XOF is used for pseudo-random number generation.
The available values areBlake2xb(default) andShake256.
Other
- The pkg-config system has been improved.
All files related to pkg-config have been moved to pkgconfig/.
CMake creates now also a pkg-config fileseal_shared.pcfor compiling against a shared Microsoft SEAL ifBUILD_SHARED_LIBSis set toON. - Added
.pre-commit-config.yaml(check out pre-commit if you are not familiar with this tool). - Added
seal::util::DWTHandlerandseal::util::Arithmeticclass templates that unify the implementation of FFT (used byCKKSEncoder) and NTT (used by polynomial arithmetic). - The performance of encoding and decoding in CKKS are improved.
- The performance of randomness generation for ciphertexts and keys (RLWE samples) is improved.
File Changes
Renamed files and directories
native/src/seal/intarray.hto native/src/seal/dynarray.hdotnet/src/SEALNet.csprojto dotnet/src/SEALNet.csproj.indotnet/tests/SEALNetTest.csprojto dotnet/tests/SEALNetTest.csproj.indotnet/examples/SEALNetExamples.csprojto dotnet/examples/SEALNetExamples.csproj.in
New files
- native/src/seal/util/dwthandler.h
- native/src/seal/util/fips202.h
- native/src/seal/util/fips202.c
- native/src/seal/version.h
- dotnet/SEALNet.sln
- .pre-commit-config.yaml
Removed files
dotnet/src/BigUInt.csdotnet/src/IntegerEncoder.csdotnet/tests/BigUIntTests.csdotnet/tests/IntegerEncoderTests.csnative/examples/SEALExamples.vcxprojnative/examples/SEALExamples.vcxproj.filtersnative/src/CMakeConfig.cmdnative/src/SEAL_C.vcxprojnative/src/SEAL_C.vcxproj.filtersnative/src/SEAL.vcxprojnative/src/SEAL.vcxproj.filtersnative/src/seal/biguint.hnative/src/seal/biguint.cppnative/src/seal/intencoder.hnative/src/seal/intencoder.cppnative/tests/packages.confignative/tests/SEALTest.vcxprojnative/tests/SEALTest.vcxproj.filtersnative/tests/seal/biguint.cppnative/tests/seal/intencoder.cppthirdparty/SEAL.sln
Release 3.5.9
Bug fixes
- Fixed (Issue 216).
- Fixed (Issue 210).
Release 3.5.8
Other
- The bug fixed in (PR 209) also affects Android. Changed version to 3.5.8 where this is fixed.
Release 3.5.7
Hotfix - 8/28/2020
Bug fixes
- Fixed an omission in input validation in decryption: the size of the ciphertext was not checked to be non-zero.
Other
- In Windows switch to using
RtlGenRandomif the BCrypt API fails. - Improved performance in serialization: data clearing memory pools were always used before, but now are only used for the secret key.
- Use native APIs for memory clearing, when available, instead of for-loop.
Release 3.5.6
Bug fixes
- Fixed a bug where setting a PRNG factory to use a constant seed did not result in deterministic ciphertexts or public keys.
The problem was that the specified PRNG factory was not used to sample the uniform part of the RLWE sample(s), but instead a fresh (secure) PRNG was always created and used. - Fixed a bug where the
parms_idof aPlaintextwas not cleared correctly before resizing inDecryptor::bfv_decrypt.
As a result, a plaintext in NTT form could not be used as the destination for decrypting a BFV ciphertext.
Other
- Merged pull request (Issue 190) to replace global statics with function-local statics to avoid creating these objects unless they are actually used.
Release 3.5.5
Hotfix -- 7/6/2020
- Fixed (Issue 188).
New features
- Added a struct
seal::util::MultiplyUIntModOperandin native/src/seal/util/uintarithsmallmod.h.
This struct handles precomputation data for Barrett style modular multiplication. - Added new overloads for modular arithmetic in native/src/seal/util/uintarithsmallmod.h where one operand is replaced by a
MultiplyUIntModOperandinstance for improved performance when the same operand is used repeatedly. - Changed the name of
seal::util::barrett_reduce_63toseal::util::barrett_reduce_64; the name was misleading and only referred to the size of the modulus. - Added
seal::util::StrideIterin native/src/seal/util/iterator.h. - Added macros
SEAL_ALLOCATE_GET_PTR_ITERandSEAL_ALLOCATE_GET_STRIDE_ITERin native/src/seal/util/defines.h.
Other
- Significant performance improvements from merging pull request (PR 185) and implementing other improvements of the same style (see above).
- Removed a lot of old and unused code.
Release 3.5.4
Bug fixes
std::void_twas introduced only in C++17; switched to using a custom implementation (Issue 180).- Fixed two independent bugs in
native/src/CMakeConfig.cmd: The first prevented SEAL to be built in a directory with spaces in the path due to missing quotation marks. Another issue caused MSVC to fail when building SEAL for multiple architectures. RNSBase::decompose_arrayhad incorrect semantics that causedEvaluator::multiply_plain_normalandEvaluator::transform_to_ntt_inplace(forPlaintext) to behave incorrectly for some plaintexts.
Other
- Added pkg-config support (PR 181).
seal::util::PtrIter<T *>now dereferences correctly toT &instead ofT *.
This results in simpler code, where insideSEAL_ITERATElambda functions dereferences ofseal::util::PtrIter<T *>do not need to be dereferenced a second time, as was particularly common when iterating overModulusIterandNTTTablesItertypes.seal::util::IterTuplenow dereferences to anstd::tupleof dereferences of its component iterators, so it is no longer possible to directly pass a dereferencedseal::util::IterTupleto an inner lambda function in nestedSEAL_ITERATEcalls.
Instead, the outer lambda function parameter should be wrapped inside another call toseal::util::iterbefore passed on to the innerSEAL_ITERATEto produce an appropriateseal::util::IterTuple.
Release 3.5.3
Bug fixes
- Fixed a bug in
seal::util::IterTuple<...>where a part of thevalue_typewas constructed incorrectly. - Fixed a bug in
Evaluator::mod_switch_drop_to_nextthat caused non-inplace modulus switching to fail (Issue 179). Thanks s0l0ist!
Release 3.5.2
Bug fixes
- Merged pull request PR 178 to fix a lambda capture issue when building on GCC 7.5.
- Fixed issue where SEAL.vcxproj could not be compiled with MSBuild outside the solution (Issue 171).
- SEAL 3.5.1 required CMake 3.13 instead of 3.12; this has now been fixed and 3.12 works again (Issue 167).
- Fixed issue in NuSpec file that made local NuGet package generation fail.
- Fixed issue in NuSpec where XML documentation was not included into the package.
New features
- Huge improvements to SEAL iterators, including
seal::util::iterandseal::util::reverse_iterfunctions that can create any type of iterator from appropriate parameters. - Added
seal::util::SeqIter<T>iterator for iterating a sequence of numbers for convenient iteration indexing. - Switched functions in
seal/util/polyarithsmallmod.*to use iterators; this is to reduce the layers of iteration in higher level code. - Added macro
SEAL_ITERATEthat should be used instead offor_each_n.
Other
- Added note in README.md about known performance issues when compiling with GNU G++ compared to Clang++ (Issue 173).
- Merged pull requests that improve the performance of keyswitching (PR #177) and rescale (PR #176) in CKKS.