Question: Exercise 3 A toy one - time - password ( OTP ) generator Using any of your password hashing program implemented so far, implement a
Exercise A toy onetimepassword OTP generator
Using any of your password hashing program implemented so far, implement a toy OTP scheme as follows: Immediately after user registration
o TheserverstoresthehashedandsaltedpasswordasHSPHnpasswordsaltasusual where H is a hash function and indicates bytestring concatenation.
For each login
o TheserverupdatestheHSPasfollows:HSPHHSPtwheretisthecurrentdateand
time in any format you decide.
o TheservercalculateanOTPasthelastbytesofHSPandsenditshexadecimal
representation to the user via SMS
o TheuserentersthereceivedOTPtologin.
o Theservercheckstheusersinputtodecideacceptorrejecttheuser
In the above scheme, you dont need to implement the real SMS feature, but just assume the user get the OTP and write a script to demonstrate that if the right OTP is given the user will be accepted; otherwise she will be rejected.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
