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
12
votes
1 answer

Using FetchContent_Declare together with CMAKE_ARGS

I'm using cmake v3.13 and I want to change my ExternalProject_Add() for the SEAL library to: include(FetchContent) # Get the seal library set(SEAL "seal") FetchContent_Declare( ${SEAL} GIT_REPOSITORY …
TalG
  • 677
  • 1
  • 9
  • 26
5
votes
3 answers

How to install scikit-learn, pandas and numpy in a docker image?

I am doing a project using the PySEAL library. My project is Machine Learning related so I want to use scikit-learn, pandas and numpy libraries. How can I install these libraries so that I can use them in PySEAL docker container's code?
Whittaker
  • 63
  • 1
  • 5
4
votes
2 answers

Is there any way to compute a comparison between 2 encrypted texts using Microsoft SEAL?

I am new to this area of homomorphic encryption and I wonder how to compute a comparison between 2 ciphertexts using Microsoft SEAL. Using the BFV scheme, how could I compare 2 ciphertexts? My main goal is to find the maximum value in an encrypted…
3
votes
2 answers

Vector dot product in Microsoft SEAL with CKKS

I am currently trying to implement matrix multiplication methods using the Microsoft SEAL library. I have created a vector> as input matrix and encoded it with CKKSEncoder. However the encoder packs an entire vector into a single…
Marwan N
  • 531
  • 6
  • 20
3
votes
1 answer

Cannot Deserialise Json to Type,Unable to find Constructor

I am having a bit of a problem deserialising JSON that I am sending to an azure function. Firstly I intend to send an array of Ciphertext types with post to azure, deserialise the JSON to restore my Data and then operate on this Data. My class as…
k.dog
  • 35
  • 1
  • 1
  • 7
3
votes
0 answers

I can‘t understand the better GaloisKey creating with Microsoft SEAL?

This is the description of GaloisKey in seal / keygenerator.h from the Microsoft SEAL-3.4 library : /** Generates and returns Galois keys. This function creates specific Galois keys that can be used to apply specific Galois automorphisms on…
Dylan
  • 31
  • 2
2
votes
1 answer

Operations for rotations in ciphertext using SEAL

Just wanted to know if it is possible for us to perform some operations on rotated ciphertexts such that only part of the ciphertext takes part in the operation and not the whole object. Let's say we want only the slot_count/2 part of the ct to take…
2
votes
1 answer

how to build the microsoft seal library in ubuntu and make any project from that?

I am trying to build the latest version of the Microsoft SEAL library on ubuntu but as given in the documentation on the GitHub page I'm able the make only sealexample and the sealtest executable file from it. I've to write a custom program using…
2
votes
1 answer

Bootstrapping module in Microsoft Homomorphic Encryption Library SEAL

I need to use bootstrapping when implementing machine learning algorithm(Logistic Regression) with seal on encrypted data. But I can't find bootstrapping module in seal. Do I need to implement by myself?
Cathy
  • 21
  • 2
2
votes
1 answer

Working on SEAL Ciphertexts with multiple users

I have those SEAL settings in my SEAL v2.3.1: seal::EncryptionParameters parms; parms.set_poly_modulus("1x^2048 + 1"); parms.set_coeff_modulus(seal::coeff_modulus_128(2048)); parms.set_plain_modulus(1 << 8); seal::SEALContext…
TalG
  • 677
  • 1
  • 9
  • 26
2
votes
1 answer

Compare two ciphertexts using MS seal?

Can you please let me know how to compare two ciphertexts using the SEAL library? I have two ciphertexts, C1 and C2 that were encoded using fractional encoder and then encrypted. Is there a way to compare C1 and C2 for equality ? (C1 == C2 that…
2
votes
1 answer

Truncation in Homomorphic Encryption

How do you implement truncation in homomorphic encryption libraries like HELib or SEAL when no division operation is allowed? I have two floating point numbers a=2.3,b=1.5 which I scale to integers with 2-digit precision. Hence my encoder looks…
Overholt
  • 867
  • 1
  • 10
  • 23
2
votes
1 answer

SEAL: Incorrect decryption after square operation, even if the Ciphertext has greater than zero noise budget

I have a series of calculations on a Ciphertext and a square at the end. The problem is that even if there is sufficient noise budget to perform the square and the relinearization(both before and after the operation), when I decrypt it, I get an…
carmen
  • 23
  • 4
1
vote
1 answer

Goldschmidt division initialization using CKKS

I recently found out that I don't really understand how to make the initialization for goldschmidt division denoted in the following article: https://eprint.iacr.org/2021/914.pdf It isn't really explained how to find the initial value it is just…
Henrik
  • 21
  • 2
1
vote
0 answers

How can I send a serialized object using cURL for C++?

I am using cURL and Microsoft SEAL in C++. I need to serialize a Ciphertext object to send it to a server through a POST request. The Ciphertext object is serialized into a stringstream but, in order to send it, I need to convert it to a const…
dsimog01
  • 75
  • 1
  • 5
1
2 3 4 5 6