Zcash ZIPs
Theme
Appearance
Contents

Unnumbered proposal

FROST Member Backup Strings for Shielded Zcash

Draft

Terminology

The key words “MUST”, “MUST NOT”, “SHOULD”, and “SHOULD NOT” in this document are to be interpreted as described in BCP 14 1 when, and only when, they appear in all capitals.

The terms “Mainnet” and “Testnet” in this document are to be interpreted as defined in the Zcash protocol specification 2.

The terms below are to be interpreted as follows:

Group

:A set of \(n\) participants holding a FROST threshold key for Orchard-protocol spend authorization 3, any \(t\) of whom can sign.

Member

:One participant of a group, identified by its FROST identifier.

Signing share

:The member’s secret share of the group’s Spend authorizing key, as output by key generation.

Group verifying key, \(\mathsf{ak}\)

:The FROST group public key, used as the Spend validating key \(\mathsf{ak}\) of the group’s Orchard full viewing key. Its encoding has a \(\tilde{y}\) bit of \(0\kern-0.05em\textsf{,}\) as § 4.2.3 of the protocol specification requires 4.

\(\mathsf{sk}\)

:The 32-byte value the members agree on during key generation, from which \(\mathsf{nk}\kern-0.05em\textsf{,}\) \(\mathsf{rivk}\) and, under ZIP 2005, \(\mathsf{qsk}\) and \(\mathsf{qk}\) are derived 5.

Derivation

:How \(\mathsf{nk}\) and \(\mathsf{rivk}\) are obtained from \(\mathsf{sk}\) and \(\mathsf{ak}\kern-0.05em\textsf{.}\) This ZIP knows two, defined in Derivations.

Member backup string

:The string defined in this ZIP.

Abstract

This ZIP defines a backup string for one member of a FROST group that spends shielded ZEC with Orchard-protocol keys (in the Orchard or Ironwood pool). The string holds the member’s identifier, the threshold, the group size, the member’s signing share and the group’s \(\mathsf{sk}\kern-0.05em\textsf{.}\) Together with the group’s unified full viewing key, it is enough to rebuild the member in any wallet that implements this ZIP, without the other members being online. Restoring checks the string against the viewing key, which both detects a string from another group and tells the wallet which key derivation the group uses.

Version 1 of the payload is byte-for-byte the zkfrost string that Zkool already ships, so existing backups stay valid.

The string is more sensitive than the signing share it carries: it also carries \(\mathsf{sk}\kern-0.05em\textsf{,}\) from which a holder can compute the group’s quantum spending key \(\mathsf{qsk}\) 6. It never appears on chain.

Motivation

Several wallets now offer FROST groups for shielded ZEC: Zkool, Zafe, Konclave, and the Zcash Foundation’s tools. Each one backs up its members in its own format, so a member can only restore their seat in the app that created it. In July 2026, Zkool’s author described the situation: “There is no standard for it. I choose a way that makes it restorable on Zkool only. One day, someone will write a ZIP.” 7

Since then, Zkool has moved to a minimal backup string (zkfrost, Zkool 6.35.0) that holds only what a member needs. This ZIP takes that string as its first version, so that:

ZIP 2005 adds a reason. To recover notes with the Recovery Protocol, “it is necessary to retain, or be able to rederive, \(\mathsf{sk}\kern-0.05em\textsf{,}\) and also to know whether \(\mathsf{use\_qsk}\) was used to derive the \(\mathsf{ivk}\) and addresses” 4. A backup format is where that knowledge has to live.

Privacy Implications

The string never leaves the member’s custody in normal use and is not published on chain, so this ZIP changes nothing for on-chain privacy.

Combined with the group’s unified full viewing key, a string gives no viewing capability beyond what that viewing key already gives. Without the viewing key, \(\mathsf{sk}\) yields \(\mathsf{nk}\) but not the incoming viewing key, which also depends on \(\mathsf{ak}\kern-0.05em\textsf{.}\) The string does reveal \(t\kern-0.05em\textsf{,}\) \(n\) and the member’s identifier.

