Digital Signature Scheme
We give a succinct summary of the cryptographic protocols used in the SDK:
- For ECDSA we use DKLs19.
- We used SoftSpokenOT to realize the functionality.
- We used MRR21 to realize the to realize endemic 1-out-of-2 base OT of batch size .
- For EdDSA we use FROST.
- For BIP-340 we use FROST.
- We use BLAKE3 official Rust crate as a pseudorandom generator/function.
What is a Digital Signature Scheme?
A digital signature scheme realizes, in a sense, classical (i.e. "non-digital", handwritten) signatures but with stronger security guarantees. Unlike classical signatures, we wish that only a certain entity who owns some secret key () to be able to authorize some message by producing a signature which can later be verified by any entity using a public key ().
More explicitly, a signature scheme is a set of three algorithms: such that:
- outputs a pair where is a secret key, held by the key generator while is a public key, that is, it is published to the public.
- is a method taking a secret key and a message and outputs a signature .
- is a method taking a public , a message and a signature and verifies whether was created by the owner of . If the verification succeeds it returns and if it fails it returns .
A signature scheme should be both correct and secure that is:
- Correctness means that a signature generated by an "honest" signer (i.e. a signer who knows the secret key ) should always be successfully verified. In mathmatical notation it means that for all output by and for all message we have:
- Security means that a malicious entity who doesn't know the secret key and wishes to sign some predetermined message should not be able to do this 1 even if it is being given signatures of other messages of its choice.2
Notice that the security guarantees do not hold against the scenario where the secret key falls into the hands of a malicious entity. This is a key reason to use Sodot MPC SDK.
Types of Digital Signature Schemes
Along the years a large number of digital signature schemes have been introduced and in the past few decades two main signature scheme have become prevalent in wide range of use cases:
- Elliptic Curve Digital Signature Algorithm (ECDSA)
- Edwards-curve Digital Signature Algorithm (EdDSA)
- Schnorr Digital Signature Algorithm (used for BIP-340)
Indeed, each of these schemes has its own triple of algorithms. We will not be elaborting on these two schemes here, the interested reader can follow the links above for futher reading.
While these two digital signature algorithms have similar names, they are very different from one another.
Sodot MPC SDK supports ECDSA, EdDSA and BIP-340 schemes.
What is a Threshold Signature Scheme?
As we've seen, the security of the signature scheme holds as long as the secret key is stored securely. But what does it even mean "securely" in this context? Well, the private key should be both secret and persistent.
- Secret in the sense that no malicious entity should be able to retrieve the key.
- Persistent in the sense that the entity who is eligible to use the key is indeed able to use it.
One way to ensure these two properties is by storing the secret key in a Hardware Security Module (HSM). This, however, introduces a single point of failure, as in the case of a loss or corruption of the HSM, the key material stored inside of it is lost. Another, more engineering-oriented argument against HSMs is that they introduce a scalability bottleneck as they possess limited processing capacity.
To address the issues above, cryptographers have come up with threshold signature schemes (TSS). These signature schemes operate in a distributed manner, between a set of clients with respect to a predetermined threshold where . Informally, the secret key is split between the clients such that any subset of at least of them is capable of signing any message.
Slightly more formally, we say a signature scheme is a threshold signature scheme if on top of the existing two additional algorithms are introduced:
- is a distributed algorithm between the clients resulting in a public key and secret key shares where client number holds .
- is a distributed algorithm taking place between clients with secret shared resulting in a signature on a message .
Similarly, we require both correctness and security:
- Correctness for every and every , and every public key and secret key shares generated by and every subset of secret shared and every message it holds that:
- Security every malicious entity holding less than secret shares should not be able to sign a predetermined message even if being given signatures of other messages of its choice.
The security guarantees of the TSS do not hold against the leakage of secret shares. Therefore, should be set sufficiently high.
Generating a valid signature is impossible if shares have been lost. Therefore, should be set not too close to .
How should be set with respect to ?
The above two notes result in a somewhat contradictory conclusion, that is:
- We want persistency, so we can't have as in this extreme case, the loss of a single key share implies inability to sign any message.
- We also want security, se we can't have as in this extreme case, the loss of a single key share implies loss of all security guarantees.
Therefore, setting somewhere in the middle makes most sense in practice.
Sodot MPC SDK supports ECDSA, EdDSA and BIP-340 TSS for all values of threshold and any number of participants .