[][src]Struct curve25519_dalek::window::LookupTable

pub struct LookupTable<T>(pub(crate) [T; 8]);

A lookup table of precomputed multiples of a point \(P\), used to compute \( xP \) for \( -8 \leq x \leq 8 \).

The computation of \( xP \) is done in constant time by the select function.

Since LookupTable does not implement Index, it's more difficult to accidentally use the table directly. Unfortunately the table is only pub(crate) so that we can write hardcoded constants, so it's still technically possible. It would be nice to prevent direct access to the table.

XXX make this generic with respect to table size


impl<T> LookupTable<T> where
    T: Identity + ConditionallySelectable + ConditionallyNegatable

pub fn select(&self, x: i8) -> T[src]

Given \(-8 \leq x \leq 8\), return \(xP\) in constant time.

Trait Implementations

impl<T: Clone> Clone for LookupTable<T>[src]

impl<T: Copy> Copy for LookupTable<T>[src]

impl<T: Debug> Debug for LookupTable<T>[src]

impl<T: Copy + Default> Default for LookupTable<T>[src]

impl<'a> From<&'a EdwardsPoint> for LookupTable<ProjectiveNielsPoint>[src]

impl<'a> From<&'a EdwardsPoint> for LookupTable<AffineNielsPoint>[src]

impl<T> Zeroize for LookupTable<T> where
    T: Copy + Default + Zeroize

Auto Trait Implementations

impl<T> RefUnwindSafe for LookupTable<T> where
    T: RefUnwindSafe

impl<T> Send for LookupTable<T> where
    T: Send

impl<T> Sync for LookupTable<T> where
    T: Sync

impl<T> Unpin for LookupTable<T> where
    T: Unpin

impl<T> UnwindSafe for LookupTable<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 

impl<T> From<T> for T[src]

impl<T> FromBits<T> for T

impl<T> FromCast<T> for T

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> IntoBits<U> for T where
    U: FromBits<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<Z> Zeroize for Z where
    Z: DefaultIsZeroes