In many crypto papers I see they use a Real World / Ideal World Paradigm. However, I have never see the source code of such Simulators that try to simulate the adversary. Could somebody point me to source code that simulates an adversary in the ideal world? How does this code look like ?

An example of a paper that uses this paradigm is on pg. 1244 of this paper.

  • 2
    $\begingroup$ The paradigm is used to prove security. I don't think anyone codes it up. $\endgroup$
    – mikeazo
    Jan 16, 2014 at 2:43
  • 2
    $\begingroup$ People from theoritical cryptography would commit suicide if they ever discover code for simulation based security $\endgroup$
    – curious
    Jan 16, 2014 at 10:22
  • $\begingroup$ If you have specific questions that you were hoping to answer by looking at code, I'd suggest writing them up on here. $\endgroup$
    – mikeazo
    Jan 16, 2014 at 14:15
  • 1
    $\begingroup$ No code, but a somewhat related question explaining the term "simulator" as used in the paper you've been reading. And in case you didn't find it yet, "Simulation-based security with inexhaustible interactive Turing machines" might be an interesting read for you too. $\endgroup$
    – e-sushi
    Jan 16, 2014 at 14:20
  • $\begingroup$ Can you clarify why you are looking for such source code? It is true that a simulator would never be run in the real world, but source code for a simulator might help in understanding what the simulation is doing. $\endgroup$
    – user432944
    Jan 17, 2014 at 3:25

1 Answer 1


There is no source code to simulate this. It is a theoretic construct used in security proofs. Cryptography is often about the very limits of what could be calculated. This is quite far from actual programming source code.

For example, quite often something is called "efficient" in cryptography, if the algorithm runs in polynomial time (for some parameter). However, if the source code of a program actually requires $n^{1000}$ seconds then it still runs in polynomial time, but it is not possible to calculate it for $n=2$ (over $10^{293}$ years).

The adversary can not be represented by a specific algorithm, but the adversary is the union of all polynomial time algorithms (or said differently: He is limited to poly-time algorithms, but not specified which algorithms).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.