A wallet that shows the string as a QR code exposes it to cameras and onlookers, as with any secret displayed on screen.

Requirements

Non-requirements

Specification

Derivations

Let \(\mathsf{H^{ask}}\kern-0.05em\textsf{,}\) \(\mathsf{H^{nk}}\kern-0.05em\textsf{,}\) \(\mathsf{H^{rivk}}\kern-0.05em\textsf{,}\) \(\mathsf{H^{qsk}}\kern-0.05em\textsf{,}\) \(\mathsf{H^{qk}}\) and \(\mathsf{H}^{\mathsf{rivk\_ext}}_{\mathsf{qk}}\) be as defined in § 4.2.3 of the protocol specification as updated by ZIP 2005 4.

ZIP 2005 derivation

:\(\mathsf{nk} = \mathsf{H^{nk}}(\mathsf{sk})\kern-0.05em\textsf{,}\) and \(\mathsf{rivk} = \mathsf{H}^{\mathsf{rivk\_ext}}_{\mathsf{qk}}(\mathsf{ak}, \mathsf{nk})\) where \(\mathsf{qk} = \mathsf{H^{qk}}(\mathsf{H^{qsk}}(\mathsf{sk}))\kern-0.05em\textsf{.}\) This is the \(\mathsf{use\_qsk} = \mathsf{true}\) branch that ZIP 2005 requires for FROST 5. Notes received by such a group are quantum recoverable.

Legacy derivation

:\(\mathsf{nk} = \mathsf{H^{nk}}(\mathsf{sk})\) and \(\mathsf{rivk} = \mathsf{H^{rivk}}(\mathsf{sk})\kern-0.05em\textsf{,}\) with the group verifying key as \(\mathsf{ak}\kern-0.05em\textsf{.}\) Zkool created groups this way before supporting ZIP 2005. Such a group follows neither branch of § 4.2.3

Encoding

A member backup string is the Bech32m 10 encoding of a payload, with the human-readable part zkfrost. As in ZIP 316 11, the length limit of Bech32m is not applied; a version 1 string is 123 characters long.

Encoders MUST produce lowercase strings. Decoders MUST accept a string that is entirely lowercase or entirely uppercase, and MUST reject a string in mixed case, as Bech32m requires. A wallet can still show the string in uppercase, for instance in a QR code (see Rationale), by converting it after encoding.

The human-readable part is the same on Mainnet and Testnet, and the payload names no network: the network is given by the unified full viewing key used to restore. A string paired with another group’s viewing key, on either network, fails the check in Restore.

Payload, version 1

Offset Size Field
0 1 format version, \(\mathtt{0x01}\)
1 1 member identifier \(i\)
2 1 threshold \(t\)
3 1 group size \(n\)
4 32 signing share
36 32 \(\mathsf{sk}\)

The member’s FROST identifier is the Pallas scalar with integer value \(i\kern-0.05em\textsf{.}\) The group size \(n\) is the number of members.

The signing share is the little-endian encoding of a Pallas scalar, as in the FROST(Pallas, BLAKE2b-512) ciphersuite 3. It MUST be the share that matches the \(\mathsf{ak}\) in the group’s viewing key. Key generation can output a group key with either \(\tilde{y}\) bit; when it is \(1\kern-0.05em\textsf{,}\) the group key and every share are negated. The reddsa crate does this at the end of its key generation, and frost-client does it after the DKG. An implementation that skips this step would export a wrong share for about half of all groups.

Decoding

A decoder MUST reject the string if any of the following holds:

Checking the version before the length lets a decoder report a string of a later version as unsupported rather than as corrupt.

Restore

