Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions