[−][src]Struct libss::gf256::GF256
Represents an element in the field GF(2**8) without the use of lookup tables. This module uses subtle to hopefully achieve constant time guarantees, however this code has not been audited and should not be used in production.
Methods
impl GF256
[src]
Trait Implementations
impl Field for GF256
[src]
fn zero() -> Self
[src]
Returns the zero element of the field (additive identity)
fn one() -> Self
[src]
Returns the zero element of the field (multiplicative identity)
fn is_zero(&self) -> bool
[src]
Returns true if this element is the additive identity
fn square(&mut self)
[src]
Squares the element
fn inverse(&self) -> Option<Self>
[src]
Returns multiplicative inverse (self^254)
impl Eq for GF256
[src]
impl PartialEq<GF256> for GF256
[src]
fn eq(&self, other: &GF256) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Copy for GF256
[src]
impl Clone for GF256
[src]
fn clone(&self) -> GF256
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for GF256
[src]
impl Display for GF256
[src]
impl Sub<GF256> for GF256
[src]
type Output = GF256
The resulting type after applying the -
operator.
fn sub(self, other: GF256) -> GF256
[src]
impl Add<GF256> for GF256
[src]
type Output = GF256
The resulting type after applying the +
operator.
fn add(self, other: GF256) -> GF256
[src]
impl Mul<GF256> for GF256
[src]
type Output = GF256
The resulting type after applying the *
operator.
fn mul(self, rhs: GF256) -> GF256
[src]
impl Div<GF256> for GF256
[src]
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: Self) -> Self
[src]
impl Neg for GF256
[src]
impl AddAssign<GF256> for GF256
[src]
fn add_assign(&mut self, other: GF256)
[src]
impl SubAssign<GF256> for GF256
[src]
fn sub_assign(&mut self, other: GF256)
[src]
impl MulAssign<GF256> for GF256
[src]
fn mul_assign(&mut self, rhs: GF256)
[src]
impl DivAssign<GF256> for GF256
[src]
fn div_assign(&mut self, rhs: GF256)
[src]
impl Rand for GF256
[src]
impl ConstantTimeEq for GF256
[src]
impl ConditionallySelectable for GF256
[src]
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
[src]
fn conditional_assign(&mut self, other: &Self, choice: Choice)
[src]
Conditionally assign other
to self
, according to choice
. Read more
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
[src]
Conditionally swap self
and other
if choice == 1
; otherwise, reassign both unto themselves. Read more
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,