
by Bobbin Threadbare
Given recent advisories from NSA and leading internet companies, it is now clear that we live in a world very different from what it was just a few weeks ago. While it seems like nothing is immediately broken and deployed cryptography is safe for now, the urgency to move to post-quantum primitives is real. We no longer have three to five years - the transition should happen immediately - ideally within months.
It is also clear that AI is now capable enough to find hidden structures where humans failed to do so. And while it is unclear whether what is currently found can lead to practical breaks, new ways of exploiting these newfound structures may be much more practical, and there may be other structures that are currently undiscovered.
With this uncertainty on our hands, it is prudent to be conservative in blockchain protocol design. After all, we are building systems that are supposed to secure trillions of dollars with millions of people dependent on them.
This is exactly what we’ve been doing at Miden from the very beginning: design a protocol according to a set of principles that make the design as future-proof as possible but without needlessly limiting its functionality. We follow these three principles.
The first principle is that the only cryptographic primitive that should be enshrined in the core protocol is a hash function. No elliptic curves, not lattices, and especially, no pairings. We would have loved not to enshrine hash functions as well, but unfortunately, any protocol that does something interesting has to rely on hash functions.
Here, it is important to note what “enshrined” actually means. In our definition, it is something that no individual user can change and that must be changed at the network level. For example, Ethereum currently enshrines ECDSA signatures because a transaction must be initiated by an EOA, though this is set to change with EIP-8141 (frame transactions).
Another important note: the hash function we want to enshrine should be battle tested with a long cryptanalysis history. Very few hash functions fit this definition, and certainly, new, arithmetization-friendly hash functions don’t fit the bill here.
For Miden specifically, we adhere to this principle: we use a Blake3-based hash function, and our proving system is STARKs, which also relies only on hash functions.
The second principle is that mechanisms that authorize spend must be swappable by the user and, ideally, user-defined as well. Specifically, the users should be able to pick which signature schemes they use for their accounts and easily move from one scheme to another. The set of available signatures should include the standard elliptic curve-based ones, lattice-based ones, and hash-based ones.
The ideal setup here is to let users combine different signature schemes. For example, a 2-of-2 multisig where one key is ECDSA and the other one is a PQ-secure scheme. This creates a solid defense-in-depth: if ECDSA signatures are compromised, the PQ-secure scheme will act as a backstop and vice-versa.
The above is just table stakes in our mind, and there are better approaches than simple 2-of-2 multisig setup. For example, a Guardian-based approach where one of the keys is delegated to an external 3rd party which can block transactions according to a well-defined policy, but can never move funds on its own (i.e., doesn’t have custody of funds).
This capability provides a very high level of crypto-agility: users can protect their accounts ahead of time as they see fit. For example, a low-value account is probably fine relying only on ECDSA signatures, but a high-value one, would ideally mix 2 or maybe even 3 separate schemes.
There is another important aspect to note: for protocols that have client-side proving (using hash-based STARKs), the underlying signature schemes become much less important. This is because signature verification is run on the user’s device, and signatures themselves (as well as public keys) are never shared with the network. This essentially means that even if elliptic curves are compromised, users can keep using ECDSA signatures locally and sending hash-based STARKs to the network. Of course, migration off the compromised signature schemes should happen sooner rather than later, but it wouldn’t need to happen immediately - and users could migrate at their own pace.
The third principle is related to privacy: we don’t want to put data that is meant to be kept private onchain (even in encrypted form). One reason for this is scalability - the less data goes onchain, the better. But another reason is that putting encrypted data onchain means that this data is there forever, and a leaked key or a broken encryption scheme any time in the future would make it immediately decryptable.
The latter part is especially important because the encryption that is usually used in these cases relies on elliptic curves. We already know that these are vulnerable to quantum computers. The only somewhat practical alternatives are lattice-based. These come with significant performance tradeoffs though, and based on the recent Anthropic results, may become vulnerable to quantum computers as well.
Moving encrypted data through offchain channels has multiple benefits. First, the data is not permanently stored onchain. This doesn’t solve the problem fully though as even offchain data can be captured now to be decrypted later. But it does give users an option to use dedicated channels that would be hidden from the general public. Second, offchain channels are much easier to scale, and conceivably, we can use multiple encryption schemes to implement the defence-in-depth approach. Third, upgrading offchain channels is a much simpler task than changing the core protocol - it can be done much more quickly and cause much fewer disruptions for the ecosystem.
Overall, putting encrypted data offchain gives us much more flexibility in which cryptographic primitives we can use and how quickly we can move to other primitives without disrupting the entire ecosystem. This is exactly what we are doing at Miden - only commitments to encrypted data go onchain, the actual encrypted data is handled by offchain components such as Guardians and the Note Transport Layer.
The unprecedented capabilities unlocked by AI create a lot of anxiety about which crypto primitives will remain standing even in the near term. The answer to this is not to try to guess what will get broken and when - that’s impossible - but to build the protocol that, at the core, relies on the smallest possible set of cryptographic assumptions (i.e., hashes), is crypto-agile - i.e., lets users easily move from one authorization scheme to another, and does not put encrypted data onchain.