9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Totp in factotum (advice and code)
@ 2023-03-16 19:08 sirjofri
  2023-03-16 19:51 ` [9front] Totp in factotum sirjofri
  2023-03-21 20:10 ` [9front] Re: Totp in factotum (advice and code) sirjofri
  0 siblings, 2 replies; 7+ messages in thread
From: sirjofri @ 2023-03-16 19:08 UTC (permalink / raw)
  To: 9front

Hey all,

as I mentioned before, I am working on totp support in factotum. Here is what I have now:

http://sirjofri.de/oat/patches/totp.zip

(will do it as a proper patch when I'll submit it for inclusion, for future reference.)

I kindly ask for advice about the protocol, which I also describe here shortly for those who don't want to open the zip file:

The client protocol looks like this:

- write (optional): digits + seconds
- read: otp[digits] + time_remaining

This can be used by programs to display the current OTP code in a gui, for example.

The server protocol looks like this:

- write totp: otp[digits]
- read response: "valid" | error

This can be used to verify an entered OTP code.

The keys can look like this:

key proto=totp user=a role=client !secret=abc
key proto=totp user=a role=server digits=6 seconds=30 !secret=abc

Inside the code there are surely potential bugs, leaks, nonsense etc, just so you are prepared.

Note that I plan to submit this to the 9front distribution (if that's welcome), so any advice that can help improve quality is welcome.

sirjofri

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-04-05  7:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16 19:08 [9front] Totp in factotum (advice and code) sirjofri
2023-03-16 19:51 ` [9front] Totp in factotum sirjofri
2023-03-17  9:48   ` cinap_lenrek
2023-03-17 16:43     ` sirjofri
2023-03-18  1:42       ` cinap_lenrek
2023-03-21 20:10 ` [9front] Re: Totp in factotum (advice and code) sirjofri
2023-04-05  7:08   ` sirjofri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).