pub struct KeyshareForRefresh {
pub rank_list: Vec<u8>,
pub threshold: u8,
pub public_key: ProjectivePoint,
pub s_i: Option<Scalar>,
pub x_i_list: Option<Vec<NonZeroScalar>>,
pub lost_keyshare_party_ids: Vec<u8>,
pub party_id: u8,
/* private fields */
}
Expand description
Keyshare for refresh of a party.
Fields§
§rank_list: Vec<u8>
Rank of each party
threshold: u8
Threshold value
public_key: ProjectivePoint
Public key of the generated key.
s_i: Option<Scalar>
set s_i to None if party_i lost their key_share
x_i_list: Option<Vec<NonZeroScalar>>
set s_i to None if party_i lost their key_share
list of participants ids who lost their key_shares, should be in range [0, n-1]
party_id: u8
Part ID from key share
Implementations§
Sourcepub fn new(
rank_list: Vec<u8>,
threshold: u8,
public_key: ProjectivePoint,
root_chain_code: [u8; 32],
s_i: Option<Scalar>,
x_i_list: Option<Vec<NonZeroScalar>>,
lost_keyshare_party_ids: Vec<u8>,
party_id: u8,
) -> Self
pub fn new( rank_list: Vec<u8>, threshold: u8, public_key: ProjectivePoint, root_chain_code: [u8; 32], s_i: Option<Scalar>, x_i_list: Option<Vec<NonZeroScalar>>, lost_keyshare_party_ids: Vec<u8>, party_id: u8, ) -> Self
Create new KeyshareForRefresh object.
§Warning
It is recommended to use KeyshareForRefresh::from_keyshare()
and KeyshareForRefresh::from_lost_keyshare()
instead.
This is for advanced usecases only.
Create KeyshareForRefresh struct from Keyshare
Create KeyshareForRefresh struct for the participant who lost their keyshare
Sourcepub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Serialize KeyshareForRefresh to bytes Used to send KeyshareForRefresh to other parties, for key-import
Sourcepub fn from_bytes(bytes: &[u8]) -> Option<Self>
pub fn from_bytes(bytes: &[u8]) -> Option<Self>
Deserialize KeyshareForRefresh from bytes
Trait Implementations§
Source§fn clone(&self) -> KeyshareForRefresh
fn clone(&self) -> KeyshareForRefresh
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more