Struct curve25519_dalek::backend::serial::u64::scalar::Scalar52[][src]

pub struct Scalar52(pub [u64; 5]);
Expand description

The Scalar52 struct represents an element in \(\mathbb Z / \ell \mathbb Z\) as 5 \(52\)-bit limbs.

Tuple Fields

0: [u64; 5]

Implementations

Pack the limbs of this UnpackedScalar into a Scalar.

Inverts an UnpackedScalar in Montgomery form.

Inverts an UnpackedScalar not in Montgomery form.

Return the zero scalar

Unpack a 32 byte / 256 bit scalar into 5 52-bit limbs.

Reduce a 64 byte / 512 bit scalar mod l

Pack the limbs of this Scalar52 into 32 bytes

Compute a + b (mod l)

Compute a - b (mod l)

Compute a * b

Compute a^2

Compute limbs/R (mod l), where R is the Montgomery modulus 2^260

Compute a * b (mod l)

Compute a^2 (mod l)

Compute (a * b) / R (mod l), where R is the Montgomery modulus 2^260

Compute (a^2) / R (mod l) in Montgomery form, where R is the Montgomery modulus 2^260

Puts a Scalar52 in to Montgomery form, i.e. computes a*R (mod l)

Takes a Scalar52 out of Montgomery form, i.e. computes a/R (mod l)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Numeric cast from self to T.

Performs the conversion.

Safe lossless bitwise transmute from T to Self.

Numeric cast from T to Self.

Performs the conversion.

Safe lossless bitwise transmute from self to T.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.