From 2a6299c32e0baf3df06f8e6d6bc8695b951d630d Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Mon, 30 Mar 2020 21:57:53 +0200 Subject: Implement OTPState in the server module --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index fef620a..ac3bca9 100644 --- a/README.md +++ b/README.md @@ -57,10 +57,32 @@ one-time password it received, and must store the corresponding one- time password sequence number. The server must also facilitate the changing of the user's secret pass-phrase in a secure manner." +"The OTP system generator passes the user's secret pass-phrase, along +with a seed received from the server as part of the challenge, +through multiple iterations of a secure hash function to produce a +one-time password. After each successful authentication, the number +of secure hash function iterations is reduced by one. Thus, a unique +sequence of passwords is generated. The server verifies the one-time +password received from the generator by computing the secure hash +function once and comparing the result with the previously accepted +one-time password." + ## Examples -TODO + ```python + import getpass + + import otp2289 + + # create a generator object + passwd_bytes = getpass.getpass().encode() # Type: This is a test. + generator = otp2289.generator.OTPGenerator(passwd_bytes, + 'TesT', + otp2289.OTP_ALGO_MD5) + generator.generate_otp_hexdigest(0) + generator.gen.generate_otp_words(0) + ``` ## Author -- cgit v1.3