Get the Monday email →
Loading player…

Building the PQ1: The first verifiable post quantum hardware wallet

DevconMon, Nov 16, 2026, 12:00 AM

Transcript

[music] [music] Hello guys. Uh, thanks for coming to our talk. My name is Nicole and is my colleague Marcus. And as our MC just uh very nicely stated, we're going to talk about the PQ1 which is another wallet that we're building right now where we're talking a little bit about uh the technical decision that we took and uh explaining why we did them. So maybe you should start the presentation a little bit by asking ourselves one question which is [snorts] not working.

So do you use another wallet? Well, there are many reasons uh as one would say yes or no. Uh but maybe we can go a little bit more philosophical and ask each other uh another question. [snorts] So what is another wallet? So I think uh the definition that I like the most is the following u oh sorry yeah which is a a device that is meant to reduce the attack surface um the the attack surface while using cryptocurrencies.

So what is attack surface? So, you probably have something like this in your pocket or in your hands scrolling right now, which is fine. And uh a lot of people use crypto for their from their mobile. But if you peer behind the curtains and look a little bit what's happening behind your uh the your screen, you see that we have a lot of other surfaces of software surfaces which is your apps or your hardware components that comp compose your phone that could be exploited in the future to gain access to your device. And this is something that I like to call the security spectrum.

All this stuff that we understand fall somewhere somewhere here and there are many uh ways where that you uh that we can employ to fix them. Now hard wallets do a very practical thing and they say you know we don't need all this stuff so let's just get rid of it. But of course, stuff still happens and this is a stark reminder that uh there's a lot of stuff that we don't see and we need to be very careful of not just staying uh static and actually improve because at the end of the day security is just a point in time. So this does not only apply to hardware but actually to the software that we employ in our block uh and our blockchain technologies for instance Ethereum. Maybe you see this post by Justin Drake uh how our MC suggested he uh said more or less that ECDSA will not last forever.

So the question is why is that the case? So in short uh we can understand uh uh the the crypto cryptography used by Ethereum today is uh something called uh elliptic curves and uh in an eventual future where we have a strong enough quantum computers, it would be possible in short to get your public key, the one that you use to tell your friends where to send crypto to could be employed to reverse uh engineer what your public key is. And uh sadly uh this is something that I mean this was known for a long time but uh it was still okay uh because it was well understood at the time and uh there was a lot of work done and we didn't know at the time that uh um they the technology will improve so fast. Now not to say that everything is over. Ethereum and other blockchain technologies are employing a lot of time and effort into finding uh solutions and I'm very optimistic that this this will be found before uh it comes to to it.

But today we are going to talk more about what we've been playing with. So this PQ1 stands for pro postquantum one is our attempt at solving uh the quantum problem today. It's an open- source hardware wallet uh uh fully open source on our GitHub hub uh which uses an account objected wallet to do the transaction which my colleague Marcus will talk more about and it it also has a a clear signing which will also be uh something that Marcus talks about. So the hardware stack is composed of the main chip, the STM32 U5 and uh then we have two secure elements, the trust MV3 and an edge lock se050. In short, your private key uh will be stored in a split XR configuration in both those um devices.

Uh and then it will just be recomposed in the iso hardware isolated secure word on the top right. uh so it gets recombined and this is what is been uh will be used to sign your transactions. So we built the PQ1 uh with a lot of agent coding and uh if you worked with with those you know they are very errorprone uh still uh even though they improved massively in the last couple of years. So we started to employ a little uh uh framework internally that we used to develop uh with AI. In short, we lay um a spec of what we want and then our agents will start building it.

Eventually, there will be a wave of reviews where we employ a swarm of AI agents to verify the code and this can happen multiple rounds until all the u um the agents um approve agree on the solution provided. Then there is a manual check that we do and then the the things um repeats until we're good. uh we feel that the firmware is stable enough. Now of course that's uh not enough for us. So we started looking into formal verification.

So our firmware stack is built uh using rust and there is a pipeline uh uh so a tooling u called aenas that we can use to take our rust firmware and translate it into lean specs. We also take uh the official documentations from STM about the chip that we are using and we also uh uh transform them in leanspecs which we then use to prove that our software is actually uh bug free in the sense of uh uh it does what it's supposed to do uh correctly. Now we do the same thing for our signing scheme but for this we use something called easy crypt which helps us uh calculate and measure the software bounds. Now of course u hardware wallets uh uh just because the software is secure doesn't mean that the one that you will receive in the future now independently of which one you're going to buy is actually running the correct software. So we started also thinking what could we do to improve the situation uh at least with our other wallets.

