Skip to content

mmroz/SwiftSeal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift Seal

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.

Table of Contents

Requirements

The framework has no minimum version.

Getting Started

Installation

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.

Examples

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

Components

ASLSchemeType

Supports BFV and CKKS encoding types through ASLSchemeTypeBFV and ASLSchemeTypeCKKS, respectively.

ASLEncryptionParameters

The parameters used for the encryption most importantly polynomialModulus, coefficientModulus and plainModulus.

ASLSealContext

A heavyweight class constructed from the ASLEncryptionParameters.

ASLKeyGenerator

Generates matching secret key and public key also used to construct Galois Keys and Relinearization Keys.

ASLPlainText

Class to store a plaintext element.

ASLCipherText

Class to store a ciphertext element.

ASLBatchEncoder

Provides functionality for CRT batching

ASLCKKSEncoder

Provides functionality for encoding vectors of complex or real numbers into plaintext polynomials to be encrypted and computed on using the CKKS scheme.

ASLIntegerEncoder

Encodes integers into plaintext polynomials that Encryptor can encrypt

ASLEncryptor

Encrypts Plaintext objects into Ciphertext objects.

ASLEvaluator

Provides operations on ciphertexts.

ASLDecryptor

Decrypts Ciphertext objects into Plaintext objects

Learn More

Learn more about Homomorphic Encrytion and Seal

Getting Help

Feel free to open up issues about questions, problems, or ideas. Always looking for more contributions!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published