Expand description
In-process synchronous driver for CMP20 DKG and signing.
Thin wrapper over confium_tc::inprocess that names the CMP20
schemes and pulls the joint public key out of the first share. All
multi-round routing logic lives in the framework driver; this module
is intentionally short.
§Output wire format
keygen returns (shares, public_key) where:
shares[i]is the opaqueCmp20Share::to_bytes()encoding for partyi(71 bytes: magic[4] | version[1] | x_i[32] | X[33] | idx[1]).public_keyis the 33-byte SEC1 compressed encoding of the joint P-256 point.
sign returns a 64-byte r || s ECDSA signature. Verify it with
the [p256::ecdsa] crate’s VerifyingKey::verify.
§Security note
The underlying CMP20 crate’s MtA sub-round is a simplified in-clear
stub. This driver inherits that property. See
crate::mta for the gap.
Structs§
- Keygen
Output - Outcome of a single CMP20 DKG run: N share blobs plus the joint public key.
Functions§
- decode_
public_ key - Decode a 33-byte SEC1 compressed P-256 point. Public so bindings can verify the DKG-produced joint public key out-of-band.
- keygen
- Drive the CMP20 non-interactive DKG in-process for
party_countparties at thresholdthreshold. - sign
- Drive a CMP20 signing session in-process using
share_blobs(each aCmp20Share::to_bytes()blob from a previouskeygen) at thresholdthreshold. Returns the 64-byte(r, s)ECDSA signature. - sign_
batch - Sign
messages.len()messages against the same joint key without re-running DKG. Reuses the sameshare_blobsfor every message.