Questions tagged [seal]

Microsoft SEAL is a fast and user-friendly homomorphic encryption library created by Microsoft Research. It is written in C++ and works on Windows, Linux, and macOS. The most recent version of Microsoft SEAL is publicly available at https://github.com/Microsoft/SEAL.

Introduction

Microsoft SEAL is an easy-to-use homomorphic encryption library, developed by researchers in the Cryptography Research Group at Microsoft Research. Microsoft SEAL is written in standard C++ and has no external dependencies, making it is easy to compile in many different environments. The current version includes .NET Standard wrappers for the public API.

The first version of Microsoft SEAL was released at the end of 2015 and the library has since then been in constant development with several major releases per year. Microsoft SEAL is licensed under the MIT license and can be downloaded at https://github.com/Microsoft/SEAL.

Homomorphic Encryption

Homomorphic encryption refers to a new type of encryption scheme that allows computations to be directly on encrypted data without requiring decryption first. The result of such encrypted computations remains encrypted and can thus only be interpreted the owner of a secret key (in most cases the data owner). Such functionality can for example enable a cryptographically private cloud storage and computation service. In particular, Microsoft SEAL implements the BFV scheme for encrypted modular arithmetic, and the CKKS scheme for encrypted approximate fixed-precision arithmetic.

Both the BFV and the CKKS scheme are highly performant post-quantum secure RLWE-based homomorphic encryption schemes. Such encryption schemes are currently not standardized by any major standards organization, but a recently launched effort by the HomomorphicEncryption.org group attempts to instead create a consortium standard describing secure parameters, a standard API, and a programming model for several schemes, including the BFV and the CKKS schemes. Microsoft SEAL implements the secure parameters recommended by the standard.

Documentation and Questions

The GitHub repository front page provides a detailed installation guide for multiple platforms. For a hands-on learning experience, Microsoft SEAL contains extensively commented example projects demonstrating core concepts of the library. In addition, the header files contain detailed comments for the public API.

When asking questions it is important to know the specific version of Microsoft SEAL that is being used, as well as seeing the complete code producing the issue. In particular, the values set in the encryption parameters (EncryptionParameters class) are critical to know, as the behavior of the encryption scheme depends totally on these parameters. Before asking your question please look at the highest voted questions under this tag, as these tend to address many of the common issues, misunderstandings, and fundamental challenges in using Microsoft SEAL.

79 questions
0
votes
1 answer

Using a C++ library in Javascript function on the user's browser

I want to a web application that concerns Homomorphic Encryption. I am using Microsoft SEAL. I wanted to know if there is any way I could use this library in javascript function so that whenever a button is clicked the javascript function is…
0
votes
1 answer

I get an error when I rotate the ciphertext vector,

I want to rotate the product vector of two ciphertext vectors, but I get an error and I don't know how I should try to solve it. It is correct when I rotate a ciphertext vector, but when this ciphertext vector is a product, an error occurs. int…
zxCoder
  • 71
  • 1
  • 5
0
votes
1 answer

Seeking ways to improve the calculation efficiency of Microsoft's seal library

I'm using Microsoft's homomorphic encryption library seal to calculate the dot product of two ciphertext vectors. I found that when the size of the ciphertext vector is 600, it takes about 12 seconds. I don't know if there is a way to improve the…
zxCoder
  • 71
  • 1
  • 5
0
votes
0 answers

Converting .cpp file to .wasm file

I have a .cpp file that imports the microsoft seal library #include "seal/seal.h" it imports without any errors but when i try to convert the file to .wasm, i get an error saying fatal error: 'seal/seal.h' file not found #include "seal/seal.h" …
Maria Ahmed
  • 111
  • 4
0
votes
1 answer

fractional encoder in SEAL library?

In the newer version of the SEAL library, I am not able to find out the fractional encoder. Is that present in the library and I am missing or it has been removed ??
0
votes
0 answers

How to fix Cannot open source file: 'seal/util/config.h'

I am currently using VS studio 2019 and cloned from GIT MicrosoftSEAL using Visual Studio i am having problems making it run. I already downloaded C++ packages along with SDK 10.0.16299.0 then retargetted the whole projects but still getting the 34…
fallere456
  • 111
  • 1
0
votes
1 answer

How to use Microsoft SEAL library for homomorphic encryption?

I want to use Microsoft SEAL library for homomorphic encryption in a university project. I have no prior experience on Visual Studio 2017 (15.9). After cloning SEAL from github, I opened the solution file and tried to build the projects. But it…
Ashik
  • 184
  • 3
  • 16
0
votes
1 answer

Microsoft SEAL : Required negative values as a result after subtraction of two PolyCRT composed ciphertexts

Suppose I have two vectors x = [1,2,3,4] and y = [5,1,2,6]. I composed and encrypted the two array using PolyCRTBuilder ( Ciphertextx and Ciphertexty ) . If I subtract the two ciphertexts ( Ciphertextx MINUS Ciphertexty ), I should get Result =…
0
votes
1 answer

Estimating Noise Budget without Secret Key

In the latest version of SEAL, the Simulation class has been removed. Has it been shifted to some other file? If it has been completely removed from the library, then how can I estimate noise growth, and choose appropriate parameters for my…
AdveRSAry
  • 187
  • 7
0
votes
1 answer

Microsoft SEAL : Subtraction of two PolyCRT composed ciphertext results in overflow

Suppose I have two arrays x = [1,2,3,4,5] and xMean = [3,3,3,3,3]. I composed and encrypted the two array using PolyCRTBuilder ( xCiphertext and xMeanCiphertext ) . If I subtract the two ciphertexts ( xCiphertext MINUS xMeanCiphertext ), I should…
0
votes
1 answer

Microsoft SEAL : Find the mean of PolyCRT Ciphertext

Is there an easy way to compute the mean of a ciphertext that was composed using PolyCRTBuilder and encrypted. Here is the code snippet: EncryptionParameters parms; parms.set_poly_modulus("1x^4096 +…
0
votes
1 answer

Reading the remaining noise budget of Ciphertexts without the Secret Key

I use SEAL 2.3.1 and this is my parameter setting: seal::EncryptionParameters parms; parms.set_poly_modulus("1x^2048 + 1"); // n = 2048 parms.set_coeff_modulus(coeff_modulus_128(2048)); // q = 54-bit prime parms.set_plain_modulus(1 << 8); // t =…
TalG
  • 677
  • 1
  • 9
  • 26
0
votes
1 answer

Setting the FractionalEncoder in SEAL 2.3.1

I'm using this parameter setting: parms.set_poly_modulus("1x^2048 + 1"); // n = 2048 parms.set_coeff_modulus(coeff_modulus_128(2048)); // q = 54-bit prime parms.set_plain_modulus(1 << 8); // t = 256 With this encoder FractionalEncoder…
TalG
  • 677
  • 1
  • 9
  • 26
0
votes
1 answer

Division Operator in SEAL

I didn't see any division function for Ciphertexts in evaluator. Can I use a negative exponent when using the evaluator.exponentiate() operation?
TalG
  • 677
  • 1
  • 9
  • 26
0
votes
1 answer

Including header files in a PostgreSQL C extension

I have this code for my C extension in a seal_diff_cpp.cpp file: extern "C" { // C Headers must be inside exter "C" { } block. #include #include #include #include #include…
TalG
  • 677
  • 1
  • 9
  • 26