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>
impl<E: EngineBLS> KeypairVT<E>
Sourcepub fn into_split<R: Rng>(&self, rng: R) -> Keypair<E>
pub fn into_split<R: Rng>(&self, rng: R) -> Keypair<E>
Convert into a SecretKey
applying side channel protections.
Sourcepub fn sign(&self, message: &Message) -> Signature<E>
pub fn sign(&self, message: &Message) -> Signature<E>
Sign a message creating a SignedMessage
using a user supplied CSPRNG for the key splitting.
Sourcepub fn signed_message(&self, message: &Message) -> SignedMessage<E>
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> DoublePublicKeyScheme<E> for KeypairVT<E>
impl<E: EngineBLS> DoublePublicKeyScheme<E> for KeypairVT<E>
Source§fn sign(&mut self, message: &Message) -> DoubleSignature<E>
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
fn into_public_key_in_signature_group(&self) -> PublicKeyInSignatureGroup<E>
Source§fn into_double_public_key(&self) -> DoublePublicKey<E>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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