Repolode
microsoft

microsoft/SEAL

Microsoft SEAL is an open-source C++ homomorphic encryption library that lets software add and multiply encrypted numbers without decrypting them.

Stars
4,054
Forks
779
Open issues
110
Last commit
2 days ago

What is it?

Microsoft SEAL is a homomorphic encryption library developed by Microsoft's Cryptography Research Group. It lets a program compute on encrypted data, so a cloud service can run calculations on values it cannot read, and only the data owner holding the secret key can decrypt the results. Operations supported include addition and multiplication on encrypted integers or real numbers.

The library implements the BFV and BGV schemes for exact modular arithmetic on integers, and the CKKS scheme for approximate arithmetic on real or complex numbers, which suits tasks such as encrypted summation or evaluating machine learning models. It is written in standard C++17 and includes a .NET wrapper distributed as a NuGet package. Builds are provided through CMake, vcpkg and Homebrew, with optional support for Intel HEXL, Zstandard and ZLIB.

Homomorphic encryption is computationally expensive and only supports a limited set of operations, so SEAL is aimed at privacy-critical parts of a program rather than general computation. The project documentation recommends studying its examples carefully before writing production code.

Key features

  • 01Encrypted addition and multiplication on integers (BFV, BGV) and real or complex numbers (CKKS).
  • 02Standard C++17 codebase built with CMake, with support for Windows, Linux, macOS, Android, iOS and WebAssembly.
  • 03Official .NET wrapper available as a NuGet package.
  • 04Optional acceleration via Intel HEXL on AVX-512 processors.
  • 05Compressed and bit-packed serialization of ciphertexts and keys.

Use cases

  • Computing sums or statistics over encrypted sensitive data in a cloud service.
  • Evaluating machine learning models on encrypted inputs where privacy must be preserved.
  • Researching or prototyping privacy-preserving computation protocols.
  • Adding encrypted-computation features to .NET or C++ applications.

Quick start

  1. 1

    Install with vcpkg (works on most platforms)

  2. 2

    On macOS, install with Homebrew

  3. 3

    On FreeBSD, install with the pkg tool

    pkg install seal
  4. 4

    For .NET, install the Microsoft.Research.SEALNet NuGet package

Things to know

  • Only additions and multiplications are supported on encrypted data; comparisons and branching are not feasible.
  • The CKKS scheme gives only approximate results, so it is unsuitable where exact values are required.
  • Microsoft SEAL has a steep learning curve and requires understanding homomorphic encryption concepts.
  • Homomorphic encryption carries large performance overhead and much larger ciphertexts, and most schemes offer weaker security guarantees than traditional encryption.

Topics

FAQ

What is SEAL?
Microsoft SEAL is an open-source C++ homomorphic encryption library that lets software add and multiply encrypted numbers without decrypting them. Microsoft SEAL is a homomorphic encryption library developed by Microsoft's Cryptography Research Group. It lets a program compute on encrypted data, so a cloud service can run calculations on values it cannot read, and only the data owner holding the secret key can decrypt the results. Operations supported include addition and multiplication on encrypted integers or real numbers.
Is SEAL free to use? What license does it have?
SEAL is open source under the MIT license. Check the license terms before using it in commercial products.
Is SEAL still maintained?
Actively maintained. The last commit to SEAL was on Oct 19, 2026.
What can I use SEAL for?
Computing sums or statistics over encrypted sensitive data in a cloud service. Evaluating machine learning models on encrypted inputs where privacy must be preserved. Researching or prototyping privacy-preserving computation protocols. Adding encrypted-computation features to .NET or C++ applications.
How do I install SEAL?
Install with vcpkg (works on most platforms) On macOS, install with Homebrew On FreeBSD, install with the pkg tool: pkg install seal For .NET, install the Microsoft.Research.SEALNet NuGet package
Where can I get SEAL?
The source code and installation instructions are on GitHub: https://github.com/microsoft/SEAL

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects