Struct secp256k1::curve::Scalar [] [src]

pub struct Scalar(pub [u32; 8]);

A 256-bit scalar value.

Methods

impl Scalar
[src]

[src]

Clear a scalar to prevent the leak of sensitive data.

[src]

Set a scalar to an unsigned integer.

[src]

Access bits from a scalar. All requested bits must belong to the same 32-bit limb.

[src]

Access bits from a scalar. Not constant time.

[src]

Add two scalars together (modulo the group order). Returns whether it overflowed.

[src]

Conditionally add a power of two to a scalar. The result is not allowed to overflow.

[src]

Set a scalar from a big endian byte array.

[src]

Convert a scalar to a byte array.

[src]

Check whether a scalar equals zero.

[src]

Compute the complement of a scalar (modulo the group order).

[src]

[src]

Check whether a scalar equals one.

[src]

Check whether a scalar is higher than the group order divided by 2.

[src]

Conditionally negate a number, in constant time. Returns -1 if the number was negated, 1 otherwise.

impl Scalar
[src]

[src]

[src]

Shift a scalar right by some amount strictly between 0 and 16, returning the low bits that were shifted off.

[src]

[src]

[src]

[src]

[src]

[src]

Trait Implementations

impl Debug for Scalar
[src]

[src]

Formats the value using the given formatter.

impl Clone for Scalar
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for Scalar
[src]

impl PartialEq for Scalar
[src]

[src]

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

[src]

This method tests for !=.

impl Default for Scalar
[src]

[src]

Returns the "default value" for a type. Read more

impl Add<Scalar> for Scalar
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a, 'b> Add<&'a Scalar> for &'b Scalar
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> AddAssign<&'a Scalar> for Scalar
[src]

[src]

Performs the += operation.

impl AddAssign<Scalar> for Scalar
[src]

[src]

Performs the += operation.

impl Mul<Scalar> for Scalar
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a, 'b> Mul<&'a Scalar> for &'b Scalar
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> MulAssign<&'a Scalar> for Scalar
[src]

[src]

Performs the *= operation.

impl MulAssign<Scalar> for Scalar
[src]

[src]

Performs the *= operation.