w3f_bls::single

Struct SecretKeyVT

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

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

Tuple Fields§

§0: E::Scalar

Implementations§

Source§

impl<E: EngineBLS> SecretKeyVT<E>

Source

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

Generate a secret key without side channel protections.

Source

pub fn from_seed(seed: &[u8]) -> Self

Source§

impl<E: EngineBLS> SecretKeyVT<E>

Source

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

Sign without side channel protections from key mutation.

Source

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

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

Source

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

Convert into a SecretKey applying side channel protections.

Source

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

Derive our public key from our secret key

Trait Implementations§

Source§

impl<E: EngineBLS> CanonicalDeserialize for SecretKeyVT<E>

Source§

fn deserialize_with_mode<R: Read>( reader: R, compress: Compress, validate: Validate, ) -> Result<Self, SerializationError>

The general deserialize method that takes in customization flags.
Source§

fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>
where R: Read,

Source§

fn deserialize_compressed_unchecked<R>( reader: R, ) -> Result<Self, SerializationError>
where R: Read,

Source§

fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>
where R: Read,

Source§

fn deserialize_uncompressed_unchecked<R>( reader: R, ) -> Result<Self, SerializationError>
where R: Read,

Source§

impl<E: EngineBLS> CanonicalSerialize for SecretKeyVT<E>

Source§

fn serialize_with_mode<W: Write>( &self, writer: W, compress: Compress, ) -> Result<(), SerializationError>

The general serialize method that takes in customization flags.
Source§

fn serialized_size(&self, compress: Compress) -> usize

Source§

fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>
where W: Write,

Source§

fn compressed_size(&self) -> usize

Source§

fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>
where W: Write,

Source§

fn uncompressed_size(&self) -> usize

Source§

impl<E: EngineBLS, H: DynDigest + Default + Clone> ChaumPedersenSigner<E, H> for SecretKeyVT<E>

Source§

fn generate_cp_signature( &mut self, message: &Message, ) -> ChaumPedersenSignature<E>

The proof of possession generator is supposed to to produce a schnoor signature of the message using the secret key which it claim to possess.
Source§

fn generate_dleq_proof( &mut self, message: &Message, bls_signature: E::SignatureGroup, ) -> SchnorrProof<E>

Source§

fn generate_witness_scaler( &self, message_point_as_bytes: &Vec<u8>, ) -> <<E as EngineBLS>::PublicKeyGroup as Group>::ScalarField

Source§

impl<E: EngineBLS> Clone for SecretKeyVT<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 SecretKeyVT<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
Source§

impl<E: EngineBLS> SerializableToBytes for SecretKeyVT<E>

Source§

const SERIALIZED_BYTES_SIZE: usize = E::SECRET_KEY_SIZE

Source§

fn to_bytes(&self) -> Vec<u8>

Source§

fn from_bytes(bytes: &[u8]) -> Result<Self, SerializationError>

Source§

impl<E: EngineBLS> Valid for SecretKeyVT<E>

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( batch: impl Iterator<Item = &'a Self> + Send, ) -> Result<(), SerializationError>
where Self: 'a,

Auto Trait Implementations§

§

impl<E> Freeze for SecretKeyVT<E>
where <E as EngineBLS>::Scalar: Freeze,

§

impl<E> RefUnwindSafe for SecretKeyVT<E>

§

impl<E> Send for SecretKeyVT<E>

§

impl<E> Sync for SecretKeyVT<E>

§

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

§

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

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> CanonicalSerializeHashExt for T

Source§

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

Source§

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

🔬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