Releases: microsoft/SEAL
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.
Release 3.5.1
Version 3.5.1
Changed version to 3.5.1.
Release 3.5.0
Hotfix - 4/30/2020
- Fixed a critical bug (Issue 166) in
Evaluator::multiply_plain_inplace. Thanks s0l0ist!
Hotfix - 4/29/2020
- Switched to using Microsoft GSL v3.0.1 and fixed minor GSL related issues in
CMakeLists.txt. - Fixed some typos in README.md.
- Fixes bugs in ADO pipelines files.
New Features
- Microsoft SEAL officially supports Android (Xamarin.Android) on ARM64.
- Microsoft SEAL is a CMake project (UNIX-like systems only):
- There is now a top-level
CMakeLists.txtthat builds all native components. - The following CMake targets are created:
SEAL::seal(static library),SEAL::seal_shared(shared library; optional),SEAL::sealc(C export library; optional). - Examples and unit tests are built if enabled through CMake (see README.md).
- ZLIB is downloaded and compiled by CMake and automatically included in the library.
- Microsoft GSL is downloaded by CMake. Its header files are copied to
native/src/gsland installed with Microsoft SEAL. - Google Test is downloaded and compiled by CMake.
- There is now a top-level
- Improved serialization:
Serialization::SEALHeaderlayout has been changed. SEAL 3.4 objects can still be loaded by SEAL 3.5, and the headers are automatically converted to SEAL 3.5 format.Serialization::SEALHeadercaptures version number information.- Added examples for serialization.
- The seeded versions of
Encryptor's symmetric-key encryption andKeyGenerator'sRelinKeysandGaloisKeysgeneration now outputSerializableobjects. See more details in API Changes below.
For Library Developers and Contributors
We have created a set of C++ iterators that easily allows looping over polynomials in a ciphertext, over RNS components in a polynomial, and over coefficients in an RNS component. There are also a few other iterators that can come in handy. Currently Evaluator fully utilizes these, and in the future the rest of the library will as well.
The iterators are primarily intended to be used with std::for_each_n to simplify existing code and help with code correctness. Please see native/src/seal/util/iterator.h for guidance on how to use these.
We have also completely rewritten the RNS tools that were previously in the util::BaseConverter class. This functionality is now split between two classes: util::BaseConverter whose sole purpose is to perform the FastBConv computation of [BEHZ16] and util::RNSTool that handles almost everything else. RNS bases are now represented by the new util::RNSBase class.
API Changes
The following changes are explained in C++ syntax and are introduced to .NET wrappers similarly:
- New generic class
SerializablewrapsCiphertext,RelinKeys, andGaloisKeysobjects to provide a more flexible approach to the functionality provided in release 3.4 byKeyGenerator::[relin|galois]_keys_saveandEncryptor::encrypt_[zero_]symmetric_savefunctions. Specifically, these functions have been removed and replaced with overloads ofKeyGenerator::[relin|galois]_keysandEncryptor::encrypt_[zero_]symmetricthat returnSerializableobjects. TheKeyGenerator::[relin|galois]_keysmethods in release 3.4 are renamed toKeyGenerator::[relin|galois]_keys_local. TheSerializableobjects cannot be used directly by the API, and are only intended to be serialized, which activates the compression functionalities introduced earlier in release 3.4. SmallModulusclass is renamed toModulus, and is relocated to native/src/seal/modulus.h.*coeff_mod_count*methods are renamed to*coeff_modulus_size*, which applies to many classes.parameter_error_nameandparameter_error_messagemethods are added toEncryptionParameterQualifiersandSEALContextclasses to explain why anEncryptionParametersobject is invalid.- The data members and layout of
Serialization::SEALHeaderhave changed.
The following changes are specific to C++:
- New bounds in native/src/seal/util/defines.h:
SEAL_POLY_MOD_DEGREE_MAXis increased to 131072; values bigger than 32768 require the security check to be disabled by passingsec_level_type::nonetoSEALContext::Create.SEAL_COEFF_MOD_COUNT_MAXis increased to 64.SEAL_MOD_BIT_COUNT_MAXandSEAL_MOD_BIT_COUNT_MINare added and set to 61 and 2, respectively.SEAL_INTERNAL_MOD_BIT_COUNTis added and set to 61.
EncryptionParameterQualifiersnow has an error codeparameter_errorthat interprets the reason why anEncryptionParametersobject is invalid.bool parameters_set()is added to replace the previousbool parameters_setmember.
The following changes are specific to .NET:
- Version numbers are retrievable in .NET through
SEALVersionclass.
Other Changes
- Releases are now listed on releases page.
- The native library can serialize (save and load) objects larger than 4 GB. Please be aware that compressed serialization requires an additional temporary buffer roughly the size of the object to be allocated, and the streambuffer for the output stream may consume some non-trivial amount of memory as well. In the .NET library, objects are limited to 2 GB, and loading an object larger than 2 GB will throw an exception.(Issue 142)
- Larger-than-suggested parameters are supported for expert users. To enable that, please adjust
SEAL_POLY_MOD_DEGREE_MAXandSEAL_COEFF_MOD_COUNT_MAXin native/src/seal/util/defines.h.(Issue 150, Issue 84) - Serialization now clearly indicates an insufficient buffer size error.(Issue 117)
- Unsupported compression mode now throws
std::invalid_argument(native) orArgumentException(.NET). - There is now a
.clang-formatfor automated formatting of C++ (.cppand.h) files. Executetools/scripts/clang-format-all.shfor easy formatting (UNIX-like systems only). This is compatible with clang-format-9 and above. Formatting for C# is not yet supported.(Issue 93) - The C export library previously in
dotnet/native/is moved to native/src/seal/c/ and renamed to SEAL_C to support building of wrapper libraries in languages like .NET, Java, Python, etc. - The .NET wrapper library targets .NET Standard 2.0, but the .NET example and test projects use C# 8.0 and require .NET Core 3.x. Therefore, Visual Studio 2017 is no longer supported for building the .NET example and test projects.
- Fixed issue when compiling in FreeBSD.(PR 113)
- A bug in the [BEHZ16]-style RNS operations is fixed; proper unit tests are added.
- Performance of methods in
Evaluatorare in general improved.(PR 148) This is compiler-dependent, however, and currently Clang seems to produce the fastest running code for Microsoft SEAL.
File Changes
Renamed files and directories:
- dotnet/examples/7_Performance.cs was previously
dotnet/examples/6_Performance.cs - native/examples/7_performance.cpp was previously
native/examples/6_performance.cpp - native/src/seal/c/ was previously
dotnet/native/sealnet. - native/src/seal/util/ntt.h was previously
native/src/seal/util/smallntt.h. - native/src/seal/util/ntt.cpp was previously
native/src/seal/util/smallntt.cpp. - native/tests/seal/util/ntt.cpp was previously
native/tests/seal/util/smallntt.cpp.
New files:
- android/
- dotnet/examples/6_Serialization.cs
- dotnet/src/Serializable.cs
- dotnet/src/Version.cs
- dotnet/tests/SerializationTests.cs
- native/examples/6_serialization.cpp
- native/src/seal/c/version.h
- native/src/seal/c/version.cpp
- native/src/seal/util/galois.h
- native/src/seal/util/galois.cpp
- native/src/seal/util/hash.cpp
- native/src/seal/util/iterator.h
- native/src/seal/util/rns.h
- native/src/seal/util/rns.cpp
- native/src/seal/util/streambuf.h
- native/src/seal/util/streambuf.cpp
- native/src/seal/serializable.h
- native/tests/seal/util/iterator.cpp
- native/tests/seal/util/galois.cpp
- native/tests/seal/util/rns.cpp
Removed files:
dotnet/src/SmallModulus.csis merged to dotnet/src/ModulusTests.cs.dotnet/tests/SmallModulusTests.csis merged to dotnet/tests/ModulusTests.cs.native/src/seal/util/baseconverter.hnative/src/seal/util/baseconverter.cppnative/src/seal/smallmodulus.his merged to native/src/seal/modulus.h.native/src/seal/smallmodulus.cppis merged to [native...
Release 3.4.5
Changes
- Fixed a concurrency issue in SEALNet: the
unordered_mapstoringSEALContextpointers was
not locked appropriately on construction and destruction of newSEALContextobjects. - Fixed a few typos in examples (PR 71).
- Added include guard to config.h.in.
Release 3.4.4
Changes
- Fixed issues with
SEALNet.targetsfile andSEALNet.nuspec.in. - Updated
README.mdwith information about existing multi-platform
NuGet package.
Release 3.4.3
Changes
- Fixed bug in .NET serialization code where an incorrect number of bytes was written when using
ZLIB compression. - Fixed an issue with .NET functions
Encryptor.EncryptSymmetric..., where asymmetric encryption
was done instead of symmetric encryption. - Prevented
KeyGenerator::galois_keysandKeyGenerator::relin_keysfrom being called when the
encryption parameters do not support keyswitching. - Fixed a bug in
Decryptor::invariant_noise_budgetwhere the computed noise budget was
log(plain_modulus)bits smaller than it was supposed to be. - Removed support for Microsoft GSL
gsl::multi_span, as it was recently deprecated in GSL.
Release 3.4.2
Changes
- Fixed bug reported in Issue 66 on GitHub.
- CMake does version matching now (correctly) only on major and minor version, not patch version,
so writingfind_package(SEAL 3.4)works correctly and selects the newest version3.4.xit can
find.
Release 3.4.1
Changes
This patch fixes a few issues with ZLIB support on Windows. Specifically,
- Fixed a mistake in
native/src/CMakeConfig.cmdwhere the CMake library search path
suffix was incorrect. - Switched to using a static version of ZLIB on Windows.
- Corrected instructions in README.md for enabling ZLIB support on Windows.