4

Suppose F(X) = (5X) mod 9 is used to generate a one time password.

I am supposed to generate the first 8 values using the above formula, starting with the seed value of F(5)

Well I know that F(5) = ( 5 * 5) mod 9 gives me 7. Thats my first value. But what about the rest of them?

I know what the answers will be, but I'm not sure on how to use the formula to get these values?

Answer: 5,7,8,4,2,1,5,7

4

For the rest use formula:

f(x)=(5*x) mod 9

For example if you have f(5)=7 the next step is

f(x)=(5*7) mod 9 = 35 mod 9 = 8

and so on

  • 1
    @k31453 Remember to mark this as the accepted answer if you are satisfied. – Mrtn Jul 9 '15 at 9:09

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.