ZIP: 312 Title: FROST for Spend Authorization Multisignatures Owners: Conrado Gouvea <conrado@zfnd.org> Chelsea Komlo <ckomlo@uwaterloo.ca> Deirdre Connolly <deirdre@zfnd.org> Status: Draft Category: Wallet Created: 2022-08-dd License: MIT Discussions-To: <https://github.com/zcash/zips/issues/382> Pull-Request: <https://github.com/zcash/zips/pull/662>
{Edit this to reflect the key words that are actually used.} The key words "MUST", "MUST NOT", "SHOULD", and "MAY" in this document are to be interpreted as described in RFC 2119. 2
The terms below are to be interpreted as follows:
This proposal adapts FROST 3, a threshold signature scheme, to make it unlinkable, which is a requirement for its use in the Zcash protocol. The adapted scheme generates signatures compatible with spend authorization signatures in the Sapling and Orchard shielded protocols as deployed in Zcash.
In the Zcash protocol, Spend Authorization Signatures are employed to authorize a transaction. The ability to generate these signatures with the user's private key is what effectively allows the user to spend funds.
This is a security-critical step, since anyone who obtains access to the private key will be able to spend the user's funds. For this reason, one interesting possibility is to require multiple parties to allow the transaction to go through. This can be accomplished with threshold signatures, where the private key is split between parties (or generated already split using a distributed protocol) in a way that a threshold (e.g. 2 out of 3) of them must sign the transaction in order to create the final signature. This enables scenarios such as users and third-party services sharing custody of a wallet, or a group of people managing shared funds, for example.
FROST is one of such threshold signature protocols. However, it can't be used as-is since the Zcash protocol also requires re-randomizing public and private keys to ensure unlinkability between transactions. This ZIP specifies a variant of FROST with re-randomization support. This variant is named "Re-Randomized FROST" and has been described in 4.
In normal usage, a Zcash user follows multiple steps in order to generate a shielded transaction:
When employing re-randomizable FROST as specified in this ZIP, the goal is to split the spend authorization private key \(\mathsf{ask}\) among multiple possible signers. This means that the proof generation will still be performed by a single participant, likely the one that created the transaction in the first place. Note that this user already controls the privacy of the transaction since they are responsible for creating the proof.
This fits well into the "Coordinator" role from the FROST specification 5. The Coordinator is responsible for sending the message to be signed to all participants, and to aggregate the signature shares.
With those considerations in mind, the threat model considered in this ZIP is:
MIN_PARTICIPANTS
participants, as specified in FROST.Algorithms in this section are specified using Python pseudo-code, in the same fashion as the FROST specification 3.
The types Scalar, Element, and G are defined in 7, as well as the notation for elliptic-curve arithmetic, which uses the additive notation. Note that this notation differs from that used in the Zcash Protocol Specification. For example, G.ScalarMult(P, k)
is used for scalar multiplication, where the protocol spec would use
\([k] P\)
with the group implied by
\(P\)
.
An additional per-ciphersuite hash function is used, denote HR(m)
, which receives an arbitrary-sized byte string and returns a Scalar. It is defined concretely in the Ciphersuites section.
While key generation is out of scope for this ZIP and the FROST spec 3, it needs to be consistent with FROST, see 9 for guidance. The spend authorization private key \(\mathsf{ask}\) 14 is the particular key that must be used in the context of this ZIP. Note that the \(\mathsf{ask}\) is usually derived from the spending key \(\mathsf{sk}\) , though that is not required. Not doing so allows using distributed key generation, since the key it generates is unpredictable. Note however that not deriving \(\mathsf{ask}\) from \(\mathsf{sk}\) prevents using seed phrases to recover the original secret (which may be something desirable in the context of FROST).
To add re-randomization to FROST, follow the specification 3 with the following modifications.
A new helper function is defined, which generates a randomizer. The encode_signing_package is defined as the byte serialization of the msg, commitment_list values as described in 11. Implementations MAY choose another encoding as long as all values (the message, and the identifier, binding nonce and hiding nonce for each participant) are unambiguously encoded.
The function random_bytes(n) is defined in 3 and it returns a buffer with n bytes sampled uniformly at random. The constant Ns is also specified in 3 and is the size of a serialized scalar.
randomizer_generate(): Inputs: - msg, the message being signed in the current FROST signing run - commitment_list = [(i, hiding_nonce_commitment_i, binding_nonce_commitment_i), ...], a list of commitments issued by each participant, where each element in the list indicates a NonZeroScalar identifier i and two commitment Element values (hiding_nonce_commitment_i, binding_nonce_commitment_i). This list MUST be sorted in ascending order by identifier. Outputs: randomizer, a Scalar def randomizer_generate(msg, commitment_list): # Generate a random byte buffer with the size of a serialized scalar rng_randomizer = random_bytes(Ns) signing_package_enc = encode_signing_package(commitment_list, msg) randomizer_input = rng_randomizer || signing_package_enc return HR(randomizer_input)
Roune One is exactly the same as specified 3. But for context, it involves these steps:
This ciphersuite uses Jubjub for the Group and BLAKE2b-512 for the Hash function H
meant to produce signatures indistinguishable from RedJubjub Sapling Spend Authorization Signatures as specified in 13.
G.Order()
- 1]. Refer to {{frost-randomscalar}} for implementation guidance.G.Order()
- 1].H
): BLAKE2b-512 1 (BLAKE2b with 512-bit output and 16-byte personalization string), and Nh = 64.
G.Order()
.G.Order()
. (This is equivalent to
\(\mathsf{H}^\circledast(m)\)
, as defined by the
\(\mathsf{RedJubjub}\)
scheme instantiated in 12.)G.Order()
.G.Order()
.Signature verification is as specified in 13 for RedJubjub.
This ciphersuite uses Pallas for the Group and BLAKE2b-512 for the Hash function H
meant to produce signatures indistinguishable from RedPallas Orchard Spend Authorization Signatures as specified in 13.
G.Order()
- 1]. Refer to {{frost-randomscalar}} for implementation guidance.G.Order()
- 1].H
): BLAKE2b-512 1 (BLAKE2b with 512-bit output and 16-byte personalization string), and Nh = 64.
G.Order()
.G.Order()
. (This is equivalent to
\(\mathsf{H}^\circledast(m)\)
, as defined by the
\(\mathsf{RedPallas}\)
scheme instantiated in 12.)G.Order()
.G.Order()
.Signature verification is as specified in 13 for RedPallas.
FROST is a threshold Schnorr signature scheme, and Zcash Spend Authorization are also Schnorr signatures, which allows the usage of FROST with Zcash. However, since there is no widespread standard for Schnorr signatures, it must be ensured that the signatures generated by the FROST variant specified in this ZIP can be verified successfully by a Zcash implementation following its specification. In practice this entails making sure that the generated signature can be verified by the \(\mathsf{RedDSA.Validate}\) function specified in 12:
r
(and thus R
) will not be generated as specified in RedDSA.Sign. This is not an issue however, since with Schnorr signatures it does not matter for the verifier how the r
value was chosen, it just needs to be generated uniformly at random, which is true for FROST.The second step is adding the re-randomization functionality so that each FROST signing generates a re-randomized signature:
R
value from the signature is not influenced by the randomizer so we just need to focus on the z
value (using FROST notation). Recall that z
must equal to r + (c * sk)
, and that each signature share is z_i = (hiding_nonce + (binding_nonce * binding_factor)) +
(lambda_i * c * sk_i)
. The first terms are not influenced by the randomizer so we can only look into the second term of each top-level addition, i.e. c
* sk
must be equal to sum(lambda_i * c * sk_i)
for each participant i
. Under re-randomization these become c * (sk + randomizer)
(see
\(\mathsf{RedDSA.RandomizedPrivate}\)
, which refers to the randomizer as
\(\alpha\)
) and sum(lambda_i * c * (sk_i + randomizer))
. The latter can be rewritten as c * (sum(lambda_i * sk_i) + randomizer *
sum(lambda_i)
. Since sum(lambda_i * sk_i) == sk
per the Shamir secret sharing mechanism used by FROST, and since sum(lambda_i) == 1
18, we arrive at c * (sk + randomizer)
as required.randomizer_generate
generates randomizer uniformly at random as required by
\(\mathsf{RedDSA.GenRandom}\)
; and signature generation is compatible with
\(\mathsf{RedDSA.RandomizedPrivate}\)
,
\(\mathsf{RedDSA.RandomizedPublic}\)
,
\(\mathsf{RedDSA.Sign}\)
and
\(\mathsf{RedDSA.Validate}\)
as explained in the previous item.The security of Re-Randomized FROST with respect to the security assumptions of regular FROST is shown in 4.
The reddsa crate 17 contains a re-randomized FROST implementation of both ciphersuites.
1 | BLAKE2: simpler, smaller, fast as MD5 |
---|
2 | RFC 2119: Key words for use in RFCs to Indicate Requirement Levels |
---|
3 | RFC 9591: The Flexible Round-Optimized Schnorr Threshold (FROST) Protocol for Two-Round Schnorr Signatures |
---|
4 | Re-Randomized FROST |
---|
5 | RFC 9591: The Flexible Round-Optimized Schnorr Threshold (FROST) Protocol for Two-Round Schnorr Signatures. Section 5: Two-Round FROST Signing Protocol |
---|
6 | RFC 9591: The Flexible Round-Optimized Schnorr Threshold (FROST) Protocol for Two-Round Schnorr Signatures. Section 7.3: Removing the Coordinator Role |
---|
7 | RFC 9591: The Flexible Round-Optimized Schnorr Threshold (FROST) Protocol for Two-Round Schnorr Signatures. Section 3.1: Prime-Order Group |
---|
8 | RFC 9591: The Flexible Round-Optimized Schnorr Threshold (FROST) Protocol for Two-Round Schnorr Signatures. Appendix B: Schnorr Signature Generation and Verification for Prime-Order Groups |
---|
9 | RFC 9591: The Flexible Round-Optimized Schnorr Threshold (FROST) Protocol for Two-Round Schnorr Signatures. Appendix B: Trusted Dealer Key Generation |
---|
10 | RFC 9591: The Flexible Round-Optimized Schnorr Threshold (FROST) Protocol for Two-Round Schnorr Signatures. Appendix C: Random Scalar Generation |
---|
11 | The ZF FROST Book, Serialization Format |
---|
12 | Zcash Protocol Specification, Version 2022.3.4 [NU5]. Section 5.4.7: RedDSA, RedJubjub, and RedPallas |
---|
13 | Zcash Protocol Specification, Version 2022.3.4 [NU5]. Section 5.4.7.1: Spend Authorization Signature (Sapling and Orchard) |
---|
14 | Zcash Protocol Specification, Version 2022.3.4 [NU5]. Section 4.15: Spend Authorization Signature (Sapling and Orchard) |
---|
15 | Zcash Protocol Specification, Version 2022.3.4 [NU5]. Section 5.4.9.3: Jubjub |
---|
16 | Zcash Protocol Specification, Version 2022.3.4 [NU5]. Section 5.4.9.6: Pallas and Vesta |
---|
17 | reddsa |
---|
18 | Prove that the sum of the Lagrange (interpolation) coefficients is equal to 1 |
---|