Seal class
A wrapper for the Microsoft SEAL library.
Extends Afhe and provides additional functionalities specific to Microsoft SEAL.
Constructors
- Seal(String scheme)
- Creates a new instance of the SEAL backend with a given scheme.
- Seal.noScheme()
- Creates a new instance of the SEAL backend without a scheme.
Properties
- backend ↔ Backend
-
The backend library used for the encryption scheme.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
library
↔ Pointer<
NativeType> -
A pointer to the memory address of the underlying C++ object.
getter/setter pairinherited
- publicKey → SealKey
-
Generate a SealKey representing a publicKey.
no setteroverride
- relinKeys → SealKey
-
Generate a SealKey representing a relinKeys.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scheme ↔ Scheme
-
The encryption scheme used by the backend.
getter/setter pairinherited
- secretKey → SealKey
-
Generate a SealKey representing a secretKey.
no setteroverride
- slotCount → int
-
Returns the number of slots based on parameters.
no setterinherited
Methods
-
add(
Ciphertext a, Ciphertext b) → Ciphertext -
Adds two Ciphertexts.
inherited
-
addPlain(
Ciphertext a, Plaintext b) → Ciphertext -
Adds value of Plaintext to the value of Ciphertext.
inherited
-
cipher(
) → Ciphertext - Creates a new, empty Ciphertext object.
-
decodeDouble(
Plaintext plaintext) → double -
Decodes a Plaintext into a double.
inherited
-
decodeVecDouble(
Plaintext plaintext, int arrayLength) → List< double> -
Decodes a Plaintext into a list of doubles.
inherited
-
decodeVecInt(
Plaintext plaintext, int arrayLength) → List< int> -
Decodes a Plaintext into a list of integers.
inherited
-
decrypt(
Ciphertext ciphertext) → Plaintext -
Decrypts the ciphertext message.
inherited
-
encodeDouble(
double value) → Plaintext -
Encodes a double into a Plaintext.
inherited
-
encodeVecDouble(
List< double> vec) → Plaintext -
Encodes a list of doubles into a Plaintext.
inherited
-
encodeVecInt(
List< int> vec) → Plaintext -
Encodes a list of integers into a Plaintext.
inherited
-
encrypt(
Plaintext plaintext) → Ciphertext -
Encrypts the plaintext message.
inherited
-
genContext(
Map context) → String -
Generates a context for the encryption scheme.
inherited
-
genContextFromParameters(
Map parameters) → String -
Loads the encryption context from a string.
inherited
-
genKeys(
) → void -
Generates the public and secret keys for the encryption and decryption.
inherited
-
genRelinKeys(
) → void -
Generates the relinearization keys derived from the secret key.
inherited
-
invariantNoiseBudget(
Ciphertext ciphertext) → int -
Returns the invariant noise budget of the Ciphertext.
inherited
-
loadCiphertext(
Pointer< Uint8> data, int size) → Ciphertext -
Validates a serialized ciphertext and returns it as a Ciphertext object.
override
-
modSwitchNext(
Ciphertext ciphertext) → Ciphertext -
Modulus switches the Ciphertext to a next lower level.
inherited
-
multiply(
Ciphertext a, Ciphertext b) → Ciphertext -
Multiplies two Ciphertexts.
inherited
-
multiplyPlain(
Ciphertext a, Plaintext b) → Ciphertext -
Multiplies a Ciphertext by a Plaintext.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
plain(
String value) → Plaintext - Creates a new Plaintext object from a string.
-
power(
Ciphertext a, int power) → Ciphertext -
Raises the Ciphertext to a
power
.inherited -
relinearize(
Ciphertext ciphertext) → Ciphertext -
Relinearizes the Ciphertext.
inherited
-
saveParameters(
) → Map -
Validate Serialized Encryption Parameters
override
-
square(
Ciphertext a) → Ciphertext -
Squares the Ciphertext.
inherited
-
subtract(
Ciphertext a, Ciphertext b) → Ciphertext -
Subtracts two Ciphertexts.
inherited
-
subtractPlain(
Ciphertext a, Plaintext b) → Ciphertext -
Subtracts value of Plaintext from the value of Ciphertext.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited