Suppose Alice wishes to authenticate herself to Bob, by proving she knows a secret that they share. With pseudorandom number generators (PRNGs) they could proceed as follows.

  1. They both seed a PRNG with the shared secret $s$.
  2. Bob picks sends Alice some random number $i \in \mathbb{N}$.
  3. Alice proves she knows the share secret by responding with the $i$-th random number generated by the PRNG.

I am wondering why Bob sends a random number $i$ instead of just $1$. Then Alice just sends $G(s)$ (where $G(\cdot)$ is the PRNG) to Bob. Only Alice and Bob should have access to the secret $s$, and hence this should also work. In the above example, Alice and Bob should both have to compute $G(s)$ $i$ times, making it much more inefficient.

Which is the difference between what I am proposing and the original example? Aren't them both equally secure?

  • $\begingroup$ Where is this scheme suggested? As it's not on the linked Wiki page. $\endgroup$
    – Modal Nest
    Dec 11, 2020 at 13:27

1 Answer 1


Bob sends random number so they can use their shared secret for authentication process many times.

  • $\begingroup$ Ok, but it would be enough with my version for one-time use $\endgroup$
    – Bean Guy
    Dec 11, 2020 at 15:34
  • 1
    $\begingroup$ Yes, it would but for one-time use you don't need prng. You can simply use the shared secret s. $\endgroup$
    – NB_1907
    Dec 18, 2020 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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