HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
pyramation
totp
PLpgSQL2021–2021
pyramation / totp

totp

RFC6238 TOTP implementation in pure PostgreSQL plpgsql

3Distinct people
6Mentions
0Explicit recommenders
118GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

RFC6238 TOTP implementation in pure PostgreSQL plpgsql

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour6 dated mentions

Observed mentions: 2021-02-25 00:35:18 UTC to 2021-02-25 20:43:54 UTC.

01232021-02-25 00:00:00 UTC to 2021-02-25 01:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsFeb 25, 00:002021-02-25 01:00:00 UTC to 2021-02-25 02:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 02:00:00 UTC to 2021-02-25 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 03:00:00 UTC to 2021-02-25 04:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 04:00:00 UTC to 2021-02-25 05:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2021-02-25 05:00:00 UTC to 2021-02-25 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 06:00:00 UTC to 2021-02-25 07:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 07:00:00 UTC to 2021-02-25 08:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-02-25 08:00:00 UTC to 2021-02-25 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 09:00:00 UTC to 2021-02-25 10:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 10:00:00 UTC to 2021-02-25 11:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsFeb 25, 10:002021-02-25 11:00:00 UTC to 2021-02-25 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 12:00:00 UTC to 2021-02-25 13:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 13:00:00 UTC to 2021-02-25 14:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 14:00:00 UTC to 2021-02-25 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 15:00:00 UTC to 2021-02-25 16:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 16:00:00 UTC to 2021-02-25 17:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 17:00:00 UTC to 2021-02-25 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 18:00:00 UTC to 2021-02-25 19:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 19:00:00 UTC to 2021-02-25 20:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-25 20:00:00 UTC to 2021-02-25 21:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsFeb 25, 20:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Feb 25, 00:002021-02-25 00:00:00 UTC2021-02-25 01:00:00 UTC110
Feb 25, 01:002021-02-25 01:00:00 UTC2021-02-25 02:00:00 UTC000
Feb 25, 02:002021-02-25 02:00:00 UTC2021-02-25 03:00:00 UTC000
Feb 25, 03:002021-02-25 03:00:00 UTC2021-02-25 04:00:00 UTC000
Feb 25, 04:002021-02-25 04:00:00 UTC2021-02-25 05:00:00 UTC303
Feb 25, 05:002021-02-25 05:00:00 UTC2021-02-25 06:00:00 UTC000
Feb 25, 06:002021-02-25 06:00:00 UTC2021-02-25 07:00:00 UTC000
Feb 25, 07:002021-02-25 07:00:00 UTC2021-02-25 08:00:00 UTC101
Feb 25, 08:002021-02-25 08:00:00 UTC2021-02-25 09:00:00 UTC000
Feb 25, 09:002021-02-25 09:00:00 UTC2021-02-25 10:00:00 UTC000
Feb 25, 10:002021-02-25 10:00:00 UTC2021-02-25 11:00:00 UTC000
Feb 25, 11:002021-02-25 11:00:00 UTC2021-02-25 12:00:00 UTC000
Feb 25, 12:002021-02-25 12:00:00 UTC2021-02-25 13:00:00 UTC000
Feb 25, 13:002021-02-25 13:00:00 UTC2021-02-25 14:00:00 UTC000
Feb 25, 14:002021-02-25 14:00:00 UTC2021-02-25 15:00:00 UTC000
Feb 25, 15:002021-02-25 15:00:00 UTC2021-02-25 16:00:00 UTC000
Feb 25, 16:002021-02-25 16:00:00 UTC2021-02-25 17:00:00 UTC000
Feb 25, 17:002021-02-25 17:00:00 UTC2021-02-25 18:00:00 UTC000
Feb 25, 18:002021-02-25 18:00:00 UTC2021-02-25 19:00:00 UTC000
Feb 25, 19:002021-02-25 19:00:00 UTC2021-02-25 20:00:00 UTC000
Feb 25, 20:002021-02-25 20:00:00 UTC2021-02-25 21:00:00 UTC101

What Hacker News says

6 sources
https://github.com/pyramation/totp/blob/master/packages/totp... yes in the notes of the source here The first TOTP implementation I wrote was here was much less efficient, literally the algorithm in steps: https://github.com/pyramation/learn-totp/blob/master/package... That gist is essentially the pure TOTP algo, but it was missing what we use in industry practice that the RFC was missing... base32 encode/decode. So I implemented a base32 encode/decode so that the TOTP algo actually works with google authenticator and authy https://github.com/pyramation/totp/blob/master/extensions/%4... When I found the gist, while the original code worked, the gist was much smaller (used more efficient bitwise operations) and the gist author I collaborated briefly and decided to combine the gist and the code for OSS
In RFC6238 TOTP implementation in pure PostgreSQL
This is very interesting if it was done for fun. However, this is very likely unsuitable for real world usage. A couple of issues I could see with a quick glance: - Using '=' for comparing TOTPs in the totp.verify function[1] is not safe from timing attacks. - The function random() used in the totp.random_base32 function[2] is not a cryptographically secure random number generator. [1]: https://github.com/pyramation/totp/blob/7ec3104/packages/tot... [2]: https://github.com/pyramation/totp/blob/7ec3104/packages/tot...
In RFC6238 TOTP implementation in pure PostgreSQL

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.