You can't withdraw your privacy: PQ analysis of Kohaku privacy protocols
Devcon·Sat, Nov 7, 2026, 12:00 AM
Speaker
Transcript
[music] [music]
Hello everyone. Thanks for coming. So yeah, I'm going to do a small presentation on the post-quantum analysis of the privacy of Kohaku. So before I start, let me present our team. So we are three engineers working in security.
Um The first one is Nicolas Bacca. Probably you know him. He's a hardware specialist who is working on the security of hardware. Previously co-founder of Ledger and now working with Renault and I.
[snorts]
So Renault and I are working in cryptography. And we are mostly developing like efficient uh gas efficient verification contract in Solidity and also hardware implementation like post-quantum signature in hardware and for privacy protocols. So we design elliptic curve cryptography for hardware wallets for privacy protocols. If you want to look at our web to our website, we have several demonstration if you're interested. Um yeah, I wanted to start with a quote from Coinbase report where they are saying that a ZK proof is basically by the construction safe against a quantum computer because the output is of fixed size while the input can be of unlimited size which is true.
So it means that Groth16 is like perfectly zero knowledge. But when you have privacy protocol, you usually have extra data that are put on chain like commitment, ciphertext, nullifiers.
[snorts]
And actually the privacy break that you can have with a quantum computer comes from these extra data that are on chain. So here I'm going to try to dive into the quantum attacks that you can do on these uh data. So, what what a quantum computer can actually do, if we want to simplify a lot, it's uh affecting mostly only the public key cryptography. So, I actually some part of the public key cryptography. For example, factorizing numbers like in RSA, if you know it.
And uh also for computing discrete logs on specific groups like elliptic curve or finite fields. And mostly the symmetric cryptography is kind of safe, which is a a good news.
[snorts]
But in Ethereum, we have lots of um part of Ethereum that are actually using public key cryptography. So, what happens um at the execution layer where when you sign a transaction, you're actually signing with ECDSA. So, mostly the execution layer is broken. The consensus layer is using uh pairing-based cryptography, so it's also broken because it's a discrete log on a finite field. And for the privacy, it's still a bit unclear.
So, I'm trying to clarify this part on the privacy side. So, if there is one thing to to remember from my presentation, it's this slide where there is a distinction between authentication, so when you sign a transaction, and the privacy. So, two different deadlines in terms of quantum attacks. Why? Because the authentication, you need to have a quantum migration after before the the day we have a quantum computer.
But on the privacy side, all the bytes that you're putting on chain now can be stored and decrypted later once we have a quantum computer. So, there is like kind of two different deadlines that are really important. So, to remember, authentication, you need to migrate before we have a quantum computer, and privacy, all what is encrypted today needs to be quantum secure now if you don't want to be to have a privacy break uh after we have a quantum computer. So, I'm trying to look at quantum attacks on three privacy protocols that are pushed by Kohaku. Kohaku is a an SDK that is pushing privacy protocols.
And three main protocols now, Tornado Cash, Privacy Pool, and Railgun. And they share some properties, but they are also very different. And now I'm going to try to explain how you can attack this protocol in the on the privacy side using a quantum computer. So, first to start, I'm I'm going to explain how Tornado Cash works. And this was the first protocol that was integrated into Ethereum.
And it's not so complicated. So, when you want to shield some tokens, you're actually adding a commitment into a Merkel tree. So, you send some funds from your public account to a specific contract. And this contract is updating a Merkel tree with a commitment. And when you want to unshield the funds from this contract to a new address, you compute a nullifier, which will be some bytes that will ensure that you you won't be able to unshield twice.
And you will also prove using a ZK proof that the commitment so that the nullifier is actually linked to a commitment that you own. So, if we look at the details, commitment and nullifier are computed using a Pederson hash. It's a hash function that is based on elliptic curve. So, you take your bytes, you convert it into numbers in a specific way, and then you compute a multi-scalar multiplication. And this hash function is a bit specific.
So, if you in the case of commitment and nullifier of Tornado Cash, if you subtract the commitment to a nullifier, you will have a function that doesn't depend on the on the nullifier key. And then if you have a quantum computer, you can actually use uh sure algorithm plus uh small lattice, so you can actually break the privacy and get a link between a commitment and a nullifier. This [snorts] doesn't really work uh 100% chance, so you still have 15% chance that the pre-image of the hash that you find is actually wrong. And so that's why it's not properly breaking the privacy, but it's more shrinking the anonymity set. But once you go into a private uh practical case, you actually break the the privacy.
Why? Because so you will run your quantum algorithm on a commitment and a nullifier. You'll get a link between the commitment and the nullifier, but still you have 15% chance of uh failing. But once you have this, you can also look at the address of the shielded and the address of the unshielded. And then you can check other commitments or the nullifier.
And then you can run again the quantum algorithm to find a second link, and then the probability of failing is decreasing. And as long as you have several uh commitment and nullifiers, this probability is going to zero, and then you're pretty sure that uh you have a link between the two addresses. So conclusion for Tornado Cash is that elliptic curve is breaking the the privacy.
[snorts]
And when you use metadata, you you can be sure that uh you have a link between two addresses.
[snorts]
Uh the second protocol is Privacy Pool, which is working in the same idea as Tornado Cash. Of course, there are differences that I won't dig here, but the idea is the same that you update a Merkle tree. But this time they change the hash function. They use Poseidon hash, which is not based on elliptic curve scalar multiplication. So, commitment and nullifier are using this hash function and at the protocol level this first version of of Privacy Pool is quantum safe because of this new hash function.
One issue with this first version is that it's a bit limited in terms of functionalities. And Privacy Pool decided to migrate to a new version, V2, which is a UTXO model. So, basically all what you can do in the transparent model, you can do it in the private model. And when you do when Alice want to do a transaction to Bob, she is basically computing a nullifier for her note and adding a new note in the Merkel tree. But now she needs to send the private information to spend the note to Bob.
So, how you do that? You encrypt the note information and you send it to Bob. Or you put it on chain in the in the case of blockchain. So, how you encrypt the data? You use ECDH, which is a standard key exchange.
And you send you encrypt them using ECDH and AES. And [snorts] here is where it's again broken by a quantum computer because this ECDH is based on elliptic curve and again a quantum computer could just decrypt all the ciphertext and get all the links between the transaction. The good news is that to fix this issue, you just need to change the encryption scheme. So, instead of using ECDH, you can change to something else and then it's going to be quantum safe. And this encryption side is not part of the contract, so you can even keep your pool keep keep your contract and use another encryption and it will work the same.
Now I'm switching to the wallet level just for a few minutes
[snorts]
Uh, to explain some specificities of Tornado Cash and Privacy Pool in terms of hardware integration. So, I mentioned that you need to compute a ZK proof that links a commitment to a nullifier. And this ZK proof is actually quite big. It's like 300 kilobytes. Looks not so big, but for a hardware wallet, it's quite big because we have like a few few kilobytes available in the RAM.
So, we won't be able to compute this ZK proof on the hardware wallet. So, usually when we we we are stuck like this, we delegate this computation to a host to a software wallet. And we ask for the software wallet to compute the ZK proof. But this doesn't really work because the hardware wallet is here to keep the spending key on the hardware wallet. But in order to compute the ZK proof on the software wallet, we need this spending key.
So, it's we we are kind of stuck with this proof computation on the host. And so, that's why you can't really use Tornado Cash or Privacy Pool using a hardware wallet. And [snorts] it's one feature that is a bit annoying. You still have some hardware friendliness in the sense that you can derive the spending key on the hardware and then you export the the signing key to the host, but this is not hardware security because the key is like leaving the device and going to the to the host. [snorts] And so, now I I want to also mention that how you derive your spending key will also affect the quantum security.
So, when you want to derive your spending key, you have several options and FAT solution was actually implementing and specifying a solution for Kohaku first. Where you use you start from the seed phrase and you use hash functions to get the spending keys and unifying key, which is actually standard. And it's so it's post-quantum by default because it's using only hash functions. And if you want to do this exportation of the spending key from a hardware, you just need to design a simple hardware app and you'll be able to export the keys. But then Kohaku decided to move to another way of deriving keys where you sign an an Ethereum transaction Ethereum message, sorry.
And then you from this signature, you derive spending and unifying key. So for the hardware friendliness, it's quite nice because you don't need to have any new app. You can just use the Ethereum app. But in terms of quantum privacy, it's an issue because Ethereum signature is ECDSA, so it's again broken by quantum computer. So if you want to have at the wallet level the private the quantum privacy, you rather use the fat solution derivation that is using only hash functions.
So this is at the wallet level. And now I'm going back to the protocol level with the third protocol, which is a Railgun. So it's also UTXO model, so again all what you can do on the transparent model, you can do it on the private model, which is a nice property.
[snorts]
But as for privacy, Bob, they are encrypting the note, so Bob Alice is encrypting the note to Bob using something very similar to what I mentioned before. And so if you have a quantum computer, you can break ECDH and decrypt everything. In terms of hardware integration, it's a different story because the contract is a bit different. And instead of computing the proof from the spending key, you compute the proof from a signature. So what you can actually do in Railgun is that you compute [snorts] the signature of the transaction on the hardware wallet using the spending key.
The spending key is staying on the device and then you export the signature and the host is computing the ZK proof only from the signature of the transaction. So this means that you really have um hardware security and you can use a hardware wallet. And um for Railgun we did a proof of concept of how you could change the encryption to get something quantum safe. So we started from the implementation and we changed the ECDH key exchange to have hybrid encryption. It means that we have still ECDH security but we also add ML-KEM which is the standard for post-quantum encryption by the NIST.
Uh we use a key derivation as the fat solution specified so we use hash function for this. We [snorts] could also implement the hardware integration. For now it's a blind signing but we also have clear signing integrated into it. You can have a look [snorts] at the website. It's Of course it's a proof of concept but it's just a a way to show that it actually works.
Uh what is nice it's is that it's working with the production contract so you can actually use the the the contract of Railgun in mainnet and do your transaction using this hybrid encryption. And if you want to adapt this to privacy pool, it's pro- probably possible. Just to show you how it looks. Um so in Railgun you have your transparent address, your 0x address. You have your [snorts] zero ZK address on the left which is two line long and your post-quantum private address is a bit longer because you have this ML-KEM um key that is quite huge.
It's like 1,000 bytes. And on the right it's it's just Etherscan logs so you can see the cipher that you sent to Bob and you see that the one of the cipher is huge because it's the cipher for for ML-KEM again. But this is not very expensive in terms of gas because at the end the gas that you pay is also the proof verification which is quite expensive. So [snorts] changing to post-quantum cipher is not really expensive at the end. And just to conclude, so for Tornado Cash the issue is from the hash function that is based on elliptic curve.
So if you have a quantum computer, you bind it to the metadata and you can break the privacy. For Privacy Pools the first version was safe at the protocol level. The second version that is a bit more generic is broken because it's using encryption using ECDH. But it's possible to fix it by changing the the encryption. And of course you need to at the wallet level you need to use the derivation path using the mnemonic phrase.
And for Railgun it's also broken because of the encryption. And we [snorts] provided a proof of concept of of the the fix using ML-KEM hybrid encryption. Again, we also use the derivation path for the for the seed phrase. And for the next step, so for now it's already possible to fix a privacy protocol to have quantum privacy um on the current protocol. What is more way harder is to have like fully post-quantum protocol where also the authentication, so the signature, the consensus, the star the proof are also quantum safe.
And yeah, that's all for me, so if you have any question.
Thank you, Simon. Thank you. We already got a couple of questions on Meerkat, so thank you already for asking and feel free to ask more if you have. The first one here is is the Tornado quantum attack seven times reduction or will a global attack combinatorially reduce it further?
Um Yeah, probably it can be reduced further, but that's the estimation that we had from actually I have I have a slide of the detail of this attack that I could also show. Uh but yeah, this shrinking of by a factor seven is what we had for now and maybe it can be reduced further.
All right. So, if you ask this question and want to see the slide, feel free to approach Simon afterwards. Um the next one we have here is does this mean that all the work done on Ethereum now is useless and redundant as we will need to migrate to quantum safe algo- algorithms? Why are we wasting time progressing it?
Um No, I don't think it's useless. I mean the on the authentication side uh as I said, we need to migrate before the quantum computer is efficient. And on the privacy side, yeah, it's kind of more urgent, but
[snorts]
it's quite easy to migrate to something post-quantum, so Yeah.
Okay. You You are You are not as worried as the person asking this question. Um which cryptographic components of Kohaku are most vulnerable to quantum attacks?
So, for Tornado Cash, it's the hash function itself. And for Privacy Pool and and Railgun, it's the encryption side. Yeah.
Got it. Is it expensive? Does ML-KEM increase size of messages?
Uh so, yeah, I was showing this in the proof of concept that we had. It's not something that you will write into the contract, so it's not so expensive in terms of gas. So, it's basically some logs that you put in the transaction so that the recipient can fetch the data and get his note. So, yeah, it's It's so expensive in terms of a guess.
Okay, it's good to hear. How actively is Railgun collaborating on emerging Ethereum standards like EIP 8182 to ensure your post-quantum privacy layers remain composable with future institutional DeFi front-ends?
Uh I think it's a tough question. I'm not able to answer to this one.
[laughter]
Fair enough, yeah. If anybody here has a has an answer to this one
It's too technical for me, I think.
Yeah, fair enough. Um What does it mean for signature to be separate? What additional function does it provide?
Yeah, so I was mentioning that in Railgun there is a a way to compute the ZK proof without knowing the spending key and that's the clean separation that there is in Railgun that you can compute the signature and then export it and compute the proof from the signature. So, it's a very nice feature because it's allow you to use a hardware wallet, but also you can use multi-sig. So, again something that you do in the transparent model when you use your safe, for example, and you can do this in the in the private model, too. So, yeah, I would say multi-sig is another feature and maybe forgetting other features, but yeah. Already something.
Okay, I see the questions keep coming. We have a little bit more time for questions, so with the development of quantum hardware, will Ethereum need any changes at the EVM level or can quantum resistant security be implemented entirely through new cryptographic algorithms?
Let me read again.
[laughter]
Yeah, it's a bit of a mouthful. So, I guess the main question is with new quantum hardware, do we need to make changes at the EVM level?
Um Yeah, I I to be honest, I I can't answer to this one.
[laughter]
That's fair. Okay, we'll take another one here. Can quantum resistant zero-knowledge proofs prevent future de-anonymization?
So, yes, I I think it's more on the authentication side, so the stark, so the the hash function based proofs will enable having like security on the on the authentication side.
Mhm.
But it's also related to the to the privacy because it's it's a ZK proof, so it's also hiding this this link. But yeah, I would say it's more on the authentication side than the privacy side. But we we we need it for a fully post-quantum protocol. Yeah.
I see. Okay. We're running out of time. I see there's a couple of questions. If your question wasn't answered, please feel free to approach Simone um right after this.
So, give a one more round [music] of
Automatic transcript — names and jargon may be misspelled.