pub struct DsigVerify {
pub chain_hash: usize,
pub sha_shared: bool,
pub hbss: Hbss,
pub message64: bool,
pub table_rounds: u32,
pub table_uram: bool,
pub own_ed25519: bool,
}Expand description
DSig verification (built: crate::verify).
A verify unit has three chain lanes and one BLAKE3 lane, like a slice.
Its rate is set by its busier side: chain steps over three lanes, or
BLAKE3 compressions on one lane. The Ed25519 certificate check (1 − h
of verifications) is done by the Ed25519 verify component, not here.
Its knobs must match the signer’s for the two to verify each other.
Fields§
§chain_hash: usize0 Haraka-512, 1 BLAKE3, 2 SHA-512 (must match the signer).
SHA-512 chains on the shared line instead of own pipelines.
hbss: HbssThe hash-based scheme (must match the signer).
message64: boolProfile 2: 64-byte messages (must match the signer).
table_rounds: u32Table rounds of the unit’s three Haraka lanes (0..=6, see
table_lane, or AUTO_TABLE_ROUNDS, the default). Independent of the signer’s: the verify unit is
separate hardware, so a BRAM-bound chip can give tables to one and
LUT S-boxes to the other.
table_uram: boolTable lookups beyond the share’s block RAM go to its UltraRAM, as
Dsig::table_uram. Model. On by default, like the signer’s.
own_ed25519: boolCertificates are checked by the verifier’s own Ed25519 verify core (as built) instead of the chip’s Ed25519 verify module.
Implementations§
Source§impl DsigVerify
impl DsigVerify
Whether the chain lanes hash on the shared SHA-512 line.
Sourcepub fn core_rest() -> (f64, f64)
pub fn core_rest() -> (f64, f64)
LUTs and block RAM of a verify core beyond its three chain lanes: the measured core minus its three lanes (as the lane model prices them). The BLAKE3 lane, scheduler, banks and cache are all in here.
Sourcepub fn unit_cost(&self) -> Cost
pub fn unit_cost(&self) -> Cost
Cost of one verify unit: three chain lanes of the chosen hash, the measured rest of the core, and the unit’s HBM I/O.
Sourcepub fn ed25519_cost(&self) -> Cost
pub fn ed25519_cost(&self) -> Cost
The embedded Ed25519 verify core, when certificates are checked inside.
Sourcepub fn is_measured(&self) -> bool
pub fn is_measured(&self) -> bool
Whether this configuration is the one measured (costs from Vivado, period from simulation).
Sourcepub fn units_cost(&self, units: u32, share: &Share) -> (Cost, f64)
pub fn units_cost(&self, units: u32, share: &Share) -> (Cost, f64)
Cost of units units inside share, and the URAM their tables took.
Without “table RAM” on URAM this is units × unit_cost. With it, the
table block RAM that the share cannot hold moves to UltraRAM, and every
lane gets a TABLE_LOADER_LUT loader.
Sourcepub fn cycles_per_verify(&self) -> f64
pub fn cycles_per_verify(&self) -> f64
Cycles per verification of one unit: the busier of chain steps over three lanes and BLAKE3 compressions on one lane (35 for the built scheme: 105 / 3 versus 29). The built scheme uses the measured period.
Sourcepub fn latency_cycles(&self) -> f64
pub fn latency_cycles(&self) -> f64
Idle latency of the hash path. The built scheme uses the measured figure; others scale it by their chain and commitment depth.
Trait Implementations§
Source§impl Clone for DsigVerify
impl Clone for DsigVerify
Source§fn clone(&self) -> DsigVerify
fn clone(&self) -> DsigVerify
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Component for DsigVerify
How the chip planner talks to the verifier model.
impl Component for DsigVerify
How the chip planner talks to the verifier model.
Source§fn knobs(&self) -> Vec<Knob>
fn knobs(&self) -> Vec<Knob>
Knobs: 0 HBSS, 1 chain hash, 2 SHA lanes, 3 Winternitz w, 4 batch K, 5 table rounds, 6 table RAM. The first five are shared with the signer (the TUI shows them under DSig sign); the last two are the unit’s own.
Source§fn set_knob(&mut self, index: usize, value: f64)
fn set_knob(&mut self, index: usize, value: f64)
Applies a knob change, clamping out-of-range indices.
HORS has no plan yet.
Source§fn build_flags(&self, plan: &Plan) -> BuildFlags
fn build_flags(&self, plan: &Plan) -> BuildFlags
DSIG_VERIFY_UNITS and the lanes’ table mask; what is not built yet
is named.
Source§fn plan(&self, share: &Share, cx: &Context) -> Option<Plan>
fn plan(&self, share: &Share, cx: &Context) -> Option<Plan>
As many identical verify units as the share’s LUTs and BRAM allow.
Unlike the signer, units scale one by one, so the plan is a simple division. The Ed25519 check on cache misses is planned separately.
§fn fixed(&self) -> Option<Cost>
fn fixed(&self) -> Option<Cost>
None to take a
share of its side.§fn size_for(&self, _per_second: f64, _cx: &Context) -> Option<Cost>
fn size_for(&self, _per_second: f64, _cx: &Context) -> Option<Cost>
per_second units of what it supplies
(SHA-512 blocks) at cx’s clock, or None when its size is set by
hand (the default). The planner ([plan_chip]) calls it with the
demand of the chip it plans, so the line never limits the chip.Source§impl Debug for DsigVerify
impl Debug for DsigVerify
Auto Trait Implementations§
impl Freeze for DsigVerify
impl RefUnwindSafe for DsigVerify
impl Send for DsigVerify
impl Sync for DsigVerify
impl Unpin for DsigVerify
impl UnsafeUnpin for DsigVerify
impl UnwindSafe for DsigVerify
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more