So we found a paper from 2017 that suggested uh a cool uh way to do this in which uh like the short end of it is you take your hardware device that you have and you fill its entire memory with uncompressible bits. uh after a power cycle um then we take again the data that we just wrote into the um the hardware and we compare them to see if something has been changed or modified or deleted uh in any way. If the data that is turned back is the same as the one that we put in, we know that uh it would have been possible for a hardware to put malicious software on it because there was literally no space for them to do so afterwards. uh we do uh provisioning of the hardware uh where we lock down the the chip. So meaning uh we put certain memory pages into read only mode and then uh the boot loader on each subsequent uh uh reboot will hash its own firmware and give you a digest or check some on the screen which is displayed as eight words uh uh black and white.

But now I think it's it's a nice point to start talking a little bit about uh postquantum signatures and what we did with this and for this Marcus will help us. Thank you Nicola. Yes, I will take it from here. Let's talk about postquantum signatures but let's first start I want to talk about there's essentially three different hardware wallets in the world right now. The first one that doesn't have any mention of quantum in their marketing materials.

Then there's the ones that call themselves quantum ready and there's the ones that actually do postquantum signing. So the quantum ready ones are essentially two right now. It's called the Empire ICE and the Treasure Safe 7. Now the Empire ICE calls itself quantum ready because they say well our hardware has enough computational power to theoretically do postquantum signing in the future. Now, uh, the tra treasure safe 7, the reason why they say they're quantum ready is because they say, well, our firmware upgrades are quantum secure, and so a quantum computer cannot fake a firmware upgrade.

Now, in my humble opinion, if a quantum computer arrives tomorrow, I don't really care if my firmware can be, you know, maliciously upgraded. I care that the very first thing the attacker is going to do is take my crypto and suck it out into their own wallets because quantum ready doesn't actually mean that your device is secure from quantum computers. Now postquantum signing hardware wallets what they do is they do not allow any ECDSA spend path on your actual assets. So the only way to authenticate a transfer is using a postquantum signature like with the PQ1. The postquantum algorithm that we chose is Sphinx.

It's a hashbased postquantum algorithm and specifically the C10 uh parameter set which means that the signatures are compressed. It's also uh faster to sign on small hardware which our hardware wallet is. And also for the user it's the very same experience as having like a regular ledger for example where you create a seed phrase but instead of deriving an ECDSA private key from your seed phrase you derive a postquantum uh key from the seed phrase. Now how does the PQ1 sign a transaction for real? Well we do it twice.

for once to guard against computational faults but also because of a very interesting attack surface that hardware wallets have and it's called electromagnetic radiation. So a lot of hardware wallets when you do signing on the actual components they emit a certain electromagnetic radiation that a lot of uh attackers have shown it's possible to reverse engineer into the private key that is on the secure enclave. So what do we do against that? We first of all have a little shield on the component so that we reduce the radiation and then we do a second thing called u masking. So as I mentioned before sphinx is hashbased.

So when we sign a transaction on the pq1 it's doing a lot and lot of hashes like for quite some time. So what we do is we introduce randomly certain hashes that also are calculated. They look just like the regular hashes but they are not included in the actual signature. Now what does that do? It introduces noise into the electromagnetic radiation which makes it impossible for attackers to reverse engineer the private key from that.

And we do that twice and then we compare and verify it and then we release the signature. Now how does that compare to ECDSA? Well, the simple is that it's quantum secure, of course, but the one downside is is that the signatures are much larger than an ECDSA signature. So, you can see a Sphinx C10 signature is 4 kilobytes, about 62 times larger than a regular ECDSA signature. But there is an antidote for this.

In the future, what we're going to do is we're going to aggregate many signature into one stark proof and then we only have to verify the stark proof for many different signatures which will decrease the amount of gas that we need to pay per transaction significantly. Another interesting fact about sphinx is that you can only do a certain amount of transaction with a key before the security slowly degrades. So with a regular ECDSA wallet, you can do as many transactions as you want. The security doesn't degrade. Of course, it's still recommended to rotate your wallet at some point, but it doesn't degrade technically, but with swings after, especially with our set, after 65,000 signatures, you slowly lose security of the private key.

