Skip to main content

Crate prism_fhe

Crate prism_fhe 

Source
Expand description

Prism standard-library homomorphic-encryption sub-crate.

prism-fhe realizes the homomorphic-encryption Layer-3 of the standard library named in Wiki ADR-031: declares FheAxis through the axis! SDK macro and supplies a parametric reference impl suitable for conformance testing.

§Scope

The wiki’s ADR-031 names canonical FHE-scheme impls (TFHE, BGV, CKKS); per ADR-031 the specific impl roster is operational policy. This crate ships the reference impl OneTimePadFhe<BLOCK_BYTES> — a one-time-pad (XOR with a key-stream) “homomorphic” scheme that satisfies the additive-over-ciphertexts axis contract trivially over any block width. Production FHE schemes are application-level integrations that satisfy the same FheAxis contract with cryptographically secure schemes; the axis! declaration here is what makes them composable through the prism standard-library Layer-3 surface.

§ConstrainedTypeShape declaration

Per ADR-031’s Ciphertext<Plaintext, Scheme> shape commitment: CiphertextShape<BYTES> carries an N-byte ciphertext block. Downstream FHE schemes wrap this shape in a newtype that associates the plaintext-type IRI per ADR-017.

§Closure under uor-foundation (ADR-013)

The FheAxis trait has ::uor_foundation::pipeline::AxisExtension as a supertrait; the parametric reference impl hand-writes its AxisExtension impl since the axis!-emitted companion macro takes :ident.

§See also

Re-exports§

pub use fhe::CiphertextShape;
pub use fhe::FheAxis;
pub use fhe::OneTimePadFhe;
pub use fhe::OneTimePadFhe128;
pub use fhe::OneTimePadFhe16;
pub use fhe::OneTimePadFhe64;
pub use fhe::OneTimePadFheAxis;
pub use fhe::MAX_FHE_BLOCK_BYTES;

Modules§

fhe
FheAxis declaration + parametric one-time-pad reference impl + shape carrier.
verbs
Layer-3 substrate-Term verb bodies per Wiki ADR-054 decision 4 (canonical axis impl body discipline).

Macros§

axis_extension_impl_for_fhe_axis
Wiki ADR-030 companion macro: instantiate AxisExtension for a concrete struct implementing this axis trait. The macro emits an impl AxisExtension for <StructIdent> block that delegates dispatch_kernel to the axis-trait methods per KERNEL_* id. The orphan-rule-conformant per-struct impl mechanism replacing the blanket impl<T: <axis>> AxisExtension for T (which would violate Rust’s orphan rule from any crate that does not define AxisExtension).

Constants§

STANDARD_LIBRARY_VERSION
Wiki ADR-031 standard-library version banner.