Question: Exercise 3 A toy one - time - password ( OTP ) generator Using any of your password hashing program implemented so far, implement a

Exercise 3 A toy one-time-password (OTP) generator
Using any of your password hashing program implemented so far, implement a toy OTP scheme as follows: Immediately after user registration
1
o TheserverstoresthehashedandsaltedpasswordasHSP=Hn(password||salt)asusual, where H(.) is a hash function and || indicates byte/string concatenation.
For each login
o TheserverupdatestheHSPasfollows:HSP=H(HSP||t),wheretisthecurrentdateand
time in any format you decide.
o TheservercalculateanOTPasthelast6bytesofHSPandsenditshexadecimal
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 (s)he will be rejected.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!