pub struct OneTimePadFhe<const BLOCK_BYTES: usize>;Expand description
Parametric one-time-pad “FHE” — additive over ciphertexts under XOR.
Reference impl suitable for conformance testing the axis dispatch
path; not a cryptographic FHE scheme. BLOCK_BYTES is the
ciphertext block width. Production FHE schemes (TFHE, BGV, CKKS
per ADR-031’s roster) are application-level integrations that
satisfy the same FheAxis contract with cryptographically secure
schemes.
Trait Implementations§
Source§impl<const BLOCK_BYTES: usize> AxisExtension for OneTimePadFhe<BLOCK_BYTES>
impl<const BLOCK_BYTES: usize> AxisExtension for OneTimePadFhe<BLOCK_BYTES>
Source§const AXIS_ADDRESS: &'static str = <OneTimePadFhe<BLOCK_BYTES> as FheAxis>::AXIS_ADDRESS
const AXIS_ADDRESS: &'static str = <OneTimePadFhe<BLOCK_BYTES> as FheAxis>::AXIS_ADDRESS
ADR-017 content address of this axis trait. The SDK macro
derives this from the trait name and method signatures.
Source§const MAX_OUTPUT_BYTES: usize = <OneTimePadFhe<BLOCK_BYTES> as FheAxis>::MAX_OUTPUT_BYTES
const MAX_OUTPUT_BYTES: usize = <OneTimePadFhe<BLOCK_BYTES> as FheAxis>::MAX_OUTPUT_BYTES
Maximum bytes any kernel of this axis returns.
Source§fn dispatch_kernel(
kernel_id: u32,
input: &[u8],
out: &mut [u8],
) -> Result<usize, ShapeViolation>
fn dispatch_kernel( kernel_id: u32, input: &[u8], out: &mut [u8], ) -> Result<usize, ShapeViolation>
Dispatch the kernel identified by
kernel_id against the
evaluated input bytes. The implementation copies the kernel’s
output into out and returns the written length. Read moreSource§impl<const BLOCK_BYTES: usize> Clone for OneTimePadFhe<BLOCK_BYTES>
impl<const BLOCK_BYTES: usize> Clone for OneTimePadFhe<BLOCK_BYTES>
Source§fn clone(&self) -> OneTimePadFhe<BLOCK_BYTES>
fn clone(&self) -> OneTimePadFhe<BLOCK_BYTES>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const BLOCK_BYTES: usize> Debug for OneTimePadFhe<BLOCK_BYTES>
impl<const BLOCK_BYTES: usize> Debug for OneTimePadFhe<BLOCK_BYTES>
Source§impl<const BLOCK_BYTES: usize> Default for OneTimePadFhe<BLOCK_BYTES>
impl<const BLOCK_BYTES: usize> Default for OneTimePadFhe<BLOCK_BYTES>
Source§fn default() -> OneTimePadFhe<BLOCK_BYTES>
fn default() -> OneTimePadFhe<BLOCK_BYTES>
Returns the “default value” for a type. Read more
Source§impl<const BLOCK_BYTES: usize> FheAxis for OneTimePadFhe<BLOCK_BYTES>
impl<const BLOCK_BYTES: usize> FheAxis for OneTimePadFhe<BLOCK_BYTES>
const AXIS_ADDRESS: &'static str = "https://uor.foundation/axis/FheAxis/OneTimePadReference"
Source§const MAX_OUTPUT_BYTES: usize = BLOCK_BYTES
const MAX_OUTPUT_BYTES: usize = BLOCK_BYTES
Ciphertext block width (overridden per impl).
Source§fn add_ciphertexts(
input: &[u8],
out: &mut [u8],
) -> Result<usize, ShapeViolation>
fn add_ciphertexts( input: &[u8], out: &mut [u8], ) -> Result<usize, ShapeViolation>
Homomorphic addition of two ciphertext blocks.
Input =
c_a || c_b (2 * BLOCK_BYTES); output = c_a ⊕_FHE c_b. Read moreSource§impl<const BLOCK_BYTES: usize> SubstrateTermBody for OneTimePadFhe<BLOCK_BYTES>
impl<const BLOCK_BYTES: usize> SubstrateTermBody for OneTimePadFhe<BLOCK_BYTES>
Source§fn body_arena() -> &'static [Term]
fn body_arena() -> &'static [Term]
The Term arena the kernel decomposes to. Empty slice signals a
primitive-fast-path axis whose body the implementation may evaluate
through
dispatch_kernel directly per ADR-055’s optional fast-path.impl<const BLOCK_BYTES: usize> Copy for OneTimePadFhe<BLOCK_BYTES>
Auto Trait Implementations§
impl<const BLOCK_BYTES: usize> Freeze for OneTimePadFhe<BLOCK_BYTES>
impl<const BLOCK_BYTES: usize> RefUnwindSafe for OneTimePadFhe<BLOCK_BYTES>
impl<const BLOCK_BYTES: usize> Send for OneTimePadFhe<BLOCK_BYTES>
impl<const BLOCK_BYTES: usize> Sync for OneTimePadFhe<BLOCK_BYTES>
impl<const BLOCK_BYTES: usize> Unpin for OneTimePadFhe<BLOCK_BYTES>
impl<const BLOCK_BYTES: usize> UnsafeUnpin for OneTimePadFhe<BLOCK_BYTES>
impl<const BLOCK_BYTES: usize> UnwindSafe for OneTimePadFhe<BLOCK_BYTES>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more