[−][src]Struct bls_like::single::SignedMessage
Message with attached BLS signature
Fields
message: Message
publickey: 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.
fn messages_and_publickeys(self) -> Self::PKnM
[src]
fn signature(&self) -> Signature<E>
[src]
fn verify(self) -> bool
[src]
impl<E: EngineBLS> Eq for SignedMessage<E>
[src]
impl<E: EngineBLS> PartialEq<SignedMessage<E>> for SignedMessage<E>
[src]
fn eq(&self, other: &Self) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<E: Clone + EngineBLS> Clone for SignedMessage<E>
[src]
fn clone(&self) -> 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,
<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,
<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,
<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,
<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,
<E as EngineBLS>::PublicKeyGroup: UnwindSafe,
<E as EngineBLS>::SignatureGroup: UnwindSafe,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self