The inputs are a member backup string and the group’s unified full viewing key. The viewing key MUST contain an Orchard component (typecode \(\mathtt{0x03}\) 11), which holds \(\mathsf{ak}\kern-0.05em\textsf{,}\) \(\mathsf{nk}\) and \(\mathsf{rivk}\kern-0.05em\textsf{.}\) Ironwood uses the same Orchard-protocol keys.

  1. Decode the string as above.
  2. Reject the string if \(\mathsf{sk}\) is not a valid Orchard spending key, that is if \(\mathsf{H^{ask}}(\mathsf{sk}) = 0\kern-0.05em\textsf{,}\) or if the signing share is not the canonical encoding of a Pallas scalar, or is zero. (A group’s \(\mathsf{ask}\) is not derived from \(\mathsf{sk}\kern-0.05em\textsf{;}\) the first check only keeps decoders in agreement with the validity rule for Orchard spending keys. The verifying share of a zero share is the identity, which ZIP 312 does not allow 3.)
  3. Take \(\mathsf{ak}\) from the viewing key. Compute \(\mathsf{nk}\) and \(\mathsf{rivk}\) under each derivation of Derivations.
  4. If the ZIP 2005 derivation gives the viewing key’s \(\mathsf{nk}\) and \(\mathsf{rivk}\kern-0.05em\textsf{,}\) the group follows the ZIP 2005 derivation. Otherwise, if the legacy derivation does, the group follows the legacy derivation. Otherwise the wallet MUST reject the string: it belongs to another group.
  5. Rebuild the member’s key material from the identifier, the signing share, the threshold \(t\) and \(\mathsf{ak}\) as the group verifying key. If the wallet knows the group’s verifying shares, it SHOULD check that the member’s verifying share matches.

A wallet SHOULD tell the user which derivation was found, and SHOULD warn when it is the legacy one, whose notes are not quantum recoverable.

The check in step 4 proves that the viewing key was derived from the string’s \(\mathsf{sk}\kern-0.05em\textsf{,}\) not that its \(\mathsf{ak}\) is the group’s (see Security Considerations). Before it shows an address to receive funds, a wallet SHOULD check the viewing key against a source the member trusts, such as the export made with its own string (see Export), an address of the group that the member recorded before and that the viewing key gives, or the same viewing key obtained from at least two other members. A member that lost its device may have lost its export too, and then has to ask the others for the key, which is the case the attack needs: if one of the members it asks is honest, a forged key shows up as a mismatch.

After the restore, the wallet MUST retain \(\mathsf{sk}\) when the group follows the ZIP 2005 derivation. ZIP 2005 makes \(\mathsf{qsk}\kern-0.05em\textsf{,}\) which is derived from \(\mathsf{sk}\kern-0.05em\textsf{,}\) essential for recovering the group’s notes once the current Orchard protocol is disabled 5, and the signing share and viewing key alone do not give it. A wallet SHOULD also retain \(\mathsf{sk}\) for a legacy group, since without it the member cannot export its string again.

A restored member holds no signing nonces. It MUST generate fresh ones for its next signing session.

The check in step 4 proves \(\mathsf{sk}\kern-0.05em\textsf{,}\) not the signing share. A wrong share, such as one stored with the wrong sign, passes the restore and is caught at the member’s first signing: the verifying shares of the \(t\) signers, which travel with their commitments, interpolate to \(\mathsf{ak}\) only if every one of them is right. The signing transport is out of scope for this ZIP, but a signing protocol used with these strings SHOULD carry each signer’s verifying share, so that a member restored from a string is checked when it first signs.

Export

A wallet that exports a member backup string SHOULD export the group’s unified full viewing key with it, or tell the user that the restore needs it. ZIP 2005 asks FROST members to retain the group verifying key \(\mathsf{ak}\) 4; in version 1 it is only held by the viewing key.

A wallet MUST NOT put signing nonces, or any other secret beyond the fields above, in a version 1 string.

Storage and transmission

Wallets MUST protect every member backup string at least as securely and reliably as \(\mathsf{ask}\kern-0.05em\textsf{,}\) as ZIP 2005 requires of \(\mathsf{qsk}\) 5, and not merely like one signing share.

