# Why this example about pseudorandom generators is performed like that?

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?

• Where is this scheme suggested? As it's not on the linked Wiki page. – Modal Nest Dec 11 '20 at 13:27

## 1 Answer

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

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