pub enum Mode {
Ed25519,
Dsig,
UbftEd25519,
UbftDsig,
}Expand description
Which paper the chip is planned for.
Variants§
Ed25519
Ed25519 alone.
Dsig
DSig with the Ed25519 signing and verification it needs.
UbftEd25519
Ed25519 as a service beside a uBFT replica: the uBFT modules only
(Component::ubft), headline idle latency rather than rate.
UbftDsig
DSig (with its Ed25519 work) as a service beside a uBFT replica.
Implementations§
Source§impl Mode
What each paper’s chip contains and needs.
impl Mode
What each paper’s chip contains and needs.
Sourcepub fn paper(self) -> Mode
pub fn paper(self) -> Mode
The paper whose needs and splits this mode follows: a uBFT mode signs and verifies like the paper of its scheme.
Sourcepub fn is_ubft(self) -> bool
pub fn is_ubft(self) -> bool
A uBFT mode: only uBFT modules take part.
Sourcepub fn op(self, side: Side) -> &'static str
pub fn op(self, side: Side) -> &'static str
What one delivered operation of the side is called.
Sourcepub fn need(self, role: Role, cx: &Context, batch: f64) -> f64
pub fn need(self, role: Role, cx: &Context, batch: f64) -> f64
Operations of role needed per delivered operation of its side (0:
the role takes no part). batch is DSig’s batch size K.
- Ed25519 paper: one Ed25519 signature per signature, one Ed25519 verification per verification.
- DSig paper: one DSig signature and
1/KEd25519 signature per signature; one DSig verification and1 − hEd25519 verification per verification,h = (b/100)·(K − 1)/K(Context::cache_hit). - A uBFT mode: as its paper; one uBFT certificate share is one signature, checking a peer’s share one verification.
Sourcepub fn admits(self, c: &dyn Component) -> bool
pub fn admits(self, c: &dyn Component) -> bool
Whether c belongs in this mode’s chip: its role is used
and it is a uBFT module exactly when this is a uBFT mode. So the
papers never plan a uBFT service, and a uBFT chip holds only the
replica and its services (each with its own SHA-512, no shared line).
Trait Implementations§
impl Copy for Mode
impl Eq for Mode
impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnsafeUnpin for Mode
impl UnwindSafe for Mode
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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