From: sirjofri <sirjofri+ml-9front@sirjofri.de>
To: 9front@9front.org
Subject: [9front] Totp in factotum (advice and code)
Date: Thu, 16 Mar 2023 20:08:56 +0100 (GMT+01:00) [thread overview]
Message-ID: <3a87efed-5286-45f6-b3f1-1874f0e87a55@sirjofri.de> (raw)
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
next reply other threads:[~2023-03-16 19:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 19:08 sirjofri [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3a87efed-5286-45f6-b3f1-1874f0e87a55@sirjofri.de \
--to=sirjofri+ml-9front@sirjofri.de \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).