Struct libsecp256k1::curve::Scalar [−][src]
Expand description
A 256-bit scalar value.
Implementations
impl Scalar
[src]
impl Scalar
[src]pub fn bits(&self, offset: usize, count: usize) -> u32
[src]
pub fn bits(&self, offset: usize, count: usize) -> u32
[src]Access bits from a scalar. All requested bits must belong to the same 32-bit limb.
pub fn bits_var(&self, offset: usize, count: usize) -> u32
[src]
pub fn bits_var(&self, offset: usize, count: usize) -> u32
[src]Access bits from a scalar. Not constant time.
pub fn cadd_bit(&mut self, bit: usize, flag: bool)
[src]
pub fn cadd_bit(&mut self, bit: usize, flag: bool)
[src]Conditionally add a power of two to a scalar. The result is not allowed to overflow.
#[must_use]pub fn set_b32(&mut self, b32: &[u8; 32]) -> Choice
[src]
#[must_use]pub fn set_b32(&mut self, b32: &[u8; 32]) -> Choice
[src]Set a scalar from a big endian byte array, return whether it overflowed.
pub fn is_high(&self) -> bool
[src]
pub fn is_high(&self) -> bool
[src]Check whether a scalar is higher than the group order divided by 2.
pub fn cond_neg_assign(&mut self, flag: Choice)
[src]
pub fn cond_neg_assign(&mut self, flag: Choice)
[src]Conditionally negate a number, in constant time.
impl Scalar
[src]
impl Scalar
[src]pub fn mul_in_place(&mut self, a: &Scalar, b: &Scalar)
[src]
pub fn shr_int(&mut self, n: usize) -> u32
[src]
pub fn shr_int(&mut self, n: usize) -> u32
[src]Shift a scalar right by some amount strictly between 0 and 16, returning the low bits that were shifted off.
pub fn sqr_in_place(&mut self, a: &Scalar)
[src]
pub fn sqr(&self) -> Scalar
[src]
pub fn inv_in_place(&mut self, x: &Scalar)
[src]
pub fn inv(&self) -> Scalar
[src]
pub fn inv_var(&self) -> Scalar
[src]
pub fn is_even(&self) -> bool
[src]
Trait Implementations
impl<'a> AddAssign<&'a Scalar> for Scalar
[src]
impl<'a> AddAssign<&'a Scalar> for Scalar
[src]pub fn add_assign(&mut self, other: &'a Scalar)
[src]
pub fn add_assign(&mut self, other: &'a Scalar)
[src]Performs the +=
operation. Read more
impl AddAssign<Scalar> for Scalar
[src]
impl AddAssign<Scalar> for Scalar
[src]pub fn add_assign(&mut self, other: Scalar)
[src]
pub fn add_assign(&mut self, other: Scalar)
[src]Performs the +=
operation. Read more
impl<'a> MulAssign<&'a Scalar> for Scalar
[src]
impl<'a> MulAssign<&'a Scalar> for Scalar
[src]pub fn mul_assign(&mut self, other: &'a Scalar)
[src]
pub fn mul_assign(&mut self, other: &'a Scalar)
[src]Performs the *=
operation. Read more
impl MulAssign<Scalar> for Scalar
[src]
impl MulAssign<Scalar> for Scalar
[src]pub fn mul_assign(&mut self, other: Scalar)
[src]
pub fn mul_assign(&mut self, other: Scalar)
[src]Performs the *=
operation. Read more
impl Copy for Scalar
[src]
impl Eq for Scalar
[src]
impl StructuralEq for Scalar
[src]
impl StructuralPartialEq for Scalar
[src]
Auto Trait Implementations
impl RefUnwindSafe for Scalar
impl Send for Scalar
impl Sync for Scalar
impl Unpin for Scalar
impl UnwindSafe for Scalar
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,