Wallets SHOULD NOT store or transmit a string encrypted only under public-key encryption based on discrete logarithms or on factoring, such as Orchard note encryption, X25519, or RSA and elliptic-curve OpenPGP keys.

Rationale

Bech32m. It gives a checksum that catches copy errors and a string users can paste or show as a QR code. An uppercase string fits the QR alphanumeric mode, which makes the code smaller. Its checksum guarantees the detection of any error affecting at most 4 characters only for strings of at most 90 characters 12 10. A version 1 string is 123 characters long, so it keeps the 30-bit checksum without that guarantee, as unified addresses and viewing keys do 11.

No network in the string. A member’s share is the same on every network the group lives on. The viewing key carries the network.

\(\mathsf{ak}\) is not stored. The restore needs the viewing key anyway to scan the chain, and checking \(\mathsf{nk}\) and \(\mathsf{rivk}\) against it catches a string from another group. The cost is that the string does not authenticate \(\mathsf{ak}\) (see Security Considerations).

\(\mathsf{sk}\) is stored whole. ZIP 2005 makes it necessary “to retain, or be able to rederive, \(\mathsf{sk}\)” 4, and every member already holds it, along with \(\mathsf{qsk}\) 5.

The derivation is found, not recorded. Version 1 is Zkool’s existing payload, which has no field for it. With two derivations and the viewing key at hand, trying both is cheap and unambiguous: both matching would need a collision in the hash functions behind \(\mathsf{rivk}\kern-0.05em\textsf{.}\) A later version can record the derivation explicitly (see Open issues).

One-byte identifier. It covers groups whose identifiers are the integers 1 to \(n\kern-0.05em\textsf{,}\) as in Zkool and in frost-client’s trusted-dealer key generation. frost-client’s DKG and Zafe derive 32-byte identifiers, which need another version (see Open issues).

Version 1 is Zkool’s payload. Backups users already made keep working, and the first implementation exists today.

Security Considerations

A string holds one signing share. Fewer than \(t\) strings cannot spend, as long as discrete logarithms on the Pallas curve stay hard.

Every string also holds \(\mathsf{sk}\kern-0.05em\textsf{,}\) which yields \(\mathsf{qsk}\kern-0.05em\textsf{.}\) ZIP 2005 notes that “a quantum adversary may be able to steal the funds with only access to \(\mathsf{qsk}\kern-0.05em\textsf{,}\) which is held by every participant” 5. Against such an adversary the threshold may give no protection: one leaked string, from any member, may be enough to steal the funds. ZIP 2005 requires each participant to “treat \(\mathsf{qsk}\) as a secret held at least as securely and reliably as \(\mathsf{ask}\)” 5, which is why Storage and transmission asks the same for every string.

For the same reason, a string that is stored or sent encrypted only under public-key encryption based on discrete logarithms or on factoring is exposed to an adversary who records the ciphertext now and gains a quantum computer later. A passphrase with a memory-hard KDF and an AEAD (see Open issues) does not have this weakness.

The restore does not prove the signing share (see Restore). A wrong share, for instance one exported with the wrong sign (see Payload, version 1), gives signature shares that fail verification. It stops that member from signing until it is restored from a correct string, but it cannot sign anything or leak the other shares.

The restore does not authenticate \(\mathsf{ak}\) either. Every member holds \(\mathsf{sk}\kern-0.05em\textsf{,}\) so a dishonest member can build a viewing key around another \(\mathsf{ak}\kern-0.05em\textsf{,}\) for instance one whose secret it holds alone, with the \(\mathsf{nk}\) and \(\mathsf{rivk}\) that either derivation gives for it. A string restored with that key passes every check in Restore, and the wallet then shows addresses that only that member can spend from. The wallet would not see the group’s notes, and the group’s signatures would not verify under that \(\mathsf{ak}\kern-0.05em\textsf{,}\) but funds received at those addresses before anyone notices are lost to the group. Checking the viewing key against a trusted source, as Restore asks, prevents this; so would carrying \(\mathsf{ak}\) in the string (see Open issues).