So what we did was we created a system that automatically uh rotates the key and makes it so that you can actually do 4.3 billion transactions per wallet per chain which to put into perspective Ethereum mainet doesn't even have 4 billion transactions uh you know in all of its lifetime until now. Oh so outside of the PQ1 how does it uh how is it implemented? The PQ1 releases the signature after it's signed. Then the bundler will u then the app basically the companion app or extension will take that signature and submit it on chain through a bundler for example.

The bundler executes the entry point the ERC 437 entry point and the entry point then asks the smart contract. It's an onchain verifier essentially that verifies the swing signature and it asks hey is this signature correct for your wallet? and then it verifies the transaction the signature on chain and says yes it's correct or no it's not correct and if it's correct it then executes the transaction that you wanted to do now we also did a lot of work regarding predictable addresses with auto rotating keys the problem arises what if you already rotated on one chain but didn't rotate on the other chain then you have a different address there or you use the old less secure private key from before so we made it so that there's actually a master private key and a slot private key. So the master rotates the slot keys and the slot key does the actual transaction signing. Now many people have asked us why didn't we choose lattice based signatures and the truth is our proof of concept actually did have a lattis based signature but our very first proof of concept also took 5 million gas on chain to verify for one transaction and that's obviously way too much for you know regular users and not only that but there's also some assumptions about lattisbased cryptography that aren't as tested yet as hashbased cryptography is so we decided to go with a swing C10 because it's hashbased, it's more conservative postquantum and also it's very quick to sign on our hardware.

Now, we also did a lot of work for clear signing. With hardware wallets today, you essentially have to trust that your the website, your browser, your OS, your laptop, your uh USB controller, all of even the uh USBC cable isn't infected, isn't hacked by attacker that changes the transaction just in a little bit to make it seem real, but it's not actually it. So, there's essentially two type of hardware wallets. ones that save clear signing data on the hardware and ones that basically trust a third party or first party API and we try to put it all on the device. For example, the ledgers, how they do it, they trust the Ledger API.

So instead of you having being able to see what Ledger does, you send a transaction to Ledger, they create some sort of clear signing and then they sign it as like Ledger created clear signing proof. So you have to trust Ledger. Now what we did as a result of this, we only have two megabytes of storage which also houses the firmware. So we came up with an interesting idea, we instead of storing all the clear signing data on the device, we create a Merkel tree and then we only have to save a 32 byt Merkel route on the firmware. That means that the app then sends the transaction data, the clear signing data, and then also the proof for the clear signing data.

So that it's all open and inspectable, and the firmware doesn't have to itself save all of that data. So how does it translate? As I said before, send the transaction data, clear signing data, and the proof that it's included in the pre-negotiated database. It then verifies the proof, matches the transaction to the actual uh clear signing data and then builds a beautiful UI so you can actually see what you're doing. We also have built-in decoders for cow swap and safe transactions because we really like their products.

Another big thing for hardware wallets and a lot of people have asked us about that is uh privacy and hardware distribution. Essentially every hardware wallet that exists today at some point has leaked their customers data list. And it's not only their fault because the problem is as soon as you have a partner with which you do shipping, they have a list of your customers uh data then they usually also have a sub vendor and there have a sub vendor. It's it's a it's a constant spiel of having a lot of lot of people all with their own access to your customer's data. And so even if you yourself are secure some sub vendor might have a security vulnerability which will leak your data.

So for example with Treasure they had a uh leak where the analytics platform that their shipping provider was using leaked their customers data and this is bad but so there isn't actually a solution out there today and uh another problem with that is with uh you know privacy is that what you buy reveals your intent. With a phone you have a lot of use cases for that. So, it's not really important to have or it's not that important to have privacy in your customer's data, but with a hardware wallet, it's extremely clear what you're going to do with that data. Uh, you know, and it's really bad if you have a list of basically people you can visit that all have a ledger at home, uh, you know, storing some sort of crypto. And as I mentioned before, you have the data replication problem.

Payment processor, shipping partners, FrePL, your own company database. And it's amazing if you yourself are very paranoid about your own data but you cannot have all these partners that all have their own database and own security assumptions. It's it's really bad. So one thing yeah these are the results of such systems many kidnappings all around the world especially in France. And one remediation that you can do is you can incentivize crypto payments but that also only works if your address is pseudo anonymous.

