[][src]Struct ergo_lib::sigma_protocol::private_input::DlogProverInput

pub struct DlogProverInput {
    pub w: Scalar,
}

Secret key of discrete logarithm signature protocol

Fields

w: Scalar

secret key value

Implementations

impl DlogProverInput[src]

pub const SIZE_BYTES: usize[src]

Scalar(secret key) size in bytes

pub fn random() -> DlogProverInput[src]

generates random secret in the range [0, n), where n is DLog group order.

pub fn from_bytes(bytes: &[u8; 32]) -> Option<DlogProverInput>[src]

Attempts to parse the given byte array as an SEC-1-encoded scalar(secret key). Returns None if the byte array does not contain a big-endian integer in the range [0, modulus).

pub fn to_bytes(&self) -> [u8; 32][src]

byte representation of the underlying scalar

pub fn public_image(&self) -> ProveDlog[src]

public key of discrete logarithm signature protocol

Trait Implementations

impl Clone for DlogProverInput[src]

impl Debug for DlogProverInput[src]

impl From<DlogProverInput> for SecretKey[src]

impl From<Scalar> for DlogProverInput[src]

impl PartialEq<DlogProverInput> for DlogProverInput[src]

impl StructuralPartialEq for DlogProverInput[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

impl<F> TryExtractInto<F> for F[src]

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

type Error = Infallible

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<V, T> VZip<V> for T where
    V: MultiLane<T>,