News for hackers. Stuff that matters.
Re:PyPI will require 2FA by the end of 2023 by badsectoracula on Friday May 26, 2023 @05:19AM (#36081855)
Does TOTP rely on some external service though or can it be done fully locally? AFAIK a benefit of private+public key signatures is that it can all be done without reliance on 3rd parties.
Re:PyPI will require 2FA by the end of 2023 by proto_lambda on Friday May 26, 2023 @05:23AM (#36081892)
All it requires is the initial setup key and a somewhat accurate (~30s) time source.

Give https://en.wikipedia.org/wiki/Time-based_one-time_password#A... a read, it's extremely simple.

Re:PyPI will require 2FA by the end of 2023 by badsectoracula on Friday May 26, 2023 @05:33AM (#36081978)
Thanks, i took a look in the page and it looks quite simple. One question i have would be that it mentions:

> TOTP credentials are also based on a shared secret known to both the client and the server

AFAICT this "shared secret" is something that is shared between the service you want to authenticate with (e.g. PyPI) and "you" (your password manager, TOTP client or whatever), right?

In which case i guess this sounds something like it can be done fully locally indeed.

Re:PyPI will require 2FA by the end of 2023 by proto_lambda on Friday May 26, 2023 @05:37AM (#36081998)
Yes, I don't know of any TOTP authenticator that doesn't work fully locally (disregarding things like key backups).
Re:PyPI will require 2FA by the end of 2023 by badsectoracula on Friday May 26, 2023 @05:45AM (#36082051)
I did use Authy once for a service i used for a bit but it required me to put my phone online every time[0] i tried to authenticate because otherwise the authentication would fail, so the association Authy=TOTP made me think a reliance on a 3rd party service is required and the page mentioning only mobile phone apps also made me think there is also some sort of reliance on mobile phones.

[0] I have a very old Android phone that i always keep offline

Re:PyPI will require 2FA by the end of 2023 by zeroimpl on Friday May 26, 2023 @10:08AM (#36084362)
Authy also supports their own auth system that isn’t TOTP but rather a server-push model which requires your device to be online to receive the token.
Re:PyPI will require 2FA by the end of 2023 by arp242 on Friday May 26, 2023 @05:32AM (#36081965)
No third parties are involved. You get a secret (often presented in the form of a QR code, but most implementations also have it as text) which you store and generate short-lived secret messages based on that and the current time, which is the code you enter. The server also knows the secret and can verify you sent the correct message. That's pretty much all there is to it.

It's really simple; I once wrote an implementation in Python in 20 lines or so based on just the specification, and I'm not a crypto guy at all. It's probably one of the simplest crypto systems to implement.

One clear advantage of this is that a code is only valid for a short period of time (usually a few minutes at the most). I can't re-use the code you used yesterday, and intercepting codes is also much harder as it's much more time-sensitive.

Re:PyPI will require 2FA by the end of 2023 by badsectoracula on Friday May 26, 2023 @05:50AM (#36082080)
Yeah, the more i read about it the better it sounds and the more it seems that i had a misunderstanding about it. Perhaps i'll try implementing it once to see exactly what it is.
Re:PyPI will require 2FA by the end of 2023 by boneitis on Friday May 26, 2023 @05:43AM (#36082044)
Sibling posts have pretty much answered it already. If you want to really overgeneralize it, it blew my mind a mere few weeks ago when I finally came to the realization after all these years that TOTP is nothing more than an initial seed value, as one half, combined with the current time as the other seed half.

I had a huge jackie chan meme moment at that point.

Then I realized that, all along, my password manager has a feature to store TOTP, and there is not even a strict need to use all these authenticator apps. (Of course, as someone who strives to exercise some security mindfulness, I reckon it undermines much of the overall point of TOTP to keep it within the same datastore as your account password.)

Re:PyPI will require 2FA by the end of 2023 by badsectoracula on Friday May 26, 2023 @05:47AM (#36082060)
Yeah the more i read the comments the better TOTP sounds.