pub struct TrustedDealer { /* private fields */ }Expand description
WARNING: Testing/development only. Do not use in production.
The trusted dealer approach generates the full private key on a single machine during key generation, which creates a single point of compromise. If that machine is breached during generation, all funds are at risk.
For production use, use distributed key generation (keep frost network dkg) where each
participant contributes entropy independently and the full private key is never computed
or exists on any single device.
Implementations§
Source§impl TrustedDealer
impl TrustedDealer
Sourcepub fn new(config: ThresholdConfig) -> Self
pub fn new(config: ThresholdConfig) -> Self
Create a new trusted dealer.
Sourcepub fn generate(
&self,
name: &str,
) -> Result<(Vec<SharePackage>, PublicKeyPackage)>
pub fn generate( &self, name: &str, ) -> Result<(Vec<SharePackage>, PublicKeyPackage)>
Generate a new threshold key and split into shares.
Returns (share packages, public key package).
Sourcepub fn split_existing(
&self,
secret: &[u8; 32],
name: &str,
) -> Result<(Vec<SharePackage>, PublicKeyPackage)>
pub fn split_existing( &self, secret: &[u8; 32], name: &str, ) -> Result<(Vec<SharePackage>, PublicKeyPackage)>
Split an existing secret key into threshold shares.
Auto Trait Implementations§
impl Forget for TrustedDealer
impl Freeze for TrustedDealer
impl Move for TrustedDealer
impl RefUnwindSafe for TrustedDealer
impl Send for TrustedDealer
impl Sync for TrustedDealer
impl Unpin for TrustedDealer
impl UnsafeUnpin for TrustedDealer
impl UnwindSafe for TrustedDealer
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