Delegated time lock puzzle by Aydin Abadi (UCL)
Nethermind Summit Istanbul 2023 · 7 Dec 2023 · 25:47
Aydin Abadi of University College London explains time-lock puzzles, a cryptographic way to send a message into the future, and the gaps left in the original design. The talk asks what the upper bound on solving time should be, how clients and servers with limited computing power can take part, and how to handle many puzzles efficiently. It presents a delegated scheme with cheap hash-based verification and smart-contract payments, plus a collusion attack on an earlier scheme.
Speakers
Topics
From Nethermind Summit Istanbul 2023, hosted by Nethermind.
Transcript
here's your pointer if you get let me the idea of so it's more about cryptography um uh the the Primitive uh has got some application in lection as well so the idea of sending information to the Future was proposed by Timothy May in 1993 so that idea was to somehow encrypt the initial idea was to somehow involve a third party to encrypt a message such that the message can be decrypted after a certain period of time the idea was
cool uh but it involved some trust the third party later on a few uh years later uh riest and Shamir proposed uh time lock puzzle or come encryption uh where you don't need any trust at third party so it relies on the idea of sequential squaring so you encrypt the value and then send it to decryptor then after a certain period of time the decryptor can decrypt it so this talk about is in this C and we will show that uh this idea was
cool but still requires some work U and we we identified a set of gaps I would say so it's a joint work with Dan R PhD student and Sten M from UC uh so I'm going to I've already uh given you a background on on time like puzzle but I'm going to give a short background on time like puzzle and then three questions that I think is worth thinking about and then I I'll propose our ideas and if I have time I can also talk about the attack we found in one of
the papers uh in this area that was published in CCS uh recently so time lock puzzle allows a client to create a puzzle in the setup phase it generates some parameters in the uh puzzle generation phase it creates puzzle and then sends the puzzle that encodes message M to Sol then solware continuously works on it if the the the time parameter is for one year then it works for one year until it finds the secret key and
decrypts uh the message to get the plane takes message uh this is the the algorithm the setup is the algorithm of set of algorithm of reverse rever um as you can see that there's a parameter t which is the product of two parameter s and Delta Delta is the time within which a message should remain secret one year two years and S which is the most important part is uh the the maximum number of
squaring modular M that is recorded that the strongest server in the world can do the square okay this parameter is important I'm going to get back to it a bit later and then based on the parameter T we we calculate uh a blinding factor a which is 2 to the power of T modu of P of n okay so it's not complicated U but the main focus is on S so our observation so in this slide I said it is for the strongest server but
in the literature of to this day before our paper nobody said that it's they said it is for a server our observation is that s the parameter s is the is the lower is for a strongest server while lower bound I mean the the earliest time that the strongest server in the world can find the solution of the puzzle okay if that's a case which we think is the case then we don't have oper R so what is the latest time that the regular server with average computation power
can find the solution if you are wrong then that refers to uh the upper the pr Earth then we don't have lower band but in cryptography usually we focus on the strongest server we don't usually focus on a specific server thus we think that s is for lower band the strongest Ser so the first question is what about the upper band how do we Define uh the latest time that a regular server can find the
solution so again I'm going to give you background and then uh raise the second question so as I mentioned earlier in the you know in general in time lock puzzle we have got three phases uh setup and puzzle generation and solving puzzle solving puzzle obviously requires by definition requires time and resources the server needs to allocate certain uh time and certain computational resources that means not every server can do that if they allocate time and
resources they cannot complete other tasks delegated to them okay also uh the client who generates the puzzle uh needs to Bear some computational cost as well so again I'm referring here to the original timel puzzle of reest as you can see in the set of phase we have on step five we have got a which is uh 2 to the power of t u more mod VN of course f is smaller than n but still needs to do some comp
modular computation exponentiation uh which is costly right also in generating puzzle uh the client needs to do some exponentiation again R to the power of a mod n which is cated so the the question is what if these two parties server and client don't have enough computational power then does mean that they can't uh engage in this kind of protocol can't use
it so um the third question again backround uh in we have a setting called multiple puzzle or multiple for multi instance we propos it uh in 2020 21 uh so it considers the case where a server is given many puzzles by one client at once and it needs to solve all of them uh and needs to find each solution at different point in time so if you use knif solution uh the original U scheme of reest then the
client generates all the puzzle P1 to pz and sends it to the solver as you can see here the solver needs to deal with each individual puzzle in parall so if the number of puzzles are higher than the number of CPUs or cores it has got then it needs to park some of the puzzles solve some puzzles and then get back to the rest of it which delays uh the process of finding Solutions on time uh there are some mechanism to deal with this situation including a previous
solution so the idea is to change the puzzles so in instead of letting the server to deal with all of them sequen uh in parallel we can create the the puzzle in a way that it can deal with the puzzle sequentially so we embed some information needed to find the next puzzle into the previous puzzle so he needs to find the first puzzle in order to find enough information to find the second puzzle and so on so for this is very helpful and they can uh save some costs however in this scheme including our own solution previous solution the
the time intervals between two uh puzzles uh in a row um uh has to be uh equal has to be identical so all of the time intervals are Delta okay and for verification to ensure that the the puzzles are correct some of the solutions impose very high computational costs and some some of them include even proofs so it's not cheap as well so third question is uh how can we design a mechanism that deals with multiple puzzles but it imposes low
verification cost and also it uh doesn't require This Server to deal with all of the puzzles in par so three questions again to recap uh what about the upper bounds uh what if the client and server don't have enough computational power and also um how to design a system that deals with multiple puzzles efficient to answer this question this set of questions uh we propose the idea of delegated stand
it allows endtoend delegation both the server and the client can delegate uh their uh t uh their task uh which is computational computation expensive to uh some helpers please recall that the main idea of time lock puzzle the main goal is to let the server to find the solution after some period of time the rest is kind of marginal so we want to achieve this goal but without requiring Too Much from the server and the
client and the verification in our system is efficient so we developed a a protocol that uh realizes the this notion of delegated cond of person as I mentioned it supports end to endend delegation and doesn't require the time intervals between two different uh intervals to be identical can they can be uh different size uh and for verification it only involves uh implication of hash function which is very cheap compared to zage proofs or
uh other mechanisms so to design this protocol uh we use the original uh term loock puzzle and also hash based commitments uh symmetric key encryption smart contracts and a few other things that be developed such as a function called customiz extra delay generating and also a fair payment algorithm and uh a modified uh multi instance tet puzzle chain tet puzzle so to give you some brief background on the on the function we uh
we def find and this customized extra delay uh generating or cedg so the definition is quite generic it's not as specific to our time Lo puzzle it can be used in other mechanism uh including uh the verifiable delay function verify delay function is an interesting uh research line uh the function itself allows someone to generate some random values after a certain period of time so and sometime mostly they they rely on the sequential squaring and comel puzzle as a c so so
um another mechanism can use uh this generic definition as well so the function itself uh takes as inputs uh type of computation we require in this context it can be sequential squaring uh s parameter s which is the the maximum number of uh exponentiation that a strong the strongest can perform per second um the time period for each puzzle uh to remain uh private and some auxilary information about specific server the output of this function is
the extra delay that the server requires to find the solution ex extra delay compared to the strongest server and also we equipped uh the protocol with pay Fair payment system so in order to Design Fair payment system we Define upper bound using uh this function and also we design an algorith to ensure that uh the server or the helpers get paid only if they provide valid solution
because uh again so in the literature in the context of time like puzzle uh there's no guarantee if we want to delegate the computation of solution to third party there's no guarantee that someone can get the results right even if they find the pl PL text message there's no guarantee that they provide it h so we needed to ensure that and incentivize them to provide their result the the approach was standard so as long as you have efficient verification mechanism in place and that can be done by smart contract then you can deposit certain
amount of coins and then if the solver or helper provides the valid solution and the smart contract approves it then it can get paid of course the smart contract needs to make sure that uh they provide a solution on time uh with regard to oper bound and of course the Lear so there are uh three types of parties involved in in this protocol client is a standard client who wants to create a puzzle and wants to release the message after a certain period of time we have a server who is interested in
getting the result result on time and we have got two helpers one helps uh the client the other one helps the server so very briefly the the protocol works as follows first the clients uh generate some parameters based on the pl text message a vector of PL Tex message M1 to m z and some time parameters Delta uh gener key and then uh encrypts each individual messages and sends the the the key for symmetric encryption and the sometime parameter to the server
and then sends the the cipher text to helper number one the solver based on these parameters generates the extra delay and creates a smart contract deposits some uh coins in the smart cont then helper creates puzzles uh based on the the the cyer text that it receives from the uh clients and then sends all the paramet public parameters and puzzles to the uh helper number two who solves the puzzles individually and sends the proof of
correctness and the solution to the puzzle which are still surer text uh to a Smart contract which verifies the correctness of the uh solution and verifies the proof and then solver can learn from the a smart contract the the plane takes um Itself by decrypting parsing and decrypting the solution then of course uh the smart contract pays uh the helper number two if it provides valid solution so we have done both uh as asymptotic and also concrete cost
evaluation of the protocal uh in terms of asymptotic cost as you can see here the set up uh the the first roow is our efficient delegated con puzzle so the client doesn't need to do anything and his task is dedicated to uh the helper number one uh in terms of Delegation it requires to perform only symmetric encryption whereas the other schemes don't need to that this extra uh computation that our scheme uh imposes however it is uh cheap um and if I uh summarize the overall the overall uh
computation complexity uh remains more or less the same as as um our generic uh chain t posle uh but it deals with multiple puzzles efficiently and it is linear with a number of puzzles so if I compare them uh three schemes one is R the original time uh puzzle and then our previous work also this kind one uh the the top one uh doesn't support multiple uh puzzles and it's suppos niely so it's very
inefficient or the second scheme do support uh multiple puzzle but the time intervals need to be identical but the second the third one supports efficient multiple puzzles and the time intervals can be different uh so in terms of uh features uh our efficient delegated T puzzle supports multiple puzzles VAR size U time intervals verification efficient verification uh delegation anex exact time delivery of course it also has fairness payment and feature that other
schemes do not have uh we have implement and these protocols and also previous work like uh the the original T puzzle by and Sham and you can access the the code on the GitHub using the the QR code uh also we have Implement uh we have done the analysis on the implementation uh in those two boxes you can see the summary for instance for the client side uh uh comparison so R scheme can save client by up to
1,000 times compared to the original reest scheme and for the saver side computation it can save cost uh by 5,000 times again it doesn't mean that or overall computation cost is less but our goal was to uh allow parties to delegate the computation to different parties uh to lower the cost and the man right uh so as I mentioned uh in CCS 2021 uh in ccs to 2021 a paper appear to
allow uh parties to delegate the computation of sequential squaring to some uh parties however we uh we realize that this um sche has a problem we identified an attack and show that if uh these uh servers collaborate with each other and uh design U an enforceable collusion smart contract then they can get paid without doing the job so we release the paper regarding U this attack as well on a separate
paper and the reason they can do that is that nowadays we have got smart contracts and it's not just for Good Guys it can be used for bad guys they can enforce uh m Behavior so they can deposit certain amount and they agree to do some uh to provide some incorrect uh computation result to to to a Smart different smart contract if they do that if they misbehave honestly then they can get rewarded otherwise they lose their deposit if they don't misbehave um we contacted the authors and then uh
we let them know about the problem and they asking to suffering so I'm happy to answer questions and this is the link for the pap
Related talks
- PQ Ethereum Q&A
- Post-Quantum Transition
- So you wanna Post Quantum Ethereum
- Post-Quantum Cryptography: PQ Signatures
- PQ Testnet Roundtable: Signature Aggregation
- Bringing Ethereum to Post Quantum Era.
- Formal Verification in Lean
- LCamel | 從 Merkle Tree 到 LazyTower| Taipei Ethereum Meetup
- leanSPHINCS: Signing for the long run
