Hackmas: FROST Support in zcash-devtool

This post features work completed by @conradoplg

FROST is a threshold signature scheme that, in the context of Zcash, allows managing a wallet by multiple people so that a threshold of them must sign a transaction for it to be accepted.

zcash-devtool is a command line tool that basically works as a wallet and allows developers to quickly prototype Zcash applications, and also serves as reference code on how to integrate with Zcash libraries.

ZF’s frost-tools repository contains a command line tool, frost-client, that allows signing Zcash transactions with FROST. However, it required the combination of multiple pieces of software: Ywallet to generate a transaction plan, and the zcash-sign tool (also in the frost-tools repo) to interact with the transaction plan and insert the FROST-generated signature.

In this context, we added preliminary support for FROST into the zcash-devtool CLI, which involved the following work:

  • Supporting the PCZT (partial-created Zcash transaction) format that zcash-devtool supports. This was developed to standardize the “transaction plan” file (and it has other applications as well). This was done in the zcash-sign tool so you can use it even if you don’t use zcash-devtool.
  • An overall refactoring (1, 2, 3) of frost-tools to make it work better as a library (as opposed to just a command line tool)
  • Changing the frost-client participant tool to show the PCZT contents before signing (a security-critical step to ensure users know what they are signing!)
  • Finally, adding support for zcash-devtool to start a FROST signing session, acting as a coordinator. Participants will still need to use frost-client participant, we might add that functionality to zcash-devtool itself after the coordinator part is reviewed.

With that, users will be able to create and sign transactions with FROST by using zcash-devtool directly, without having to interact with multiple pieces of software.

Do note that the main audience of this project are developers and power users.

Next steps will involve incorporating the entire key generation and signing workflows into zcash-devtool and storing key material inside the zcash-devtool wallet folder, so that interacting with frost-client will no longer be necessary.

17 Likes

Thank you! :folded_hands: