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=ON
andSEAL_BUILD_DEPS=ON
resulted 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++
enum
labels are consistently in lowercase. Most importantly,scheme_type::BFV
andscheme_type::CKKS
are changed toscheme_type::bfv
andscheme_type::ckks
. - Changed
seal::SEAL_BYTE
toseal::seal_byte
; all uppercase names are used only for preprocessor macros. - Removed
BatchEncoder
API for encoding and decodingPlaintext
objects inplace.
This is because aPlaintext
object with slot-data written into the coefficients is (confusingly) not valid to be used for encryption. - Removed
IntegerEncoder
andBigUInt
classes.
IntegerEncoder
results in inefficient homomorphic evaluation and lacks sane correctness properties, so it was basically impossible to use in real applications.
TheBigUInt
class was only used by theIntegerEncoder
. - All
Encryptor::encrypt
variants have now two overloads: one that takes aCiphertext
out-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_local
andKeyGenerator::galois_keys_local
functions.
These were poorly named and have been replaced with overloads ofKeyGenerator::create_relin_keys
andKeyGenerator::create_galois_keys
that take an out-parameter of typeRelinKeys
orGaloisKeys
. - Renamed
IntArray
toDynArray
(dynamic array) and removed unnecessary limitations on the object type template parameter. - Added public API for modular reduction to the
Modulus
class. - Added API for creating
DynArray
andPlaintext
objects from agsl::span<std::uint64_t>
(C++) orIEnumerable<ulong>
(C#).
Minor API Changes
- Added
std::hash
implementation forEncryptionParameters
(in addition toparms_id_type
) so it is possible to create e.g.std::unordered_map
ofEncryptionParameters
. - Added API to
UniformRandomGeneratorFactory
to find whether the factory uses a default seed and to retrieve that seed. - Added const overloads for
DynArray::begin
andDynArray::end
. - Added a
Shake256PRNG
andShake256PRNGFactory
classes.
RenamedBlakePRNG
class toBlake2xbPRNG
, andBlakePRNGFactory
class toBlake2xbPRNGFactory
. - Added a serializable
UniformRandomGeneratorInfo
class 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 loadedSEALHeader
version.
New Build Options
SEAL_BUILD_DEPS
controls whether dependencies are downloaded and built into Microsoft SEAL or searched from the system.- Only a shared library will be built when
BUILD_SHARED_LIBS
is 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_NOISE
is 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_PRNG
controls 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.pc
for compiling against a shared Microsoft SEAL ifBUILD_SHARED_LIBS
is set toON
. - Added
.pre-commit-config.yaml
(check out pre-commit if you are not familiar with this tool). - Added
seal::util::DWTHandler
andseal::util::Arithmetic
class 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.h
to native/src/seal/dynarray.hdotnet/src/SEALNet.csproj
to dotnet/src/SEALNet.csproj.indotnet/tests/SEALNetTest.csproj
to dotnet/tests/SEALNetTest.csproj.indotnet/examples/SEALNetExamples.csproj
to 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.cs
dotnet/src/IntegerEncoder.cs
dotnet/tests/BigUIntTests.cs
dotnet/tests/IntegerEncoderTests.cs
native/examples/SEALExamples.vcxproj
native/examples/SEALExamples.vcxproj.filters
native/src/CMakeConfig.cmd
native/src/SEAL_C.vcxproj
native/src/SEAL_C.vcxproj.filters
native/src/SEAL.vcxproj
native/src/SEAL.vcxproj.filters
native/src/seal/biguint.h
native/src/seal/biguint.cpp
native/src/seal/intencoder.h
native/src/seal/intencoder.cpp
native/tests/packages.config
native/tests/SEALTest.vcxproj
native/tests/SEALTest.vcxproj.filters
native/tests/seal/biguint.cpp
native/tests/seal/intencoder.cpp
thirdparty/
SEAL.sln