Struct eccoxide::curve::sec2::p384r1::Scalar[][src]

pub struct Scalar(_);
Expand description

Element of the prime field Fp for scalar where p is the order of the SECP384R1 curve

Implementations

Size in bits of this element of the field

Size in bytes of this element of the field

the zero constant (additive identity)

The one constant (multiplicative identity)

Return a new element that is the square of this one

Always true: self.square() == self * self

Double the field element, this is equivalent to 2*self or self+self, but can be implemented faster

Compute the field element raised to a power of n, modulus p

Compute the field element raised to a power of n, modulus p

Similar to ‘from_bytes’ but take values from a slice.

If the slice is not of the right size, then None is returned

Output the scalar bytes representation to the mutable slice

the slice needs to be of the correct size

Get the sign of the field element

Initialize a new scalar from its bytes representation (BE)

This doesn’t verify if the element represented fits in the field, so that run the run of having elements that are greater or equal than the order of the field

Initialize a new scalar from its bytes representation (BE)

If the represented value overflow the field element size, then None is returned.

Output the scalar bytes representation (BE)

Get the multiplicative inverse

Note that 0 doesn’t have a multiplicative inverse and will result in a panic TODO this will change to being a method of NonZeroScalar

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

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

Formats the value using the given formatter. Read more

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

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the - operator.

Performs the unary - operation. Read more

The resulting type after applying the - operator.

Performs the unary - operation. Read more

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

This method tests for !=.

The resulting type after applying the - operator.

Performs the - operation. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

The resulting type after applying the - operator.

Performs the - operation. 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

Performs the conversion.

Performs the conversion.

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

Converts the given value to a String. 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.