An Objective-C++ wrapper around Microsoft Seal with ergonomic Swift bindings. The framework prodvides out of the box Swift functionality to perform homomorphic encryptions and perform arithmetic operations on encoded data. It is written as a swift package and currently supported on iOS.
The framework has no minimum version.
Checkout the Microsoft Seal libaray on the contrib
branch
git clone -b contrib https://github.com/microsoft/SEAL.git
cd SEAL
make .
cmake . -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug
This will build SEAL without ZLIB and in Debug mode and generate PKGConfig file.
Then install AppleSeal via SPM. Create a new Xcode project and navigate to File > Swift Packages > Add Package Dependency
. Enter the url https://github.com/mmroz/AppleSeal.git
and tap Next
and choose the master branch.
AppleSeal has a number of examples that are used to show basic usage of Swift Seal. The Examples in AppleSeal. These are meant to replicate the Examples in SEAL
Supports BFV and CKKS encoding types through ASLSchemeTypeBFV and ASLSchemeTypeCKKS, respectively.
The parameters used for the encryption most importantly polynomialModulus, coefficientModulus and plainModulus.
A heavyweight class constructed from the ASLEncryptionParameters.
Generates matching secret key and public key also used to construct Galois Keys and Relinearization Keys.
Class to store a plaintext element.
Class to store a ciphertext element.
Provides functionality for CRT batching
Provides functionality for encoding vectors of complex or real numbers into plaintext polynomials to be encrypted and computed on using the CKKS scheme.
Encodes integers into plaintext polynomials that Encryptor can encrypt
Encrypts Plaintext objects into Ciphertext objects.
Provides operations on ciphertexts.
Decrypts Ciphertext objects into Plaintext objects
Learn more about Homomorphic Encrytion and Seal
Feel free to open up issues about questions, problems, or ideas. Always looking for more contributions!