susam/mintotp
View on GitHub ↗ ★ 1,401 Python
Minimal TOTP generator in 20 lines of Python
16 mentions on Hacker News by 6 people: 6 stories, 10 comments · first 2019-10-19 · latest 2026-01-19
20082026
-
Original source of the 8 liner Python code: https://github.com/susam/mintotp/blob/main/mintotp.py
comment by susam · 2026-01-19 · in MTOTP: Wouldn't it be nice if you were the 2FA device? -
…4 years ago. Write the seed on a Post-It and you're all set. Not so convenient, but sound sleeping! https://github.com/susam/mintotp
comment by rslashuser · 2025-09-16 · in Scammed out of $130K via fake Google call, spoofed Google email and auth sync -
It is a bit terse, but there is a 20-line Python implementation which cleared up the ideas for me: https://github.com/susam/mintotp
comment by 3eb7988a1663 · 2025-04-15 · in Behind the 6-digit code: Building HOTP and TOTP from scratch -
…if you have your secret key on hand, you can generate your TOTP code with just 30 lines of Python!: https://github.com/susam/mintotp/blob/main/mintotp.py It's amazing! Its default UX assumes you're basically air gapped. It works based on a…
comment by lelandbatey · 2025-03-02 · in Towards a test suite for TOTP codes -
…well, so a python TOTP generator can be pretty small, 30 lines in this case...and not too golfed: https://github.com/susam/mintotp/blob/main/mintotp.py
comment by tyingq · 2024-02-26 · in TOTP Codes in the Terminal -
…equivalent of what Google's offering here. Is there a "KeePassX" of the passkey world? [0] - https://github.com/susam/mintotp/blob/main/mintotp.py
comment by lelandbatey · 2023-05-04 · in Google Introduces Passkey Authentication -
…minitotp[0] which only uses the Python standard library available from Python 3.4 and above. [0] https://github.com/susam/mintotp
comment by fbdab103 · 2023-05-04 · in TOTP Authentication with Free Software -
A little golfed, but TOTP in python, using only base/included modules, is not much code. https://github.com/susam/mintotp/blob/main/mintotp.py
comment by tyingq · 2023-05-04 · in TOTP Authentication with Free Software -
…of ps -ef too thereby exposing the secrets to other users. By the way, I have a similar script at https://github.com/susam/mintotp but it reads secrets from the standard input (as opposed to reading from command line arguments), one secret…
comment by susam · 2022-10-18 · in TOTP tokens on my wrist with the smartest dumb watch -
▲ 157
MinTOTP – Minimal TOTP generator in 20 lines of Pythonstory by susam · 2022-10-18 · 51 comments
-
▲ 2
Minimal TOTP Generator in 20 Lines of Pythonstory by susam · 2021-08-28 · 0 comments
-
▲ 2
Minimal TOTP Generator in Pythonstory by susam · 2021-02-25 · 0 comments
-
…that might look like, I have a 30-line Python code here (TOTP generation only, no verification): https://github.com/susam/mintotp . Indeed the core function (the HOTP function) contains only 6 lines, thanks to Python's extensive standard…
comment by susam · 2021-02-25 · in RFC6238 TOTP implementation in pure PostgreSQL -
▲ 18
Minimal TOTP generator in 20 lines of Pythonstory by susam · 2021-01-25 · 1 comment
-
▲ 1
MinTOTP – Minimal TOTP Generator in 20 Lines of Pythonstory by susam · 2021-01-12 · 0 comments
-
▲ 25
Show HN: Minimal TOTP generator in 20 lines of Pythonstory by susam · 2019-10-19 · 5 comments