[][src]Struct elgamal_ristretto::SecretKey

pub struct 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

pub fn prove_correct_decryption(
    &self,
    ciphertext: Ciphertext,
    message: RistrettoPoint
) -> CompactProof
[src]

Prove correct decryption (x), (A, B, H), (G) : A = (x * B), H = (x * G)

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.

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

type Output = Scalar

The resulting type after applying the * operator.

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

type Output = Scalar

The resulting type after applying the * operator.

impl Mul<Scalar> for SecretKey[src]

type Output = Scalar

The resulting type after applying the * operator.

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self