←back to thread

248 points dogacel | 1 comments | | HN request time: 1.916s | source
Show context
3eb7988a1663 ◴[] No.43688279[source]
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
replies(4): >>43688338 #>>43688730 #>>43689457 #>>43689797 #
1. easterncalculus ◴[] No.43688338[source]
I love this one. The neat thing about TOTP is that while the algorithm itself is simple, the algorithms it depends on are also relatively simple, at least for cryptography. For HMAC you just need SHA1, and that can be implemented relatively easily without much more code. As a learning exercise it's quite good.