DirtyKeyInfo

Struct DirtyKeyInfo 

Source
pub struct DirtyKeyInfo<E: Curve> {
    pub curve: CurveName<E>,
    pub shared_public_key: NonZero<Point<E>>,
    pub public_shares: Vec<NonZero<Point<E>>>,
    pub vss_setup: Option<VssSetup<E>>,
    pub chain_code: Option<ChainCode>,
}
Expand description

Public Key Info

Contains public information about the TSS key, including shared public key, commitments to secret shares and etc.

Fields§

§curve: CurveName<E>

Guard that ensures curve consistency for deseraization

§shared_public_key: NonZero<Point<E>>

Public key corresponding to shared secret key. Corresponds to X in paper.

§public_shares: Vec<NonZero<Point<E>>>

Public shares of all signers sharing the key

public_shares[i] corresponds to public share (or public commitment) of $\ith$ party.

§vss_setup: Option<VssSetup<E>>

Verifiable secret sharing setup, present if key was generated using VSS scheme

§chain_code: Option<ChainCode>
Available on crate feature hd-wallet only.

Chain code associated with the key, if HD wallets support was enabled

Implementations§

Source§

impl<E: Curve> DirtyKeyInfo<E>

Source

pub fn share_preimage(&self, j: u16) -> Option<NonZero<Scalar<E>>>

Returns share preimage associated with j-th signer

  • For additive shares, share preimage is defined as j+1
  • For VSS-shares, share preimage is scalar $I_j$ such that $x_j = F(I_j)$ where $F(x)$ is polynomial co-shared by the signers and $x_j$ is secret share of j-th signer

Note: if you have no idea what it is, probably you don’t need it.

Source§

impl<E: Curve> DirtyKeyInfo<E>

Source

pub fn is_hd_wallet(&self) -> bool

Available on crate feature hd-wallet only.

Checks whether the key is HD-capable

Source

pub fn extended_public_key(&self) -> Option<ExtendedPublicKey<E>>

Available on crate feature hd-wallet only.

Returns extended public key, if HD support was enabled

Source

pub fn derive_child_public_key<Hd: HdWallet<E>, ChildIndex>( &self, derivation_path: impl IntoIterator<Item = ChildIndex>, ) -> Result<ExtendedPublicKey<E>, HdError<<ChildIndex as TryInto<NonHardenedIndex>>::Error>>
where NonHardenedIndex: TryFrom<ChildIndex>,

Available on crate feature hd-wallet only.

Derives child public key, if it’s HD key, using HdWallet algorithm

Trait Implementations§

Source§

impl<E: Curve> AsRef<DirtyKeyInfo<E>> for DirtyCoreKeyShare<E>

Source§

fn as_ref(&self) -> &DirtyKeyInfo<E>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<E: Clone + Curve> Clone for DirtyKeyInfo<E>

Source§

fn clone(&self) -> DirtyKeyInfo<E>

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<E: Debug + Curve> Debug for DirtyKeyInfo<E>

Source§

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

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

impl<'de, E: Curve> Deserialize<'de> for DirtyKeyInfo<E>

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<E> Digestable for DirtyKeyInfo<E>
where E: Digestable + Curve,

Source§

fn unambiguously_encode<B>(&self, encoder: EncodeValue<'_, B>)
where B: Buffer,

Unambiguously encodes the value
Source§

impl<E: Curve> Serialize for DirtyKeyInfo<E>

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<E: Curve> Validate for DirtyKeyInfo<E>

Source§

type Error = InvalidCoreShare

Validation error
Source§

fn is_valid(&self) -> Result<(), Self::Error>

Checks whether value is valid Read more
Source§

fn validate(self) -> Result<Valid<Self>, ValidateError<Self, Self::Error>>
where Self: Sized,

Validates the value Read more
Source§

fn validate_ref(&self) -> Result<&Valid<Self>, Self::Error>
where Self: Sized,

Validates the value by reference Read more

Auto Trait Implementations§

§

impl<E> Freeze for DirtyKeyInfo<E>
where <E as Curve>::Point: Freeze,

§

impl<E> RefUnwindSafe for DirtyKeyInfo<E>

§

impl<E> Send for DirtyKeyInfo<E>

§

impl<E> Sync for DirtyKeyInfo<E>

§

impl<E> Unpin for DirtyKeyInfo<E>

§

impl<E> UnwindSafe for DirtyKeyInfo<E>
where <E as Curve>::Point: UnwindSafe, E: UnwindSafe, <E as Curve>::Scalar: UnwindSafe,

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> Same for T

Source§

type Output = T

Should always be Self
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>,