[][src]Struct secret_sharing::pedersen_dvss::PedersenDVSSParticipant

pub struct PedersenDVSSParticipant {
    pub id: usize,
    pub secret: FieldElement,
    pub comm_coeffs: HashMap<usize, G1>,
    pub s_shares: HashMap<usize, FieldElement>,
    pub t_shares: HashMap<usize, FieldElement>,
    pub final_comm_coeffs: HashMap<usize, G1>,
    pub secret_share: FieldElement,
    // some fields omitted
}

Fields

id: usizesecret: FieldElementcomm_coeffs: HashMap<usize, G1>s_shares: HashMap<usize, FieldElement>t_shares: HashMap<usize, FieldElement>final_comm_coeffs: HashMap<usize, G1>secret_share: FieldElement

Methods

impl PedersenDVSSParticipant[src]

pub fn new(id: usize, threshold: usize, total: usize, g: &G1, h: &G1) -> Self[src]

Generates a new secret and verifiable shares of that secret for every participant

pub fn received_share(
    &mut self,
    sender_id: usize,
    comm_coeffs: HashMap<usize, G1>,
    share: (FieldElement, FieldElement),
    threshold: usize,
    total: usize,
    g: &G1,
    h: &G1
)
[src]

Called by a participant when it receives a share from another participant with id sender_id

pub fn compute_final_comm_coeffs_and_shares(
    &mut self,
    threshold: usize,
    total: usize,
    g: &G1,
    h: &G1
)
[src]

Called by a participant when it has received shares from all participants. Computes the final share of the distributed secret

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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<V, T> VZip<V> for T where
    V: MultiLane<T>,