pub struct DHPrivateKey(/* private fields */);Expand description
A ristretto255 scalar in $\mathbb{Z}_\ell$.
This can be instantiated only by validating decode or by wide reduction, so it is always canonical.
Implementations§
Source§impl DHPrivateKey
impl DHPrivateKey
Sourcepub fn decode(bytes: [u8; 32]) -> Result<Self, Error>
pub fn decode(bytes: [u8; 32]) -> Result<Self, Error>
Decode a scalar from bytes, validating it is a canonical element of $\mathbb{Z}_\ell$.
Sourcepub fn public_key(&self) -> DHPublicKey
pub fn public_key(&self) -> DHPublicKey
Derive the public key $[sk] B$.
Trait Implementations§
Source§impl Clone for DHPrivateKey
impl Clone for DHPrivateKey
Source§fn clone(&self) -> DHPrivateKey
fn clone(&self) -> DHPrivateKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DHPrivateKey
impl RefUnwindSafe for DHPrivateKey
impl Send for DHPrivateKey
impl Sync for DHPrivateKey
impl Unpin for DHPrivateKey
impl UnsafeUnpin for DHPrivateKey
impl UnwindSafe for DHPrivateKey
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