RFC 6238 in Common Lisp 0 ▲ Abstract Heresies 110 days ago · Tech · hide · Fediverse post I wanted to implement 2FA as per RFC 6238. This is the Time-based One-Time Password (TOTP) algorithm that is used by Google Authenticator and other 2FA apps. This was originally `vibe coded`. The vibe coding got me 80% of the way there, and I made a manual pass to turn it into a more functional style. Feel free to use this under an MIT license. ;;; -*- mode: lisp; coding: utf-8-unix; -*- ;;; RFC 6238: TOTP (Time-Based One-Time Password Algorithm) implementation in Common Lisp ;;; This implementation provides functions to generate a ;;; base32-encoded secret, create a QR code URI for authenticator ;;; apps, and verify TOTP codes based on the current time. It ;;; adheres to the specifications outlined in RFC 6238 and RFC 4226. ;;; Dependencies: cl-base32, ironclad (in-package "TOTP") (defun generate-secret (&optional (length 10)) (cl-base32:bytes-to-base32 (ironclad:random-data length))) (defun generate-qr-uri (secret email &key (issuer "JRM-Code")) (format nil… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town