So I found a nice simple TOTP program in C, c_otp: https://github.com/fmount/c_otp
The example "secrets" are 7-character-long base32 strings, and it
gives me codes from them. But the ones Oracle give you (when you
click past the QR codes) are 26 characters long with the spaces
removed, and to them (with or without an '=' added on the end) it
says "invalid base32 secret", which sppears to mean that the validate_b32key() function in OpenSSL (v3.2) rejected it.
So is there another transformation that I need to do to the
"secret" string that Oracle spits out?
I found the GNU oathtool program from oath-toolkit, and its verbose
mode let slip that what I needed to do was pad the "secret" out to 32-characters long using '=' characters:
[26-char "secret"]======
I'll test it out with the Oracle website after lunch.
Computer Nerd Kev <not@telling.you.invalid> wrote:
I found the GNU oathtool program from oath-toolkit, and its verbose
mode let slip that what I needed to do was pad the "secret" out to
32-characters long using '=' characters:
[26-char "secret"]======
I'll test it out with the Oracle website after lunch.
Yep, it works.
I've had to monkey around a little with 2FA, but generally always got
it working with Linux. The "pass" password manager helps quite a bit
here to make it less painful, providing a nice front end to it.
Borax Man <rotflol2@hotmail.com> wrote:
I've had to monkey around a little with 2FA, but generally always got
it working with Linux. The "pass" password manager helps quite a bit
here to make it less painful, providing a nice front end to it.
I've now set an option in the window manager's menu that runs:
bash -c 'expr "`c_otp -f ~/.totpcodes`" : ".*(oracle: \([0-9]*\)" | xclip'
Where ~/.totpcodes contains the secrets for different sites (yes
I've observed that encrypting them is another option).
Now I just have to click the menu option, then paste into the form
in the web browser. That's easy enough for me.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 120:53:32 |
Calls: | 6,854 |
Files: | 12,358 |
Messages: | 5,416,992 |