pub struct BmulConstraint(pub [Operand; 6]);Expand description
BMUL constraint: A * B = C in the GHASH field GF(2^128).
Multiplication of two GHASH binary-field elements. Because a field element spans 128 bits while
a word holds only 64, each operand is carried by a pair of words: the lo word supplies the low
64 coefficients (of 1, X, ..., X^63) and the hi word the high 64 (of X^64, ..., X^127).
The operands are stored in the order given by BmulConstraint::OPERAND_NAMES.
Tuple Fields§
§0: [Operand; 6]Implementations§
Source§impl BmulConstraint
impl BmulConstraint
Sourcepub const KIND: ConstraintKind = ConstraintKind::Bmul
pub const KIND: ConstraintKind = ConstraintKind::Bmul
Kind of this constraint.
Sourcepub const OPERAND_NAMES: [&'static str; 6]
pub const OPERAND_NAMES: [&'static str; 6]
Names of the operands, in storage order.
Sourcepub fn verify(&self, values: &ValueVec) -> Result<(), ConstraintViolation>
pub fn verify(&self, values: &ValueVec) -> Result<(), ConstraintViolation>
Checks that the product of operands A and B equals operand C in the GHASH field.
The multiply runs through the same field implementation the proving system uses. This check therefore cannot drift from the arithmetic it mirrors.
§Errors
Returns the three reassembled elements, alongside the product the factors actually have.
Trait Implementations§
Source§impl AsRef<[Vec<ShiftedValueIndex>; 6]> for BmulConstraint
impl AsRef<[Vec<ShiftedValueIndex>; 6]> for BmulConstraint
Source§impl Clone for BmulConstraint
impl Clone for BmulConstraint
Source§fn clone(&self) -> BmulConstraint
fn clone(&self) -> BmulConstraint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BmulConstraint
impl Debug for BmulConstraint
Source§impl Default for BmulConstraint
impl Default for BmulConstraint
Source§fn default() -> BmulConstraint
fn default() -> BmulConstraint
Source§impl DeserializeBytes for BmulConstraint
impl DeserializeBytes for BmulConstraint
fn deserialize(read_buf: impl Buf) -> Result<Self, SerializationError>where
Self: Sized,
Source§impl SerializeBytes for BmulConstraint
impl SerializeBytes for BmulConstraint
Auto Trait Implementations§
impl Freeze for BmulConstraint
impl RefUnwindSafe for BmulConstraint
impl Send for BmulConstraint
impl Sync for BmulConstraint
impl Unpin for BmulConstraint
impl UnsafeUnpin for BmulConstraint
impl UnwindSafe for BmulConstraint
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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