Spark FROST
Spark employs a customized version of the FROST (Flexible Round-Optimized Schnorr Threshold) signing scheme to enable transaction signing by a required participant alongside a threshold group of signers known as Signing Operators (SOs).
Problem Statement
In Spark, transactions require co-signing by a user and a group of Signing Operators (see SOs), together SOs make up that Spark Entity (SE). The signature must meet these requirements:
- Threshold Signing for SOs: Only out of total SOs are needed to complete the signing process.
- Mandatory User Signing: The user’s participation is essential for a valid signature.
- Single Schnorr Signature: The final signature must be aggregated into a single Schnorr signature, ruling out multi-signature schemes like 2-of-2. The final signature is the aggregate of the user’s signature and the SOs’ signatures, where the user is the required participant.
Additionally, the cryptographic keys must support:
- Tweakability: Keys can be modified by adding or multiplying a tweak value.
- Additive Aggregatability: Given all shards of two keys (e.g., key1 and key2), it must be possible to derive all shards for their sum (key1 + key2).
This document presents a modified FROST signing scheme tailored to address these needs in Spark.
Key Generation
User Key
The user independently generates a single key pair, denoted as , where is the secret key and is the corresponding public key.
SO Keys
The Signing Operators (SOs) collaboratively generate a threshold signing key pair, denoted as , using a Distributed Key Generation (DKG) protocol. Each SO receives a Shamir secret share of , configured with a threshold , meaning any of the SOs can reconstruct the key.
Note: Details of the secure DKG process are beyond the scope of this document. You can find more information in the FROST paper.
Key Aggregation
The user’s key and the SOs’ key are combined into an aggregated key using additive aggregation:
- The aggregated secret key is computed as .
- The corresponding public key is .
All participants must know the aggregated public key .
Pre-processing
Mirroring FROST’s pre-processing phase, all participants generate and commit to nonces:
- SO Nonces: Each SO generates nonce pairs and their commitments , where and , using a fixed generator .
- User Nonces: The user generates nonce pairs and commitments , sharing these commitments with all SOs.
These nonces enhance security during signing by preventing replay attacks.
Signing Flow
The signing process involves the user, a coordinator, and a subset of SOs, proceeding as follows:
-
Initiation:
- The user submits a signing request for message to a signing operator coordinator.
-
Participant and Nonce Selection:
- The coordinator selects a set of participating SOs.
- It compiles an unused nonce commitment list and broadcasts to all participants.
-
Signature Share Calculation by SOs:
- Each SO computes:
- , using a hash function .
- Nonce contribution: .
- Challenge: , where .
- Signature share: , where is the Lagrange coefficient for reconstructing .
- Each SO computes:
-
SO Signature Aggregation:
- The coordinator aggregates the SO shares: .
- It computes , validates the partial signature, and sends along with to the user.
-
User Signature Share Calculation:
- The user computes:
- (assuming user index 0).
- Nonce contribution: .
- Full nonce: .
- Challenge: .
- Signature share: .
- The user computes:
-
Final Signature:
- The user aggregates the final signature as , where .
Key Tweaks
The SO key is shared via Shamir secret sharing with the polynomial:
Each SO holds the share .
Additive Tweak
To tweak by adding (i.e., ):
- Define the new polynomial
- Update each share to
Multiplicative Tweak
For a multiplicative tweak by (i.e., ):
- Update each share to
Secure Tweak Distribution
Directly sharing with SOs risks key exposure if the sender is an SO or colludes with one. Instead:
- Construct a polynomial of degree where
- Distribute to each SO
- Each SO updates their share:
This method applies the tweak securely without revealing .
Key Split
When splitting a key into child keys (e.g., for transaction splitting), the property holds:
Here, and are the original user and SO keys, and and are the child keys.
Process
-
User Key Splitting:
- The user (Alice) generates key pairs for to
- Compute
- Calculate
-
Tweak Communication:
- The user sends to the SOs.
-
SO Key Splitting:
- The SOs use DKG to generate key pairs for to
- Set the -th key as
-
Verification:
- The sum of child keys is:
- Substituting :
-
Shard Adjustment:
- For SOs’ Shamir shares, the -th key’s share for SO is adjusted as: