SEAL Versions Save

Microsoft SEAL is an easy-to-use and powerful homomorphic encryption library.

v3.5.3

3 years ago

Bug fixes

  • Fixed a bug in seal::util::IterTuple<...> where a part of the value_type was constructed incorrectly.
  • Fixed a bug in Evaluator::mod_switch_drop_to_next that caused non-inplace modulus switching to fail (Issue 179). Thanks s0l0ist!

v3.5.2

3 years ago

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::iter and seal::util::reverse_iter functions 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_ITERATE that should be used instead of for_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.

v3.5.1

4 years ago

Version 3.5.1

Changed version to 3.5.1.

v3.5.0

4 years ago

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.txt that 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/gsl and installed with Microsoft SEAL.
    • Google Test is downloaded and compiled by CMake.
  • Improved serialization:
    • Serialization::SEALHeader layout 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::SEALHeader captures version number information.
    • Added examples for serialization.
    • The seeded versions of Encryptor's symmetric-key encryption and KeyGenerator's RelinKeys and GaloisKeys generation now output Serializable objects. 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 Serializable wraps Ciphertext, RelinKeys, and GaloisKeys objects to provide a more flexible approach to the functionality provided in release 3.4 by KeyGenerator::[relin|galois]_keys_save and Encryptor::encrypt_[zero_]symmetric_save functions. Specifically, these functions have been removed and replaced with overloads of KeyGenerator::[relin|galois]_keys and Encryptor::encrypt_[zero_]symmetric that return Serializable objects. The KeyGenerator::[relin|galois]_keys methods in release 3.4 are renamed to KeyGenerator::[relin|galois]_keys_local. The Serializable objects 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.
  • SmallModulus class is renamed to Modulus, 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_name and parameter_error_message methods are added to EncryptionParameterQualifiers and SEALContext classes to explain why an EncryptionParameters object is invalid.
  • The data members and layout of Serialization::SEALHeader have changed.

The following changes are specific to C++:

  • New bounds in native/src/seal/util/defines.h:
    • SEAL_POLY_MOD_DEGREE_MAX is increased to 131072; values bigger than 32768 require the security check to be disabled by passing sec_level_type::none to SEALContext::Create.
    • SEAL_COEFF_MOD_COUNT_MAX is increased to 64.
    • SEAL_MOD_BIT_COUNT_MAX and SEAL_MOD_BIT_COUNT_MIN are added and set to 61 and 2, respectively.
    • SEAL_INTERNAL_MOD_BIT_COUNT is added and set to 61.
  • EncryptionParameterQualifiers now has an error code parameter_error that interprets the reason why an EncryptionParameters object is invalid.
  • bool parameters_set() is added to replace the previous bool parameters_set member.

The following changes are specific to .NET:

  • Version numbers are retrievable in .NET through SEALVersion class.

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_MAX and SEAL_COEFF_MOD_COUNT_MAX in 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) or ArgumentException (.NET).
  • There is now a .clang-format for automated formatting of C++ (.cpp and .h) files. Execute tools/scripts/clang-format-all.sh for 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 Evaluator are 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:

New files:

Removed files:

v3.1.0

4 years ago

v3.2.0

4 years ago

v3.2.1

4 years ago

v3.2.2

4 years ago

v3.3.0

4 years ago

Changes

New Features

In this version, we have significantly improved the usability of the CKKS scheme in Microsoft SEAL and many of these improvements apply to the BFV scheme as well. Homomorphic operations that are based on key switching, i.e., relinearization and rotation, do not consume any noise budget (BFV) or impact accuracy (CKKS). The implementations of these operations are significantly simplified and unified, and no longer use bit decomposition, so decomposition bit count is gone. Moreover, fresh ciphertexts now have lower noise. These changes have an effect on the API and it will be especially worthwhile for users of older versions of the library to study the examples and comments in native/examples/3_levels.cpp (C++) or dotnet/examples/3_Levels.cs (C#).

The setup of EncryptionParameters has been made both easier and safer (see API Changes below).

The examples in native/examples/ and dotnet/examples/ have been redesigned to better teach the multiple technical concepts required to use Microsoft SEAL correctly and efficiently, and more compactly demonstrate the API.

API Changes

Deleted header files:

  • native/defaultparameters.h

New header files:

In class SEALContext:

  • Replaced context_data(parms_id_type) with get_context_data(parms_id_type);
  • Removed context_data();
  • Added key_context_data(), key_parms_id(), first_context_data(), and last_context_data();
  • Added using_keyswitching() that indicates whether key switching is supported in this SEALContext;
  • Create(...) in C++, and constructor in C#, now accepts an optional security level based on HomomorphicEncryption.org security standard, causing it to enforce the specified security level. By default a 128-bit security level is used.
  • Added prev_context_data() method to class ContextData (doubly linked modulus switching chain);
  • In C# SEALContext now has a public constructor.

Parameter selection:

  • Removed the DefaultParams class;
  • Default coeff_modulus for the BFV scheme are now accessed through the function CoeffModulus::BFVDefault(...). These moduli are not recommended for the CKKS scheme;
  • Customized coeff_modulus for the CKKS scheme can be created using CoeffModulus::Create(...) which takes the poly_modulus_degree and a vector of bit-lengths of the prime factors as arguments. It samples suitable primes close to 2^bit_length and returns a vector of SmallModulus elements.
  • PlainModulus::Batching(...) can be used to sample a prime for plain_modulus that supports BatchEncoder for the BFV scheme.

Other important changes:

  • Removed size_capacity function and data members from Ciphertext class;
  • Moved all validation methods such as is_valid_for and is_metadata_valid_for to valcheck.h;
  • Removed argument decomposition_bit_count from methods relin_keys(...) and galois_keys(...) in class KeyGenerator;
  • It is no longer possible to create more than one relinearization key. This is to simplify the API and reduce confusion. We have never seen a real use-case where more relinearization keys would be a good idea;
  • Added methods to generate an encryption of zero to Encryptor;
  • Added comparison methods and primality check for SmallModulus;
  • Classes RelinKeys and GaloisKeys are now derived from a common base class KSwitchKeys;
  • GoogleTest framework is now included as a Git submodule;
  • Numerous bugs have been fixed, particularly in the .NET wrappers.

v3.3.1

4 years ago

Changes

  • A bug was fixed that introduced significant extra inaccuracy in CKKS when compiled on Linux, at least with some versions of glibc; Windows and macOS were not affected.
  • A bug was fixed where, on 32-bit platforms, some versions of GCC resolved the util::reverse_bits function to the incorrect overload.