Struct KeypairVT

Source
pub struct KeypairVT<E: EngineBLS> {
    pub secret: SecretKeyVT<E>,
    pub public: PublicKey<E>,
}
Expand description

BLS Keypair

We create Signed messages with a Keypair to avoid recomputing the public key, which usually takes longer than signing when the public key group is G2.2

We provide constant-time signing using key splitting.

Fields§

§secret: SecretKeyVT<E>§public: PublicKey<E>

Implementations§

Source§

impl<E: EngineBLS> KeypairVT<E>

Source

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

Generate a Keypair

Source§

impl<E: EngineBLS> KeypairVT<E>

Source

pub fn into_split<R: Rng>(&self, rng: R) -> Keypair<E>

Convert into a SecretKey applying side channel protections.

Source

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

Sign a message creating a SignedMessage using a user supplied CSPRNG for the key splitting.

Source

pub fn signed_message(&self, message: &Message) -> SignedMessage<E>

Sign a message creating a SignedMessage using a user supplied CSPRNG for the key splitting.

Trait Implementations§

Source§

impl<E: EngineBLS> Clone for KeypairVT<E>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<E: EngineBLS> DoublePublicKeyScheme<E> for KeypairVT<E>

Source§

fn sign(&mut self, message: &Message) -> DoubleSignature<E>

Sign a message using a Seedabale RNG created from a seed derived from the message and key

Source§

fn into_public_key_in_signature_group(&self) -> PublicKeyInSignatureGroup<E>

Source§

fn into_double_public_key(&self) -> DoublePublicKey<E>

Return a double public object containing public keys both in G1 and G2

Auto Trait Implementations§

§

impl<E> Freeze for KeypairVT<E>

§

impl<E> RefUnwindSafe for KeypairVT<E>

§

impl<E> Send for KeypairVT<E>

§

impl<E> Sync for KeypairVT<E>

§

impl<E> Unpin for KeypairVT<E>

§

impl<E> UnwindSafe for KeypairVT<E>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V