Crate sunscreen_runtime
source ·Expand description
This crate contains the types and functions for executing a Sunscreen FHE or ZKP program.
Modules
- Marker traits.
Structs
- Components needed to perform BFV encryption. Specifically, BFV is defined by the following equation in SEAL:
- Indicates the type signature of an FHE or ZKP program.
- An encryption of the given data type. Note, the data type is stored in plaintext and is considered part of Sunscreen’s runtime protocol.
- An FHE program with its associated metadata.
- A surrogate type for creating FHE-enabled
Runtime
s. - A serializable list of requirements for an Fhe Program.
- A surrogate type for creating
Runtime
s supporting both FHE and ZKP. - The generalized runtime type that provides ZKP and FHE functionality depending on the generic parameter
T
. As a user, you should instead useFheRuntime
,ZkpRuntime
, orFheZkpRuntime
depending on your needs. SeeRuntime
. - The parameter set required for a given FHE program to run efficiently and correctly.
- Represents an encoded plaintext suitable for use in the underlying scheme.
- The private key used to decrypt ciphertexts.
- A builder for creating a proof.
- A bundle of public keys. These may be freely shared with other parties without risk of compromising data security.
- A type which represents the fully qualified name and version of a datatype.
- A builder for verifying a proof.
- SemVer version as defined by https://semver.org.
- A data type that contains parameters for reconstructing a context during deserialization (needed by SEAL).
- A surrogate type for creating ZKP-enabled
Runtime
s. - An input argument to a ZKP program.
Enums
- Represents an error that can occur in this crate.
- An input argument to an Fhe Program. See
crate::Runtime::run
. - An error that occurs while running an Fhe Program.
- The underlying backend implementation of a ciphertext (e.g SEAL’s
Ciphertext
). - The underlying backend implementation of a plaintext (e.g. SEAL’s
Plaintext
). - A key type required for an Fhe Program to function correctly.
- A type that can be either a SEAL plaintext or a ciphertext.
Traits
- Denotes the given type is valid under the BFV scheme.
- A trait that denotes this type can be used as an argument to an FHE program.
- Denotes the given rust type is an encoding in an FHE scheme
- Declare how many ciphertexts an FheType decomposes into. The runtime needs this to correctly bundle return values from an Fhe Program.
- A trait for converting values into fields used by ZKPs.
- This trait specifies one may attempt to convert a plaintext into this type.
- This trait denotes one may attempt to turn this type into a plaintext.
- A trait the gives a name an version to a given type
- A trait the gives a name an version to a given type
- Denotes this type can be used as an input to a ZKP program.
Functions
- You probably should instead use
Runtime::run()
. - Traverses the FheProgram’s nodes in topological order, executing callback on each node.
Type Aliases
- A runtime capable of only FHE operations.
- A runtime capable of both FHE and ZKP operations.
- Wrapper around
Result
with this crate’s error type. - A type containing the
Runtime::new_*
constructor methods to create the appropriate runtime: - A runtime capable of only ZKP operations.