Transition from SEAL v3.5 to v3.6
sloede opened this issue · comments
Michael Schlottke-Lakemper commented
According to the SEAL v3.6.0 release notes, there were a number of changes that either introduced new features or (potentially) break the existing API. Therefore, at least all explicitly mentioned major changes should be verified manually in SEAL.jl to make sure that the Julia wrapper is up to date again.
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
andBigUIn
t 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 a Ciphertext out-parameter, and one that returns a Serializable.
- 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 to DynArray (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 and Plaintext objects from a gsl::spanstd::uint64_t (C++) or IEnumerable (C#).
Minor API Changes
- Added std::hash implementation for EncryptionParameters (in addition to parms_id_type) so it is possible to create e.g. std::unordered_map of EncryptionParameters.
- Added API to UniformRandomGeneratorFactory to find whether the factory uses a default seed and to retrieve that seed.
- Added const overloads for DynArray::begin and DynArray::end.
- Added a Shake256PRNG and Shake256PRNGFactory classes.
Renamed BlakePRNG class to Blake2xbPRNG, and BlakePRNGFactory class to Blake2xbPRNGFactory. - 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 loaded SEALHeader version.
Other
- Added seal::util::DWTHandler and seal::util::Arithmetic class templates that unify the implementation of FFT (used by CKKSEncoder) and NTT (used by polynomial arithmetic).
Michael Schlottke-Lakemper commented
I will close this with the current status. If a user is interested in one of the new features, just create an issue and we will add it here.