pub enum Operation {
Show 15 variants ShiftLeft, ShiftRight, SwapRows, Relinearize, Multiply, MultiplyPlaintext, Add, AddPlaintext, Negate, Sub, SubPlaintext, InputCiphertext(usize), InputPlaintext(usize), Literal(Literal), OutputCiphertext,
}
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.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.