pub struct Scalar(pub Scalar);Available on crate feature
ed25519 only.Expand description
Ed25519 scalar
Tuple Fields§
§0: ScalarImplementations§
Trait Implementations§
Source§impl ConditionallySelectable for Scalar
impl ConditionallySelectable for Scalar
Source§fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
Conditionally swap
self and other if choice == 1; otherwise,
reassign both unto themselves. Read moreSource§impl ConstantTimeEq for Scalar
impl ConstantTimeEq for Scalar
Source§impl IntegerEncoding for Scalar
impl IntegerEncoding for Scalar
Source§fn to_be_bytes(&self) -> Self::Bytes
fn to_be_bytes(&self) -> Self::Bytes
Encodes integer as bytes in big-endian byte order
Source§fn to_le_bytes(&self) -> Self::Bytes
fn to_le_bytes(&self) -> Self::Bytes
Encodes integer as bytes in little-endian byte order
Source§fn from_be_bytes_exact(bytes: &Self::Bytes) -> Option<Self>
fn from_be_bytes_exact(bytes: &Self::Bytes) -> Option<Self>
Decodes integer encoded as bytes in big-endian bytes order Read more
Source§fn from_le_bytes_exact(bytes: &Self::Bytes) -> Option<Self>
fn from_le_bytes_exact(bytes: &Self::Bytes) -> Option<Self>
Decodes integer encoded as bytes in little-endian bytes order Read more
Source§fn from_be_bytes_mod_order(bytes: &[u8]) -> Self
fn from_be_bytes_mod_order(bytes: &[u8]) -> Self
Interprets
bytes as big-endian encoding of an integer. Returns integer mod curve (prime) order.Source§fn from_le_bytes_mod_order(bytes: &[u8]) -> Self
fn from_le_bytes_mod_order(bytes: &[u8]) -> Self
Interprets
bytes as little-endian encoding of an integer. Returns integer mod curve (prime) order.Source§impl Invertible for Scalar
impl Invertible for Scalar
Source§impl Multiplicative<CurveGenerator> for Scalar
impl Multiplicative<CurveGenerator> for Scalar
Source§impl Multiplicative<Point> for Scalar
impl Multiplicative<Point> for Scalar
Source§impl Multiplicative<Scalar> for Scalar
impl Multiplicative<Scalar> for Scalar
Source§impl Ord for Scalar
impl Ord for Scalar
Source§impl PartialOrd for Scalar
impl PartialOrd for Scalar
Source§impl Reduce<32> for Scalar
impl Reduce<32> for Scalar
Source§fn from_be_array_mod_order(bytes: &[u8; 32]) -> Self
fn from_be_array_mod_order(bytes: &[u8; 32]) -> Self
Interprets
bytes as big-endian encoding of an integer, returns this
integer modulo curve (prime) orderSource§fn from_le_array_mod_order(bytes: &[u8; 32]) -> Self
fn from_le_array_mod_order(bytes: &[u8; 32]) -> Self
Interprets
bytes as little-endian encoding of an integer, returns this
integer modulo curve (prime) orderSource§impl Reduce<64> for Scalar
impl Reduce<64> for Scalar
Source§fn from_be_array_mod_order(bytes: &[u8; 64]) -> Self
fn from_be_array_mod_order(bytes: &[u8; 64]) -> Self
Interprets
bytes as big-endian encoding of an integer, returns this
integer modulo curve (prime) orderSource§fn from_le_array_mod_order(bytes: &[u8; 64]) -> Self
fn from_le_array_mod_order(bytes: &[u8; 64]) -> Self
Interprets
bytes as little-endian encoding of an integer, returns this
integer modulo curve (prime) orderimpl Copy for Scalar
impl Eq for Scalar
impl StructuralPartialEq for Scalar
Auto Trait Implementations§
impl Freeze for Scalar
impl RefUnwindSafe for Scalar
impl Send for Scalar
impl Sync for Scalar
impl Unpin for Scalar
impl UnwindSafe for Scalar
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more