Simple Encrypted Arithmetic Library (SEAL)


The Simple Encrypted Arithmetic Library (SEAL) is an easy-to-use homomorphic encryption library, developed by researchers in the Cryptography Research Group at Microsoft Research. SEAL is written in standard C++; it has no external dependencies, so it is easy to compile in many different environments. SEAL uses the Microsoft Research License Agreement, and is free for research use.


10/19/2018: Hotfix to SEAL 3.0

Due to a minor mistake SEAL 3.0 did not compile with OS X toolchains. This problem has now been fixed.


10/17/2018: SEAL 3.0 released

SEAL 3.0 is finally ready! Among other things, this major release adds support for the `FullRNS’ variant of the Cheon-Kim-Kim-Song (CKKS) approximate arithmetic scheme.

Main changes:

  • Added support for the CKKS encryption scheme (;
  • SEAL can now be compiled purely as C++14 if necessary although C++17 is recommended;
  • Added support for modulus switching (for both BFV and CKKS schemes);
  • Added seeded AES-NI-based PRNG for faster pseudo-randomness.
  • Improved performance when compiling on g++ and clang++;
  • Big improvements to the memory pooling system: the MemoryManager class now automatically hands out MemoryPoolHandle objects according to a customizable profile (MMProf class);
  • Big improvements to SEALExamples, e.g. multiple new examples;
  • Renamed `hash_block’ to `parms_id’;
  • Renamed EvaluationKeys to RelinKeys;
  • Renamed PolyCRTBuilder to BatchEncoder;
  • Removed Simulation, and Chooser, and related classes;
  • Removed .NET Framework wrappers and related projects;
  • Many bug fixes and improvements to the internals.

Let us know if you have any comments! For technical questions that can be of general interest, please ask on StackOverflow using the tag [seal]. For other communication, contact us at

P.S.: A big thank you to everyone who submitted bug reports for SEAL 2.3.1 and earlier versions.


6/20/2018: SEAL 2.3.1 released

A shiny new version of SEAL is now available! Here are the main changes:

  • SEAL requires C++17; it has been tested on Visual Studio 2017, g++-6 and newer, and clang++-5.0 and newer.
  • Added support for clang++ and fixed bug that caused incorrect results with g++-8.
  • Added CMake support for Linux and OS X. See INSTALL.txt for instructions for installing SEAL on Linux and OS X, and SEALExamples/CMakeLists.txt for an example of linking it with your projects.
  • Added performance tests to SEALNETExamples.
  • Enabled all Galois automorphisms in Evaluator/KeyGenerator.
  • Fixed bug that caused incorrect results with large plaintext modulus.
  • Simplified many class constructors: MemoryPoolHandle is no longer an optional parameter.
  • Thread-unsafe memory pools are no longer available by default (too dangerous).
  • Added experimental support for Microsoft GSL (gsl::span and gsl::multi_span).
  • Of course a huge number of internal bug fixes and improvements have been made.

Feel free to email if you find any bugs, or if you have feature requests or other suggestions.


12/1/2017: SEAL v2.3.0-4 available

A new update v2.3.0-4 fixing several major bugs and issues has been released. Important changes include:

  • The problem with GCC-7.2 has been fixed. SEAL also works with GCC-5 now and uses only C++11 (no C++14).
  • Homomorphic multiplication of ciphertexts of size larger than 2 gave incorrect results. This problem has been fixed now.
  • SEALNET EvaluationKeys|GaloisKeys::Save|Load now work correctly.
  • Problems with global memory pool in SEALNET have been fixed. There is no longer need to manually destroy the global memory pool on application exit.
  • In SEALNET, EncryptionParameters::SetX(…) functions have been removed and changed into setters for the corresponding properties.
  • Downloadable Linux (.tar.gz) and Windows (.zip) versions are available separately.


11/17/2017: Small updates

As some of you may have noticed, we’ve been pushing a lot of small (and big) bug fixes and other updates since the initial release of v2.3.0. We just released SEAL v2.3.0-3 which—in addition to the bug fixes—brings substantial improvements to memory locality and subsequently has a major impact on performance with larger parameters.


11/9/2017: Direct download link

SEAL v2.3.0-2 can now be downloaded directly from


11/7/2017: SEAL v2.3.0 released

A new version of SEAL is available! This is the biggest update since the first release, and contains a huge number of improvements, including:

  • Implementation of the FullRNS variant of the FV scheme by Bajard et al. (SAC 2016)
  • Redesigned and improved memory management
  • Improved support for multi-threaded applications
  • Massive number of optimizations and improvements throughout the library
  • Row and column rotations of encrypted matrices (batching)
  • Completely revised SEALExamples/main.cpp; new example demonstrating multi-threaded use of SEAL
  • Better directory structure
  • Lots of bug fixes

A new SEAL manual will be available shortly.

We highly recommend all users (especially those familiar with older versions of SEAL) to go carefully over the examples in SEALExamples/main.cpp. There are several subtle but critical differences to SEAL v2.2, which are necessary to know to achieve the best performance.


7/21/2017: SEAL has found a new home

SEAL is now available at To get access, send us an email at, include an email address associated to your Microsoft Live Account, and tell us briefly what you are planning on using SEAL for. SEAL v2.3 will be available only through the new repository.


6/4/2017: SEAL v2.2 released

SEAL v2.2 has been released. It includes the changes from the experimental branch, and many other improvements. We have big plans for major improvements to be implemented this summer, so stay tuned!


10/13/2016: Experimental Branch

A new experimental branch has been created. This branch will get much more frequent updates than the master branch, but these updates may not have been tested as thoroughly as the code in the master branch, may introduce frequent API changes, and may contain incomplete functionality. This first experimental commit contains some significant performance improvements over SEAL v2.1.


9/30/2016: SEAL v2.1 released

Again a new version of SEAL has been released. This is a fairly large update, which focuses mostly on performance, but also introduces some small API changes.

To accompany the release and to explain the changes in SEAL v2.1, we have released a new version of the documentation, available here.


Source code for SEAL 3.0 can be downloaded from


There is no manual for SEAL 3.0 at this time; however, the examples in SEALExamples/main.cpp have been even further improved and should serve as a thorough introduction to the library. In addition, the header-files contain extensive comments for the public API.

The SEAL 2.3.1 manual contains a short introduction to homomorphic encryption, an explanation of changes from the previous release, and some details on how SEAL works under the hood.

Citing SEAL

When citing SEAL, please use the following BibTeX entries.

Version BibTex
	title = {{S}imple {E}ncrypted {A}rithmetic {L}ibrary (release 3.0.0)},
	howpublished = {\url{}},
	month = oct,
	year = 2018,
	note = {Microsoft Research, Redmond, WA.},
	key = {SEAL}


Microsoft Research License Agreement for Simple Encrypted Arithmetic Library

This Microsoft Research License Agreement, including all exhibits (“Agreement”) is a legal agreement between you and Microsoft Corporation (or based on where you live, one of its affiliates). Please read them. They apply to the Microsoft Research software named above, which may include source code and any associated materials, text or speech files, associated media and “online” or electronic documentation and any updates we provide in our discretion (together, the “Software”). The terms also apply to any Microsoft (i) updates, (ii) supplements, (iii) internet-based services, and (iv) support services for this Software, unless other terms accompany those items. If so, those terms apply.
By agreeing to this Agreement and/or by using the Software, you accept these terms. If you do not accept them, do not use the Software. If you comply with these license terms, you have the rights below.
a. License Grant. You may use, copy, modify, create derivative works, and distribute the Software for non-commercial purposes, subject to the restrictions in this Agreement. Examples of non-commercial uses are teaching, academic research, public demonstrations and personal experimentation.
b. Publication. You may publish (or present papers or articles) on your results from using the Software.
a. If you distribute the Software or any derivative works of the Software, you will distribute them under the same terms and conditions as in this license, and you will not grant other rights to the Software or derivative works that are different from those provided by this Agreement.
b. If you have created derivative works of the Software, and distribute such derivative works, you will cause the modified files to carry prominent notices so that recipients know that they are not receiving the original software. Such notices must state: (i) that you have changed the software; and (ii) the date of any changes.
3. LICENSE TO MICROSOFT. In the event you contribute code or other materials to the Simple Encrypted Arithmetic Library project, Microsoft is granted back, without any restrictions or limitations, a non-exclusive, perpetual, irrevocable, royalty-free, assignable and sub-licensable license, to reproduce, publicly perform or display, install, use, modify, post, distribute, make and have made, sell and transfer such contributions, and any other modifications to and/or derivative works of the Software source code or data, for any purpose.
4. SCOPE OF LICENSE. The Software is licensed, not sold. This Agreement only gives you some rights to use the Software. Microsoft reserves all other rights. The patent rights, if any, granted to you in this Agreement only apply to the Software, not to any derivative works you make. In using the Software, you must comply with any technical limitations in the Software that may only allow you to use it in certain ways. You may not:
a. Publish the Software for others to copy;
b. Rent, lease or lend the Software; or
c. Transfer the Software or this Agreement to any third party.
5. FEEDBACK. Any feedback about the Software provided by you to us is voluntarily given, and Microsoft shall be free to use the feedback as it sees fit without obligation or restriction of any kind, even if the feedback is designated by you as confidential.
6. TERM; TERMINATION. The term of this Agreement will commence upon your acceptance of these license terms and will continue unless terminated earlier as provided herein. If you breach this Agreement or if you sue Microsoft or any other party over patents that you think may apply to or read on the Software or anyone’s use of the Software, this Agreement (and your license and rights obtained herein) terminate automatically. If this Agreement is terminated, you must cease using and distributing any derivative works or modifications of the Software. Any sections that are intended to survive termination of this Agreement shall survive.
7. EXPORT RESTRICTIONS. The Software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the Software. These laws include restrictions on destinations, end users and end use. For additional information, see
8. ENTIRE AGREEMENT. This Agreement, any exhibits, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the Software and support services.
9. SEVERABILITY. If any court of competent jurisdiction determines that any provision of this Agreement is illegal, invalid or unenforceable, the remaining provisions will remain in full force and effect.
10. GOVERNING LAW AND VENUE. This Agreement is governed by and construed in accordance with the laws of the state of Washington, without reference to its choice of law principles to the contrary. Each party hereby consents to the jurisdiction and venue of the state and federal courts located in King County, Washington, with regard to any suit or claim arising under or by reason of this Agreement.
11. LEGAL EFFECT. This Agreement describes certain legal rights. You may have other rights under the laws of your country. This Agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.
12. NO ASSIGNMENT. You may not assign this Agreement or any rights or obligations hereunder, except with Microsoft’s express written consent. Any attempted assignment in violation of this section will be void.


We are always looking for talented Ph.D. student interns to work with us on the SEAL project, and related homomorphic encryption research. If you are interested in a fun and productive 12-week internship at Microsoft Research, send us an email at Internships can take place at any time of the year.

An ideal  intern candidate has a non-empty subset of the following:

  • Strong academic record; publications in top conferences/journals
  • Background in cryptography/homomorphic encryption
  • Excellent communication skills; ability to communicate difficult/technical topics to mixed audiences
  • Excellent teamwork skills; ability to work together with people of diverse backgrounds towards a common goal
  • Strong programming experience in C++; experience in writing fast code
  • Experience in a professional software engineering project, e.g. prior internship experience as a software developer
  • Experience in machine learning
  • Ability to learn new skills quickly when needed
  • Passion for solving real-life privacy problems with fresh new ideas


Current and past interns:

Ilia Iliashenko (KU Leuven) Ilaria Chillotti (Université de Versailles SQ)
Wei Dai (Worcester Polytechnic Institute) Sadegh Riazi (UC San Diego)
Zhicong Huang (EPFL) Amir Jalali (Florida Atlantic University)
Peter Rindal (Oregon State University) Kyoohyung Han (Seoul National University)
Gizem Cetin (Worcester Polytechnic Institute) Yuhou (Susan) Xia (Princeton University)
Nathan Dowlin (Princeton University) Rachel Player (Royal Holloway, University of London)


We believe strongly that (fully) homomorphic encryption is ripe for use in many real-world applications. Since the technology is still quite new, and the existing libraries are very diverse in their functionality and design, we believe that a clear and public standardization effort could help in

  • Making homomorphic encryption easier to use
  • Determining security levels for specific parameter sets
  • Explaining to the public the capabilities and possibilities of this technology
  • Making libraries more inter-operable

For more information, see

Contact Us

If you have any questions, suggestions, comments, or bug reports, please contact us by emailing For technical questions that can be of general interest, please ask on StackOverflow using the tag [seal].