Skip to main content

SigningPackage

Struct SigningPackage 

Source
pub struct SigningPackage<C: Ciphersuite> { /* private fields */ }
Expand description

Generated by the coordinator of the signing operation and distributed to each signing party

Implementations§

Source§

impl<C: Ciphersuite> SigningPackage<C>

Auto-generated by derive_getters::Getters.

Source

pub fn signing_commitments( &self, ) -> &BTreeMap<Identifier<C>, SigningCommitments<C>>

The set of commitments participants published in the first round of the protocol.

Source

pub fn message(&self) -> &Vec<u8>

Message which each participant will sign.

Each signer should perform protocol-specific verification on the message.

Source§

impl<C> SigningPackage<C>
where C: Ciphersuite,

Source

pub fn new( signing_commitments: BTreeMap<Identifier<C>, SigningCommitments<C>>, message: &[u8], ) -> SigningPackage<C>

Create a new SigningPackage

The signing_commitments are sorted by participant identifier.

Source

pub fn signing_commitment( &self, identifier: &Identifier<C>, ) -> Option<SigningCommitments<C>>

Get a signing commitment by its participant identifier, or None if not found.

Source

pub fn binding_factor_preimages( &self, verifying_key: &VerifyingKey<C>, additional_prefix: &[u8], ) -> Result<Vec<(Identifier<C>, Vec<u8>)>, Error<C>>

Available on crate feature internals only.

Compute the preimages to H1 to compute the per-signer binding factors

Source§

impl<C> SigningPackage<C>
where C: Ciphersuite,

Source

pub fn serialize(&self) -> Result<Vec<u8>, Error<C>>

Available on crate feature serialization only.

Serialize the struct into a Vec.

Source

pub fn deserialize(bytes: &[u8]) -> Result<Self, Error<C>>

Available on crate feature serialization only.

Deserialize the struct from a slice of bytes.

Trait Implementations§

Source§

impl<C: Clone + Ciphersuite> Clone for SigningPackage<C>

Source§

fn clone(&self) -> SigningPackage<C>

Returns a duplicate 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<C: Debug + Ciphersuite> Debug for SigningPackage<C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, C> Deserialize<'de> for SigningPackage<C>
where C: Ciphersuite,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<C: PartialEq + Ciphersuite> PartialEq for SigningPackage<C>

Source§

fn eq(&self, other: &SigningPackage<C>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<C> Serialize for SigningPackage<C>
where C: Ciphersuite,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<C: Eq + Ciphersuite> Eq for SigningPackage<C>

Source§

impl<C: Ciphersuite> StructuralPartialEq for SigningPackage<C>

Auto Trait Implementations§

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,