[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[OATH-Toolkit-help] RE: oathtoolkit 1.6.2 - computational error in calcu
From: |
Martin Brett |
Subject: |
[OATH-Toolkit-help] RE: oathtoolkit 1.6.2 - computational error in calculation of elapsed time since epoch hence wrong result. |
Date: |
Tue, 5 Apr 2011 15:28:04 +0100 |
My bad , machine was set To BST.
Would I be correct in assuming that as of 1.6.2 TOTP is not yet
supported in usersfile or pam_oath ?
Regards
Martin
-----Original Message-----
From: Simon Josefsson [mailto:address@hidden
Sent: 04 April 2011 21:42
To: Martin Brett
Cc: address@hidden
Subject: Re: oathtoolkit 1.6.2 - computational error in calculation of
elapsed time since epoch hence wrong result.
Hi Martin!
Welcome to the list. I'm cutting to the details in your post:
> # oathtool --totp -v -N "2033-05-18 03:33:20"
> 3132333435363738393031323334353637383930 -d 8 Hex secret:
> 3132333435363738393031323334353637383930
> Digits: 8
> Window size: 0
> Step size (seconds): 30
> Start time: 1970-01-01 00:00:00 UTC (0) Current time: 2033-05-18
> 02:33:20 UTC (1999996400)
> Counter: 0x3F94032 (66666546)
>
> 48573438
>
> Conclusion
>
> It is apparent that both the calculated time since epoch value is in
> error leading to the wrong computation.
>
> When I adjust the time so that Current time has value of 2000000000 ie
> 2033-05-18 03:33:20 I do get the correct output value of 69279037
Try specifying the time zone for your time, which should be UTC:
oathtool --totp -v -N "2033-05-18 03:33:20 UTC"
3132333435363738393031323334353637383930 -d 8
Then I get the expected value 69279037. If the time zone is not
specified, the tool will use local time.
Was this your only problem? You referred to some problem with an
Android app, but didn't give details.
Cheers,
/Simon