[][src]Struct bls_like::single::SignedMessage

pub struct SignedMessage<E: EngineBLS> {
    pub message: Message,
    pub publickey: PublicKey<E>,
    pub signature: Signature<E>,
}

Message with attached BLS signature

Fields

message: Messagepublickey: PublicKey<E>signature: Signature<E>

Methods

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

pub fn vrf_hash<H: Input>(&self, h: &mut H)[src]

Hash output from a BLS signature regarded as a VRF.

If you are not the signer then you must verify the VRF before calling this method.

If called with distinct contexts then outputs should be independent.

We incorporate both the input and output to provide the 2Hash-DH construction from Theorem 2 on page 32 in appendex C of "Ouroboros Praos: An adaptively-secure, semi-synchronous proof-of-stake blockchain" by Bernardo David, Peter Gazi, Aggelos Kiayias, and Alexander Russell.

pub fn make_bytes<Out: Default + AsMut<[u8]>>(&self, context: &[u8]) -> Out[src]

Raw bytes output from a BLS signature regarded as a VRF.

If you are not the signer then you must verify the VRF before calling this method.

If called with distinct contexts then outputs should be independent.

pub fn make_chacharng(&self, context: &[u8]) -> ChaChaRng[src]

VRF output converted into a ChaChaRng.

If you are not the signer then you must verify the VRF before calling this method.

If called with distinct contexts then outputs should be independent. Independent output streams are available via ChaChaRng::set_stream too.

We incorporate both the input and output to provide the 2Hash-DH construction from Theorem 2 on page 32 in appendex C of "Ouroboros Praos: An adaptively-secure, semi-synchronous proof-of-stake blockchain" by Bernardo David, Peter Gazi, Aggelos Kiayias, and Alexander Russell.

Trait Implementations

impl<'a, E: EngineBLS> Signed for &'a SignedMessage<E>[src]

type E = E

type M = Message

type PKG = PublicKey<E>

type PKnM = Once<(Message, PublicKey<E>)>

Iterator over messages and public key reference pairs.

impl<E: EngineBLS> Eq for SignedMessage<E>[src]

impl<E: EngineBLS> PartialEq<SignedMessage<E>> for SignedMessage<E>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<E: Clone + EngineBLS> Clone for SignedMessage<E>[src]

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

Performs copy-assignment from source. Read more

impl<E: Debug + EngineBLS> Debug for SignedMessage<E>[src]

Auto Trait Implementations

impl<E> Sync for SignedMessage<E> where
    <E as EngineBLS>::PublicKeyGroup: Sync,
    <E as EngineBLS>::SignatureGroup: Sync

impl<E> Send for SignedMessage<E> where
    <E as EngineBLS>::PublicKeyGroup: Send,
    <E as EngineBLS>::SignatureGroup: Send

impl<E> Unpin for SignedMessage<E> where
    <E as EngineBLS>::PublicKeyGroup: Unpin,
    <E as EngineBLS>::SignatureGroup: Unpin

impl<E> RefUnwindSafe for SignedMessage<E> where
    <E as EngineBLS>::PublicKeyGroup: RefUnwindSafe,
    <E as EngineBLS>::SignatureGroup: RefUnwindSafe

impl<E> UnwindSafe for SignedMessage<E> where
    <E as EngineBLS>::PublicKeyGroup: UnwindSafe,
    <E as EngineBLS>::SignatureGroup: UnwindSafe

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> for 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