News for hackers. Stuff that matters.
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.