pub struct TopKeyImages<'a> {
pub kg_top_left: Vec<PolyMatrixNTT<'a>>,
pub kg_top_right: Vec<PolyMatrixNTT<'a>>,
pub kh_top: PolyMatrixNTT<'a>,
pub kg_body_left_tables: Vec<NttAutomorphTable>,
pub kg_body_right_tables: Vec<NttAutomorphTable>,
}Expand description
Public fixed top-row images and NTT automorphism tables for packing-key expansion.
Reference-compatible requests upload only the secret-dependent K_g and
K_h body rows. The public top rows are derived from fixed seeds on both
the client and server. This cache holds the top-row automorphic images and
the matching NTT slot tables needed to expand uploaded K_g bodies without
performing an inverse/forward NTT pair for every image.
Fields§
§kg_top_left: Vec<PolyMatrixNTT<'a>>Fixed top rows for left-half K_g images.
kg_top_right: Vec<PolyMatrixNTT<'a>>Fixed top rows for right-half K_g images.
kh_top: PolyMatrixNTT<'a>Fixed top row for the final K_h matrix.
kg_body_left_tables: Vec<NttAutomorphTable>NTT slot tables for uploaded left-half K_g body images.
Entry i applies τ_g^i to the uploaded kg_body.
kg_body_right_tables: Vec<NttAutomorphTable>NTT slot tables for uploaded right-half K_g body images.
Entry i applies τ_g^i ∘ τ_h to the uploaded kg_body.
Implementations§
Source§impl<'a> TopKeyImages<'a>
impl<'a> TopKeyImages<'a>
Sourcepub fn build(params: &'a RlweParams) -> Self
pub fn build(params: &'a RlweParams) -> Self
Build fixed public top-row key images and body automorphism tables from reference seeds.
Servers should construct this once for an RlweParams instance and
reuse it for every reference-compatible request. At d = 2048, this
moves the NTT slot-table discovery and top-row image generation out of
the online query path; request-time expansion only copies NTT slots for
the uploaded body rows and stacks them with these cached top rows.
Sourcepub fn validate(&self, params: &RlweParams) -> Result<(), InspiringError>
pub fn validate(&self, params: &RlweParams) -> Result<(), InspiringError>
Validate that cached fixed key images and automorphism tables match params.
Auto Trait Implementations§
impl<'a> Freeze for TopKeyImages<'a>
impl<'a> RefUnwindSafe for TopKeyImages<'a>
impl<'a> Send for TopKeyImages<'a>
impl<'a> Sync for TopKeyImages<'a>
impl<'a> Unpin for TopKeyImages<'a>
impl<'a> UnsafeUnpin for TopKeyImages<'a>
impl<'a> UnwindSafe for TopKeyImages<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more