pub struct Compiler { /* private fields */ }
Expand description

A frontend compiler for Sunscreen FHE programs.

Implementations

Creates a new Compiler builder.

Add the given FHE program for compilation.

Set the compiler to search for suitable encryption scheme parameters for the FHE program.

Set the constraint the parameter search algorithm places on the plaintext modulus. You can either force the algorithm to use an exact value or any value that supports batching of at least n bits in length.

Don’t use the parameter search algorithm, and instead explicitly set the scheme’s parameters. For expert use and may cause failures.

Set the security level. If unspecified, the compiler assumes 128-bit security.

The minimum number of bits of noise budget the search algorithm will leave for all outputs.

Compile the FHE program. If successful, returns an Application containing a compiled form of each fhe_program argument.

Remarks

Each compiled FHE program in the returned Application is compiled under the same Params so ciphertexts can be used interchangeably between programs.

You must specify at least one fhe_program in the builder before calling compile. compile returns a Error::NoPrograms if you fail to do so.

Each specified FHE program must have a unique name, regardless of its parent module or crate. compile returns a Error::NameCollision if two or more FHE programs have the same name.

Each FHE program must use the same scheme or compile will return a Error::NameCollision error.

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 alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. 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.