Multi-signatures are one of the most powerful constructs in Web3. Other than enabling DAOs and corporate treasuries, they also serve to improve personal security in the form of multi-factor authentication, for example signing a transaction on your laptop and mobile phone, which with modern secure enclaves can rival hardware wallets in terms of security, if not surpass them.
Historically there have been multiple ways to implement multi-signatures, from the naive on-chain multisig code, like Gnosis Safe, to multi-party computation on ECDSA.
However, there is a way to do it that is cheap to verify on-chain, easy to implement, and extremely flexible: Schnorr signatures. We propose a JS library that can construct Schnorr aggregate signatures that can be verified on-chain for the cost of a regular ecrecover
.
Currently, the library is in prototype stage.
The true breakthrough here is that through AA, we can finally use Schnorr signatures. Ethereum itself only supports ECDSA.
In other words, Schnorr signatures can only be used by AA wallets.
My initial inspiration was mainly the Schnorr verification hack that Vitalik initially proposed. This enables AA wallets to verify Schnorr signatures on-chain for about the same gas cost as a regular ECDSA signature!
There are tons of MPC solutions, but in an AA future, where each account is a contract and can easily rotate keys, Schnorr is clearly superior to MPC because:
Here's a breakdown of why AA + Schnorr is the best combo:
Feature | MPC | AA | Schnorr | AA + MPC | AA + Schnorr |
---|---|---|---|---|---|
Cheap to verify on-chain | โ | โ | N/A | โ | โ |
Key rotation | โ | โ | โ | โ | |
Easy to audit | โ | โ | โ | โ | |
No excessive interactivity (>2 rounds) | โ | โ | โ | โ | |
Privacy (not revealing the signers) | โ | โ | โ | โ |
Note: Schnorr signatures cannot be verified on-chain without account abstraction.
We explored the following signature schemes:
To further develop a JavaScript library that can produce Schnorr signatures that:
Schnorrkel.js is a JavaScript library for Schnorr signatures with multi-signature (signature aggregation) capability.
So far, we managed to achieve the following:
We have built the library to a point where it can sign MuSig2 signatures with only one round of interactivity (plus one round of pre-signing which is to exchange public nonces).
Those signatures can be verified in Solidity and there's a test for this: https://github.com/borislav-itskov/schnorrkel.js/blob/main/contracts/SchnorrAccountAbstraction.sol and https://github.com/borislav-itskov/schnorrkel.js/blob/main/test/MultiSigTest.js
Furthermore, SchnorrAccountAbstraction.sol includes a simple ERC-4337 smart contract wallet.
The proposed $18k budget will be used to:
Around half of the budget will go towards auditing, and the other half will cover approximately 5 months of 20 hours per week joint effort from the team to work on the library.
My name is Borislav Itskov and I am a programmer and a Web3 enthusiast.
I studied cryptography at the Technical University in Varna, Bulgaria, but I dropped out during the middle of second grade to start working for a company in Varna called Devlabs. I've worked on various web projects mainly as a backend developer.
After about 8 years, I discovered smart contracts and became a Solidity developer. Along with Solidity, I rediscovered my passion for cryptography again, hence the library I worked on for the past month or so.
Cvetan Mihaylov is a software developer with almost ten years of experience in network engineering. Having switched to building software, he specialized in crafting back-end solutions in the last 7 years. Over the past year and a half he focused on blockchain and Web3 development, with a strong emphasis on Ethereum and other EVM-based blockchains. With an unquenchable thirst for all things tech, Cvetan is captivated by the immense potential of decentralized technologies and the boundless opportunities they offer.
The security of the MuSig2 signature scheme is already analyzed in the MuSig2 paper. However, while the library tries to follow the paper as closely as possible, we believe that the best way to ensure it's security will be an external audit.
We are open to discussing different timelines and engaging external contributors.