Expand description

This crate contains the types and functions for executing a Sunscreen FHE or ZKP program.

Modules

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 Runtimes.
  • A serializable list of requirements for an Fhe Program.
  • A surrogate type for creating Runtimes 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 use FheRuntime, ZkpRuntime, or FheZkpRuntime depending on your needs. See Runtime.
  • 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 Runtimes.
  • An input argument to a ZKP program.

Enums

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

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.