[−][src]Struct elgamal_ristretto::SecretKey
Secret key is a scalar forming the public Key.
Methods
impl SecretKey
[src]
pub fn new<T: Rng + CryptoRng>(csprng: &mut T) -> Self
[src]
Create new SecretKey
pub fn decrypt(&self, ciphertext: Ciphertext) -> RistrettoPoint
[src]
Decrypt ciphertexts
pub fn sign(&self, message: RistrettoPoint) -> (Scalar, RistrettoPoint)
[src]
Sign a message using EdDSA algorithm.
pub fn prove_knowledge(&self) -> CompactProof
[src]
Proof Knowledge of secret key
Trait Implementations
impl Drop for SecretKey
[src]
Overwrite secret key material with null bytes.
impl<'a> From<&'a SecretKey> for PublicKey
[src]
fn from(secret: &'a SecretKey) -> PublicKey
[src]
Given a secret key, compute its corresponding Public key
impl Clone for SecretKey
[src]
impl Debug for SecretKey
[src]
impl<'a, 'b> Mul<&'b Scalar> for &'a SecretKey
[src]
type Output = Scalar
The resulting type after applying the *
operator.
fn mul(self, other: &'b Scalar) -> Scalar
[src]
impl<'b> Mul<&'b Scalar> for SecretKey
[src]
type Output = Scalar
The resulting type after applying the *
operator.
fn mul(self, rhs: &'b Scalar) -> Scalar
[src]
impl<'a> Mul<Scalar> for &'a SecretKey
[src]
type Output = Scalar
The resulting type after applying the *
operator.
fn mul(self, rhs: Scalar) -> Scalar
[src]
impl Mul<Scalar> for SecretKey
[src]
Auto Trait Implementations
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnwindSafe for SecretKey
impl RefUnwindSafe for SecretKey
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self