A member restored from a string has the same authority as before: the string adds no signer to the group. It carries no nonces, so a restore cannot bring back a nonce that was already used or published.

Deployment

This ZIP changes no consensus rule. Wallets can adopt it at any time.

Reference implementation

Test vectors

The test vectors are generated by the Python code proposed in zcash/zcash-test-vectors#136 15, in three files: frost_member_backup, frost_member_backup_decoding and frost_member_backup_restore. They cover a 2-of-3 ZIP 2005 group, a 2-of-3 legacy group together with the ZIP 2005 viewing key built from the same \(\mathsf{sk}\) and \(\mathsf{ak}\) (whose strings restore under either key, with a different derivation), and a 3-of-5 ZIP 2005 group; an uppercase string; seventeen strings that decoders must reject, two of them for the padding rule and one with a threshold of 1; and four cases that decode but that the restore must reject: a valid string paired with another group’s viewing key, a string whose signing share is not canonical, one whose signing share is zero, and a viewing key with no Orchard component.

Every valid string decodes to the same fields and matches the stated derivation with Zkool’s code, and every \(t\kern-0.03em\textsf{-}\)subset of members restored from their strings produces a FROST signature that verifies under \(\mathsf{ak}\kern-0.05em\textsf{.}\) Zkool 6.35.0 rejects every invalid string except three. It does not check the padding bits, and decodes the two padding strings to the same fields as the valid string they come from; it also accepts a threshold of 1. Zkool 6.36.0 rejects all three: it has the padding fix, hhanh00/zkool2#1468 16, and its decoder now refuses a threshold below 2. A third decoder, by the other owner of this ZIP, with the derivations written directly from BIP 350, ZIP 316 and ZIP 2005 and no Zcash library, gives the expected result for every string, both viewing keys of each group, and every rejected case but the share of zero, added since. With frost-client’s version of reddsa, every \(t\kern-0.03em\textsf{-}\)subset also rebuilds \(\mathsf{ak}\) and signs.

One member of the 2-of-3 ZIP 2005 group (byte strings in hex):

sk      24cf13c724758886048e05834d5d0a644e9c8e155d7e0bac3f25586b6caa11c3
ak      a0dffa5f21db1b2c6cc72d9b6af9d777884c2c7d3e06ad479732bec46cee110d
nk      e32868e0d0770d63ad17b8a807c8133bfb957c81fb973f1c43531c7cc15e5831
qsk     7193049fb014e408fd139cfcc47c58d6c20451473bab44ccb9fffc983ecf8ada
qk      eec37a6202cd2f8b1bea8279bf87ef0dcb2bf73bbec28f077c4c5e1a743dd79f
rivk    d0971e49314b6ad96d67af2766afc7db08fe6bf01f3ab0d84376016aad6ef419
t, n    2, 3
id      1
share   2caaa5adfcad8ac0bb8c50dcdbbc1e954825be403f97f44bc1d6c543e15d4f3b
string  zkfrost1qyqsyqev42j6ml9d3tqthrzsmndmc854fqjmuspljl6yhswkc4p7zh208vjv7y78y36c3psy3czcxn2apfjya8ywz4whuzav8uj4s6mv4gguxm4ktp7
ufvk    uview1mvknnjr2s9cuc7z5kjsd3twesswde37tpfw2z4v5a8jmsnwdwsg8sc2hdq302ud7j57d7dvmmt6mtc6c3fk7zkdyx5mrhq8fvyw8xp0dlgzl8kkwawt9j7m9z5adwpuskfscg5fyrpc0sca8lydtxfw7hfaaydtg88ayqj6y89a9jllhupn3hzgp7vq6d

Open issues

References