Conditional Decryption and Threshold Oracles
Oracle Summit Buenos Aires 2025 · 18 Nov 2025 · 10:19
Patrick McClurg, CTO of Randamu, shows how threshold cryptography can make oracles unlock secrets. He explains t-of-n threshold signatures, distributed key generation and aggregatable signatures, then how identity-based encryption, behind drand's time-lock encryption, can be pointed at real-world conditions instead of clock time. Data encrypted to a question such as whether the sky is blue becomes decryptable only when an oracle committee signs that answer. Uses include conditional swaps, upgrades gated on audit attestations, onchain order books and data released by prediction markets.
Speakers
Topics
From Oracle Summit Buenos Aires 2025, hosted by Stable Summit.
Transcript
Hello. Hello. Absolutely packed house today for the blockchain Oracle Summit. Very exciting stuff. Um, so the title of my talk is decrypt my data only when the sky is blue. And it follows on nicely actually from the prediction market talk we just had because you could also have decrypt my data only when a particular prediction market evaluates to a particular outcome. But before I get into it, a little bit about myself. Started working in Tradfi in 2013. got into the blockchain space via the EOS hackathon in 2018 and since then I've been working across digital identity and digital currency and most recently worked protocol labs uh on the
DRA team doing verifiable randomness oracles and in 2023 I founded random which does lots of interesting things built on the same technology that powers Dand uh we're pretty small team five cryptographers and devs mostly we like to do hackathons 's puzzling and drink lots of fancy expensive coffee. So if anyone has any recommendations for coffee in Buenazeris, please let me know because it's been a little bit dire so far. Uh we built a decipher network which is the next iteration of DAND. It's all about threshold cryptography in a generalized sense. So applying threshold cryptography to other new problems and oracles and execution are one of those big problems.
So we're going to first gain a high level understanding of threshold cryptography and then we're going to build simple protocols with it and then we're going to use our our new knowledge to build seemingly impossible protocols like uh how can I decrypt some data when an oracle says the sky is blue. So what's threshold cryptography? Uh well today we'll be talking of a T of N signature scheme which like all things cryptography has a a very inscrable name. Um but in in essence well a signature scheme I guess most people are familiar with. You have some private key you sign things with it and people who can have your public key can verify that the signature is authentic that you in fact signed it. Um the T of N part basically
means that uh we have n different signers and we have we need of them to work together in order to create a valid threshold signature. So we've got seven dwarfs here. If four of them create signatures, uh together those signatures will form a valid signature for the entire set of seven dwarves. Additionally, any group of four dwarves who sign will come up with the same signature. And this has some interesting properties that we'll get to into in a little bit. So intuition on how this works. It's a little bit like drawing a line collaboratively. So if you imagine we've got n equals 3 this time, Alice, Bob, and Carol, we have a threshold of two.
So we want to draw a line together but with one single point we can't actually draw well we don't know that we can draw the correct line because from a single point there are an infinite number of lines going an infinite number of directions so we can't possibly be sure uh with a chance greater than chance that we're going to draw the correct line. But if we were to get a single point from another one of the people on our committee so Bob or Carol uh we we know the full line basically. So we can draw a line intersects both our points and it will be the correct line for our committee.
Similarly if we get Carol's point it will be on the same line because that's how a line works or at least a straight line I should say. I guess a curved line might be a bit different. Uh and similarly if we get just Carol's point we will draw the same line as if we had our point and Bob's point. So today we'll also talk about aggregatable signature schemes uh which in essence is taking this signature from the seven dwarves and sticking it together with other signatures from other sets of seven dwarves such that we end up with one final signature uh that we can verify all the different committee signatures all in one shot. Uh this is pretty nice. So we get a bit of a Frankenstein signature at the end.
This is pretty nice because it saves us a lot of gas on when doing things on chain. We can have a lot of different committees for example prediction markers for example different oracles uh pulling different sets of data and we can verify the result just in one one go. Um another interesting property of a signature scheme is that when we get a valid signature for a committee we can actually attribute that signature to individual parties in the committee. So back in our seven dwarves example we know that four at least of the dwarves signed to to attest to something but we don't know which four did it. So for some privacy related protocols that can be quite important and if threshold is more than 50% it's basically an honest majority consensus. So kind of a lot of blockchainy stuff uh boils down to have you got a majority consensus. So we can
do that without the blockchain. Another interesting property is if we have a threshold lower than 50% we can have multiple disperate groups come up with the same signature. So, uh, if you imagine, oh, I thought I had a slide in there, but we could, if we had a threshold of two, uh, for any set of two dwarves and our seven dwarves, we could come up with the same signature, even if they weren't connected to one another, which is interesting for poor network scenarios. Um, so how do we make this happen? Well, firstly, everyone needs to get a key share in order to make that happen. So, we perform a protocol called distributed key generation. In essence, we do a fancy protocol where we pick a polomial.
We evaluate it at a point for each of our seven dwarves and we send those seven evaluations to to each one of the other dwarves. Uh everyone else does that. They pick a polinomial. They evaluate it seven times. We each get seven evaluations for each of the polinomials and using that we can interpolate some other polomial that nobody has and that is secret. So that's the secret key. Secret key is never in memory. So nobody can use it unilaterally uh without uh the other four uh with at least other three dwarves uh getting on board. So we can use to build higher level protocols. The first protocol uh we built with this was DRA. So it's an oracle for verifable randomness. Basically every unit time DAND ticks with a new signature. So
signature is mapped to wall clock time. Each node in the network is attesting to the fact that some wall clock time has been reached and they sign a message which in this case is just the epoch number which reflects some wall clock time. We exploit the fact that without the secret key nobody can predict what a future signature is going to look like. Otherwise the signature scheme would be kind of useless because we could just forward signatures uh for other people's keys. Uh so therefore the signature if you don't have the private key is as good as random. So because nobody has a private key, it is basically randomness.
Oh, hello Dylan. I see you just popped in. Nice to see you. Um, on top of that scheme, we built a thing called time block encryptions. We realized that because we knew what all the future messages were going to be due to the properties called pairing pairings. In this particular threshold scheme, uh there's a relationship similar to a public and private key between the message that's going to be signed and the signature at that future time. So uh it's a thing called identity based encryption and it's based in this fancy maz which we're not going to go into because I've only got 6 minutes 45 left. Uh but in essence like I said uh there's a relationship like a public and private key that future message. So 1237 in the bottom here becomes like a public key and the decryption key becomes this
signature that gets emitted at epoch 1237. So yeah, similar to traditional trapdo asymmetric cryptography that we're all used to. Excellent. Um, taking that a stage further that allows us to use one particular oracle dand in order to do time lock encryption because dand kind of reports the time in a very roundabout way. But if we were to instead base it on real world conditions, we could start decryting data whenever real world conditions are met. So take the same identity based encryption but instead encrypting a time we pose questions to Oracle network. So for
example first I got to apologize that uh this particular image isn't editable text and some Philistine used the British or the American English spelling of color around the British English spelling. So I apologize profusely. I'm disgusted but I didn't have time to change it. But anyway, we pose a question to an Oracle network such as what color is the sky? And we can use the resulting answer that we're interested in to encrypt our data. So here we've got a blue padlock. When the sky is blue, we'd like our data, hello world, to be decryptible. So uh we incipher uh the data using our um public key, the color blue in some formation.
And if Oracle network evaluates uh the fact that sky gray, uh that's that's no use to us. We can't use that as a secret key. But if they were to say the sky is blue, we do this fancy pairings again that we saw before. uh similar to Dan's uh track of the time and we can decrypt our data and get uh the result back. Um with that you can actually build a whole bunch of other interesting um interesting protocols. So we built a swap protocol only swaps on top of that uh which allows you to swap based on certain conditions. Uh choose your committee of people who'd like to evaluate these conditions like is the sky blue? Um and that way you can actually get distributed oracles nicely.
You can you can uh rely not just on one Oracle provider but multiple or multiple Oracle providers at once for increased assurance. Uh you can also do things like schedule upgrades for your contract. So um if an Oracle says um uh the um my upgrade is safe for example or if an oracle says I passed a security audit for a given implementation. you just basically format a message of a specific taxonomy uh and get some committee to sign it attesting the fact that that's safe. Um so yeah, that is that's basically everything. Uh you can use Oracle data to decrypt uh different cipher texts that you've got and that unlocks a whole wealth of new protocols. You can do
things like onchain order books. Uh you can do things like uh encrypted data that unlocked by prediction markets and that's very exciting. So give us your data and we can build seemingly impossible protocols. Uh and I'll open the floor to any questions if anyone has any. Going once, going twice. [snorts] Thank you very much.
Related talks
- drand 🛠 using drand and timelock encryption - Patrick McClurg
- Bring Your Own Oracle (BYOO): Strengthening Decentralized Trust with Threshold Cryptography
- DeFi Security Summit 2024: Day 1, 8 November
- Building Secure Distributed Computing Systems for Blockchains, Over Blockchains with Aniket Kate
- Randamu | dcipher: a new protocol for decryption - Patrick McClurg | ETHDam III - 2025
- Post-Quantum Transition
- Decentralized workload distribution with VRFs and reputation systems
- Will Quantum End "Your Keys, Your Coins"?
- TWAP Oracle Manipulation Risks
