authpass
authpass copied to clipboard
Support the steam totp
Please add support for steam totp. Giving a good example: https://github.com/Jessecar96/SteamDesktopAuthenticator
what is so special about steam totp? is there some spec or anything?
Sure, a Steam totp represented as a string of five digits and letters, such as 5AKL8, which is definitely generated by a special algorithm. And the specific github repo in my first reply is a good demo.
fwiw, this looks like a simpler implementation.. https://github.com/DoctorMcKay/node-steam-totp/blob/master/index.js
150 lines of readable JavaScript instead of a whole project where i have no idea what else it is doing..
Anyway, let's see if anyone else wants this..
Just to add a view extra informations regarding this issue. The steam algorithm is the same as the standard totp (with timestep 30s and SHA1). The only difference comes in the format shown to the user.
Instead of a X digits format ( the Snum mod 10^Digit
in RFC 4226 section 5.3), it performs a 26 base 5 digits with little-endian representation. The 26 chosen characters are : "23456789BCDFGHJKMNPQRTVWXY" (that is 0 leads to char "2", 1 leads to char "3", ..., 25 leads to char "Y").
As an example in C (S
is RFC Snum
and output
is the resulting string):
char *p = output;
char steam_encoding[26] = "23456789BCDFGHJKMNPQRTVWXY";
for(int i = 0; i < 5; i++)
{
*p++ = steam_encoding[S % 26];
S = S / 26;
}
*p = '\0';