[][src]Struct bls_like::single::SecretKeyVT

pub struct SecretKeyVT<E: EngineBLS>(pub E::Scalar);

Secret signing key lacking the side channel protections from key splitting. Avoid using directly in production.

Methods

impl<E: EngineBLS> SecretKeyVT<E>[src]

pub fn to_repr(&self) -> <E::Scalar as PrimeField>::Repr[src]

Convert our secret key to its representation type, which satisfies both AsRef<[u64]> and ff::PrimeFieldRepr. We suggest ff::PrimeFieldRepr::write_le for serialization, invoked by our write method.

pub fn write<W: Write>(&self, writer: W) -> Result<()>[src]

pub fn from_repr(
    repr: <E::Scalar as PrimeField>::Repr
) -> Result<Self, PrimeFieldDecodingError>
[src]

Convert our secret key from its representation type, which satisfies Default, AsMut<[u64]>, and ff::PrimeFieldRepr. We suggest ff::PrimeFieldRepr::read_le for deserialization, invoked via our read method, which requires a seperate call.

pub fn read<R: Read>(reader: R) -> Result<<E::Scalar as PrimeField>::Repr>[src]

pub fn generate<R: Rng>(rng: R) -> Self[src]

Generate a secret key without side channel protections.

pub fn sign(&self, message: Message) -> Signature<E>[src]

Sign without side channel protections from key mutation.

pub fn into_split_dirty(&self) -> SecretKey<E>[src]

Convert into a SecretKey that supports side channel protections, but does not itself resplit the key.

pub fn into_split<R: Rng>(&self, rng: R) -> SecretKey<E>[src]

Convert into a SecretKey applying side channel protections.

pub fn into_public(&self) -> PublicKey<E>[src]

Derive our public key from our secret key

Trait Implementations

impl<E: EngineBLS> Clone for SecretKeyVT<E>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<E> Send for SecretKeyVT<E> where
    <E as EngineBLS>::Scalar: Send

impl<E> Unpin for SecretKeyVT<E> where
    <E as EngineBLS>::Scalar: Unpin

impl<E> Sync for SecretKeyVT<E> where
    <E as EngineBLS>::Scalar: Sync

impl<E> UnwindSafe for SecretKeyVT<E> where
    <E as EngineBLS>::Scalar: UnwindSafe

impl<E> RefUnwindSafe for SecretKeyVT<E> where
    <E as EngineBLS>::Scalar: RefUnwindSafe

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<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