Struct salty::Scalar[][src]

#[repr(C)]
pub struct Scalar(pub [u8; 32]);
Expand description

Since the curve is an abelian group, it has a module structure, consisting of these scalars. They are the integers modulo “ell”, where “ell” is 2**252 + something something.

Implementations

The order of the group, 2**252 + something something

Reduce this Scalar modulo \(\ell\).

Check whether this Scalar is the canonical representative mod \(\ell\).

This is intended for uses like input validation, where variable-time code is acceptable.

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Performs the conversion.

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

Multiply this MontgomeryPoint by a Scalar.

Given self \( = u_0(P) \), and a Scalar \(n\), return \( u_0([n]P) \).

The resulting type after applying the * operator.

The resulting type after applying the * operator.

Performs the * operation. Read more

Performs the *= operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

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.