Enum sunscreen_fhe_program::Operation
source · [−]pub enum Operation {
}
Expand description
An operation in the execution graph.
Variants
ShiftLeft
Rotate each row in an encrypted Batched type to the left.
ShiftRight
Rotate each row in an encrypted Batched type to the right.
SwapRows
In some schemes (i.e. BFV), Batched types cannonically form a 2xN matrix. This operator swaps the rows.
While ciphertexts may contain more rows after multiplication and before relinearization, Sunscreen relinearizes at the appropriate time to ensure this operation only ever sees cannonical ciphertexts.
Relinearize
In some schemes (i.e. BFV), this operation prevents future noise growth after a multiplication operation by reducing the resultant 3xN ciphertext down to the cannonical 2xN.
Multiply
Multiply two ciphertext values.
MultiplyPlaintext
Multiply a ciphertext and a plaintext
Add
Add two ciphertext values.
AddPlaintext
Add a plaintext to a ciphertext.
Negate
Computes the additive inverse of a ciphertext.
Sub
Subtracts the right ciphertext from the left ciphertext.
SubPlaintext
Subtracts a plaintext from a ciphertext.
InputCiphertext(usize)
Represents an input ciphertext for the FHE program.
InputPlaintext(usize)
Represents an input plaintext for the current FHE program.
Literal(Literal)
Represents a literal value.
OutputCiphertext
Represents a ciphertext output for the FHE program.