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
1
vote
1 answer

fractional to binary with SEAL

Am I able to convert a fractional encoded ciphertext to binary encoded one? Let's say I encrypt 5 with being fractional encoded. Then, can I an array consisting of E(1), E(0), E(1)? (5 = 101)
dilot
  • 67
  • 6
1
vote
1 answer

Leakage through Ciphertext-Plaintext Homomorphic Operations

Consider two parties, namely, P_0 and P_1. P_0 and P_1 have plaintexts p_a and p_b respectively. P_0 encrypts p_a to get c_a = Enc(p_a) with its public key, and sends it to P_1. P_1 performs multiply_plain(c_a, p_b, c), followed by…
AdveRSAry
  • 187
  • 7
1
vote
1 answer

Perform Addition on a Product using the S.E.A.L. Library

I am trying to perform an operation that is of the form: (A * B) + C. The multiplication works fine, as all the numbers have the same scale at that point, but the product of A * B has a different scale than C. It makes sense that multiplication…
1
vote
1 answer

Modulus Switching in SEAL library

Conventionally, modulus switching is primarily used to make the noise growth linear, as opposed to exponential. However, in the BFV examples, it has been introduced as a tool to shave off primes (thereby reducing the bitlength of coefficient…
AdveRSAry
  • 187
  • 7
1
vote
1 answer

How would I go about retrieving the binary representation of a ciphertext as it would be stored to disk

This question is in reference to version 3.0 of the Microsoft Simple Encrypted Arithmetic Library (SEAL), in case it is not evident from the tag. I'm trying to extract and evaluate the actual bits that will be written to memory, as stored in the…
Onofog
  • 443
  • 3
  • 15
1
vote
1 answer

Choosing a suitable plaintext_modulus

In choosing parameters such as plaintext_modulus, is there any good strategy? (aside from guess-and-check until the output looks correct) In particular, I'm experimenting with IntegerEncoder with BFV. My (potentially-wrong) understanding is that the…
cory2067
  • 39
  • 7
1
vote
1 answer

Simple Encrypted Arithmetic Library (SEAL) how to save the ciphertext to a file

I'm using the SEAL library in C++. I would like to save the ciphertext to a file. I was thinking something like transforming it to a string type and saving it. I want to have a file with all the ciphertexts and when needed upload the file to memory…
Gabb
  • 11
  • 5
1
vote
0 answers

Automatic parameter selection in SEAL

The SEAL library (v 2.1.3) offers an automatic parameter selection tool to help choose the optimal parameter values for a given evaluation function of the ciphertexts. The current version of SEAL, however, only supports the Integer Encoder. In…
MedL
  • 23
  • 3
1
vote
1 answer

Use of Galois Automorphisms in Homomorphic Encryption

The SEAL (Simple Encrypted Arithmetic Library) uses Galois Automorphisms to enable batch computations (i.e., the addition and multiplication of many ciphertexts in parallel in one single operation). The batching procedure is described in sections…
MedL
  • 23
  • 3
1
vote
1 answer

Refresh and ValidityCheck operations in the SEAL Code

While reading the Homomorphic Encryption Standard I came across those two operations: Refresh(Params, flag, EK, C1) → C2. ValidityCheck(Params, EK, [C], COMP) → flag. I've searched their implementation in the SEAL Code but couldn’t find any,…
TalG
  • 677
  • 1
  • 9
  • 26
1
vote
1 answer

Relinearizing one Ciphertext in SEAL

Let's say I calulated addition or multiplication of 2 Ciphertexts and seved the result in a third one. If I want to perform additional mathematical operations on my result Ciphertext (destination Chipertext), is it advisable to use…
TalG
  • 677
  • 1
  • 9
  • 26
1
vote
1 answer

Choosing the suitable parameters for SEAL and clarifying some mathematical operations

A) I'm having trouble to understand the relationship between those setting: parms.set_poly_modulus("1x^2048 + 1"); parms.set_coeff_modulus(coeff_modulus_128(2048)); parms.set_plain_modulus(1 << 8); and this table from the SEAL manual. I'm…
TalG
  • 677
  • 1
  • 9
  • 26
1
vote
1 answer

Installing Simple Encrypted Arithmetic Library (SEAL) v2.3.1

I'm trying to install Simple Encrypted Arithmetic Library (SEAL) v2.3.1 on my Mac (running MacOS High Sierra version 10.13.6). I was following the instructions in INSTALL.txt and when trying to build SEALExamples, I encountered an error when running…
1
vote
1 answer

Simple Encrypted Arithmetic Library (SEAL) and the seal::Ciphertext variable

I'm using the Simple Encrypted Arithmetic Library (SEAL) library from Microsoft Cryptography Research Group. Is there a way to get the content of seal::Ciphertext variable? I've tried to understand the ciphertext.h and ciphertext.cpp and found…
TalG
  • 677
  • 1
  • 9
  • 26
0
votes
0 answers

Option "seal" in mount.cifs causes Ubuntu 20.04 client to crash

I'm running quite a few Ubuntu 20.04.6 LTS clients here, accessing a CIFS share on an OmniOS version r151046h ZFS server. Authentication is done on a Windows 2019 PDC (which has suspended updates since end of last month). Since Microsoft is forcing…
LME
  • 33
  • 5