If you have an ENS name that is your full legal name, then everybody already knows that what you bought. And this is even worse than so what we built is something that we're going to open source very soon. It's called Serdan. And what we do, we do encrypt the customer's data inside the browser using a cold storage key and then only decrypt it in the warehouse at the packing station for the shipping momentarily and then it gets cryptographic deleted. So uh even though there will be many databases, all of them only have cipher text.

So it's end to end encrypted from the customer's browser all the way to the warehouse. Thank you very much.

Thank you. Thank you. Thank you guys. Take your steps here. I mean whatever you want.

Okay, cool. Uh and it's time for the Q&A session again. Our beloved audience, well you are you are doing amazing job. So many questions and votes. Let's start with the first one and this is going to be a pretty intense one.

There these are three questions. How much signing budget does C10 have? How long does it take to sign? And how much does it cost to check the signature? So, let's address them one by one.

Perfect. Yeah, that's a great question. So, signing budget 65,000 signatures and then the security degrades under 128 bits, but only slowly. So it's not like you do one more transaction then you're lost but it's just slowly. So we rotate it.

And then how long does it take to sign? We have an hash accelerator on the hardware which makes it so that it only takes to sign around 2 to 3 seconds. And cost to check the signature. Well our onchain verifier right now costs around 120 to 150,000 uh gas. But obviously in the future with lean sphinx we can uh take that down to around 3,000 gas.

All right, now to the next question and I guess many of you in the audience might have this question because all of these abbreviations they drive us crazy. So what is ECSDA?

Okay, so I can go more on this. So it's just an abbreviation which stands for a little curves cryptographic uh algorithm and it's what's currently used on Ethereum and uh Bitcoin and most of the other uh popular blockchains and uh the way it works more or less is uh through algorithm uh algorithm logarithmic multiplication. It's very easy for your private key which is like your password to generate your public identity which is your address that you use to do to sign transactions. But it's very hard with classical computers basically impossible currently to do the reverse. So uh the quantum problem that I spoke about before is that imagine that uh from your username online I could find out what your password is.

This is basically very like uh this is not how it will work but to give you a picture what would happen if with a strong enough quantum computer and this is why we chose to use another signature scheme. All right, straight ne to the ne. Oh, Jesus Christ. We have new top voted question. I have to change plans right now.

Do you think there is a need for a false sign feature on hardware wallets in case someone kidnaps me and asks to sign?

100% uh 1 million% agree. Uh what we have is a feature on our firmware and it's fully open source. You can check it out. It's uh called the rest pin. So you put this pin in and it loads up just like if it was a regular wallet but a different seat that doesn't have your, you know, actual money.

So you can actually load up your Duress wallet with, I don't know, a 100 bucks or 200 bucks or maybe even a,000 bucks and then basically say, "Okay, yeah, this is my wallet. I don't have any more money and give away that money."

That's smart. That's smart. Okay, we still have time for a few more questions. So the next one, do you use a quantum random number generator for the seeds?

Okay, so it's actually very funny. We have free true RNG on uh sources on our hardware wallet. So the both secure enclaves and the uh RNG uh engine of the STM board that we use and so quantum random generator. The thing is the whole idea is that there's background radiation and some background noise in the world and that influences the little randomness generator of the hardware. So it's it's it's if you go deep into it, it's like a super interesting subject.

I don't like quantum random generator. I would say in this case yes because there are certain quantum properties that influence it. Interesting. I mean really interesting approach. Do you have something to add?

No. Okay. Uh moving up to the next question and even though I consider myself a bit of a technical person it absolutely breaks my mind but I'll try to read that. If you take in lin sphinx how then how long does your signature take at two to the power of 30? So we haven't run benchmark on the lin sphinx parameter set but we use something called sphinx c minus 10 which is not too far off from this.

So a single sphinx signature on our hardware wallet with key generation takes a couple of seconds. Um so the way we do it on the pq1 is we sign twice and we compare them. So the whole flow also you need to take in consideration that UI is matched by the same core and it's not a multiore uh takes in total something like six to 7 seconds and but it's unoptimized. We still need to run uh stuff on it. Uh but uh yeah a single signature on lin sphinx I assume it will probably take just slightly more time to compute.

Okay after this answer I feel even less technical than I was feeling before. Anyway we are over time.

[music]

Automatic transcript — names and jargon may be misspelled.