pub struct Cmp20;Expand description
CMP20 threshold-ECDSA over P-256. Use for new threshold signing deployments; GG18 is provided for interop with existing systems.
Implementations§
Source§impl Cmp20
impl Cmp20
pub fn into_reference(val: Cmp20, env: Env) -> Result<Reference<Cmp20>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<Cmp20>>
Source§impl Cmp20
impl Cmp20
Sourcepub fn keygen(threshold: u32, party_count: u32) -> NapiResult<Cmp20Keygen>
pub fn keygen(threshold: u32, party_count: u32) -> NapiResult<Cmp20Keygen>
Run a non-interactive CMP20 DKG for party_count parties at
threshold threshold. Returns the per-party share blobs and
the joint SEC1-compressed public key.
Sourcepub fn sign(
shares: Vec<Buffer>,
threshold: u32,
message: Buffer,
) -> NapiResult<Buffer>
pub fn sign( shares: Vec<Buffer>, threshold: u32, message: Buffer, ) -> NapiResult<Buffer>
Threshold-sign message using shares (each a share blob from
a previous keygen call). Returns the 64-byte (r, s) signature.
Sourcepub fn sign_batch(
shares: Vec<Buffer>,
threshold: u32,
messages: Vec<Buffer>,
) -> NapiResult<Vec<Buffer>>
pub fn sign_batch( shares: Vec<Buffer>, threshold: u32, messages: Vec<Buffer>, ) -> NapiResult<Vec<Buffer>>
Sign N messages against the same joint key without re-running
DKG. See sign_batch in the Rust crate for performance notes.
Trait Implementations§
Source§impl FromNapiMutRef for Cmp20
impl FromNapiMutRef for Cmp20
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for Cmp20
impl FromNapiRef for Cmp20
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl FromNapiValue for &Cmp20
impl FromNapiValue for &Cmp20
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl FromNapiValue for &mut Cmp20
impl FromNapiValue for &mut Cmp20
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for Cmp20
impl ToNapiValue for Cmp20
Source§unsafe fn to_napi_value(env: napi_env, val: Cmp20) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Cmp20) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &Cmp20
impl ValidateNapiValue for &Cmp20
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut Cmp20
impl ValidateNapiValue for &mut Cmp20
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl Freeze for Cmp20
impl RefUnwindSafe for Cmp20
impl Send for Cmp20
impl Sync for Cmp20
impl Unpin for Cmp20
impl UnsafeUnpin for Cmp20
impl UnwindSafe for Cmp20
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