16 ms·
For those interested, I recommend reading how FIDO U2F works. There's more in a security key than just FIDO U2F, but FIDO U2F is easily the most ergonomic syste
by klodolph 8y ago
For those interested, I recommend reading how FIDO U2F works. There's more in a security key than just FIDO U2F, but FIDO U2F is easily the most ergonomic system that these security keys support. Simplified:
* The hardware basically consists of a secure microprocessor, a counter which it can increment, and a secret key.
* For each website, e.g., GitHub, it creates a HMAC-SHA256 of the domain (www.github.com) and the secret key, and uses this to generate a public/private keypair. This is used to authenticate.
* To authenticate, the server sends a challenge, and the security key sends a response which validates that it has the private key. It also sends the nonce, which it increments.
If you get phished, the browser would send a different domain (www.github.com.suspiciousdomain.xx) to the security key and authentication would fail. If you somehow managed to clone the security key, services would notice that your nonces are no longer monotonically increasing and you could at least detect that it's been cloned.
I'm excited about the use of FIDO U2F becoming more widespread, for now all I use it for is GitHub and GMail. The basic threat model is that someone gets network access to your machine (but they can't get credentials from the security key, because you have to touch it to make it work) or someone sends you to a phishing website but you access it from a machine that you trust.
- brightball 8y agoIt's also tremendously more efficient to tap your finger on the plugged in USB than it is to wait for a code to be sent to your phone or go find it on an app to type in. I've added it to everything that allows it, more for convenience than security at this point. Most places that allow it require that you have a fallback method available.
- minxomat 8y agoThats the single reason I got a smart watch. Just to have my 2fa codes on my wrist instead of getting my phone out of my pocket (I'm using Authenticator+)
- koolba 8y agoAny specific recommendations for a smart watch exclusively for 2FA?
- minxomat 8y agoThere are probably better options. I'm using a Huawei watch first gen. Rock solid construction, awesome (always on) display, enough battery life, android wear 2, no proprietary strap bs. It's about 100 USD for B Stock.
- braythwayt 8y agoThis is not normally considered a “hacker-friendly” option, but I use an Apple Watch. The above-mentioned 1Password has a watch app, so by using it for my passwords and TOTP codes, I maximize my personal convenience.
- pimeys 8y agoPebbles are quite cheap and offer 7 days of battery. The company went bankrupt, but you can still use the devices with rebble. The Pebble 1 is about 40€ and the rare Pebble 2 about 120€.
- abawany 8y agoI learnt from this thread that my smart watch (Garmin Vivoactive HR) also has 2FA apps available for it (e.g. https://apps.garmin.com/en-US/apps/c601e351-9fa8-4303-aead-441251559064 https://apps.garmin.com/en-US/apps/c601e351-9fa8-4303-aead-4...). I love the watch (long battery life, tons of apps including one from the famous antirez, built-in GPS, etc.) so I am thrilled that I have 2FA options for it as well.
- mrb 8y agoWell, remember the entire point of U2F is to not be phishable. Authentication codes—and your smart watch—are phishable.
- baby 8y agoOne thing I don't understand is why are apps like authy or google authenticator not using push notifications to allow you to directly auth via unlocking or touchID instead of having to go through the app. If you really want the user to type something then you can still use push notitication for easy app access
- jrowley 8y agoAuthy used to have push notification support for LastPass but it has stopped working for me.
- cube2222 8y agoLogging in to Google works exactly like this at the moment. It's probably because setting this up is more involved for the backend, setting up that key which you have to type in is fairly simple technically.
- brightball 8y agoSome do. A lot of companies that use Duo will set that up for their internals. The problem is that those push solutions require that the company have some means of communicating with the app that you're using to trigger the push and the confirmation (as far as I can tell). This technology works around that by letting the browser talk to the plugged in device, circumventing all of the network/api bits.
- spacehunt 8y agoTOTP is designed to be usable even while offline.
- Klathmon 8y agoBut is that trade off worth it? Is the ability to work offline worth giving up a simple prevention of phishing attacks?
- klodolph 8y agoFull circle here, since FIDO U2F has phishing-resistance like push notifications and lets you work offline like TOTP. "Offline" in the sense that everything besides whatever you're authenticating against can be offline.
- tptacek 8y agoIt's more efficient, but remember the point of this story, which is that it mitigates phishing attacks, which code-generating 2FA applications do not.
- meroje 8y ago1password does mitigate it to some extent by automatically copying the code to your clipboard after filling the form, these 2 things only work on the right domain. Of course you can still copy the values from the app but at least it hints at things being wrong.
- tptacek 8y agoIf you're using 1Password-generated passwords and storing TOTP codes in 1Password, how are the TOTP codes not just theater?
- arachnids 8y agoParent's argument is that it mitigates phishing - i.e your normal workflow is you go to a site and your credentials are automatically filled in, so you'd be suspicious if that doesn't happen. In my experience, the autofill breaks so much that I've started copying my password in manually all the time.
- closeparen 8y agoThe TOTP code does not add anything to phishing mitigation.
- Fnoord 8y agoDepends on the exact attack. If its a full MITM (including TLS), no. If its a fake website who don't forward after password-based authentication, yes. U2F would also detect the domain is incorrect, though so does my password manager. Though that's based on a browser extension. I suppose if the browser gets mislead, as would the password manager. And that did happen with LastPass (XSS attack IIRC).
- devy 8y ago> I've added it to everything that allows it, more for convenience than security at this point. It's convenient only when you physically have the security key; it's a hassle if you forgot or lost it.
- rhencke 8y agoI have one. It's attached to my key chain. If I've lost my keys, I have bigger problems. It's convenient.
- deleted 8y ago[deleted]
- brightball 8y agoIt doesn't have to be your only method.
- valenciarose 8y agoYou can (and generally do) have multiples of these tokens. They are easily revoked. The Fido only tokens are $15.
- bogomipz 8y ago>"It's also tremendously more efficient to tap your finger on the plugged in USB than it is to wait for a code to be sent to your phone or go find it on an app to type in." But with regular TOTP and a software device on a smart phone I can print out backup codes in case you lose your phone. This allows one to log in and reset their 2FA token. What happens if you lose your Yubikey or similar? I guess this doesn't matter as much in an enterprise setting where there is a dedicated IT department but for for individual use outside of the enterprise doesn't TOTP and a software device have a better story in case of loss of the 2FA device?
- winthrowe 8y ago> What happens if you lose your Yubikey or similar? Get two, leave one in your safe deposit box. Every service I've seen that supports U2F supports multiple tokens.
- bogomipz 8y agoI see that does't help much if you're on the road travelling unfortunately. At least with ToTP backup codes, someone at home can read you a printed backup code in order disable and reset your TOTP.
- brightball 8y agoAlmost every site that I've set it up with actually requires you have a backup method (app, codes, sms, etc).
- tialaramex 8y agoThe counter feature is dubious. You correctly describe the upside - if Bob's device says 4, then 26, then 49 it's weird if the next number is 17, and we may suspect it's a clone. But there are many downsides, including: Devices now need state, pushing up the base price. We want these things to be cheap enough to give away. The counter make tokens weakly trackable. If Facebook knows your token's counter was 205 when you signed in at work this morning and 217 when you signed in from your iMac this evening, somebody who visited GitHub at midday with counter 213 might be you, someone with counter 487 definitely isn't you, or at least not with the same token.
- tptacek 8y agoU2F tokens are already cheap enough to give away. We carry them around in sacks and hand them out at events.
- tarunupaday 8y agothey are not that cheap. the only yubikey that works with mobiles (NFC) is $50. the cheapest u2f I could find (it only has usb-a port) is $20.
- tytso 8y agoThere are at least two U2F keys I was able to find on Amazon which were under $10 USD: https://www.amazon.com/dp/B01N6XNC01 https://www.amazon.com/dp/B01N6XNC01 https://www.amazon.com/dp/B01L9DUPK6 https://www.amazon.com/dp/B01L9DUPK6 The latter is an open source / open hardware design: https://github.com/conorpp/u2f-zero https://github.com/conorpp/u2f-zero
- tarunupaday 8y agoNeither of them works with smartphone hence not of practical use.
- tptacek 8y ago
- gbacon 8y agoHow much implicit trust do users place in the manufacturers of their security keys?
- jron 8y agoTouch to auth is also the part that Google ignores for some strange reason. Their high security Gmail program defaults to remembering the device! There isn't a way to disable it either.
- rossjudson 8y agoI guess I don't need to touch-to-auth when I start every work day ;) Our internal gmail might not require it every day, but most systems at Google do. You can't get very far without it.
- gst 8y ago> If you somehow managed to clone the security key, services would notice that your nonces are no longer monotonically increasing and you could at least detect that it's been cloned. At least a year ago or so (last time when I checked) most services didn't appear to check the nonce and worked fine when the nonce was reset.
- justincormack 8y agoIf you can reset the nonce without resetting the key you can probably retrieve the key easily if you can read the traffic. The service should not need to check the nonce, and adding that much state is going to be complicated.
- crunchatized 8y agoIt's not that kind of nonce. It's not even called that formally, it's called the 'signature counter.' It's just a part of the plaintext signed with the keypair. There is zero risk of what you're talking about. And how is it complicated to store a single integer per account and perform a comparison if `counter <= previousValue` at each authentication to see if it's not monotonically increasing? They already store that user's public key and key handle, they can store another 4 bytes. In fact, the WebAuthn spec makes verifying this behavior mandatory. [0] [0] https://www.w3.org/TR/webauthn/#signature-counter https://www.w3.org/TR/webauthn/#signature-counter
- seanalltogether 8y ago> For each website, e.g., GitHub, it creates a HMAC-SHA256 of the domain (www.github.com) and the secret key, and uses this to generate a public/private keypair. This is used to authenticate. Can one usb device work on two separate accounts for a given domain, (e.g. work gmail and personal gmail), or do you need two of them?
- klodolph 8y agoOne device can work on two separate accounts, no problem. For the same reason you can use the same password for two different accounts (although there are other reasons why you wouldn't want to do that).
- AgentME 8y agoThanks for the explanation! Do you know why GNUK (the open source project used by Nitrokey and some other smart cards) chooses not to support U2F? I don't understand the maintainer's criticisms[0] and I'd like to probe someone knowledgeable to find out more. [0] https://lists.gnupg.org/pipermail/gnupg-users/2017-March/057850.html https://lists.gnupg.org/pipermail/gnupg-users/2017-March/057...
- klodolph 8y agoI am having some trouble understanding as well. Here is what I understand. The point of GNUK is to move your GnuPG private key to a more secure device so it doesn't have to sit on your computer. With GnuPG, users are basically in control of the cryptographic operations: what keys to trust, what to encrypt or decrypt, etc. With U2F, in order to comply with the spec you are basically forced to make a bunch of decisions that don't necessarily line up with GNUK's goals. You have to trust X.509 certificates and the whole PKI starting from your browser (CA roots and all that). Plus, U2F is basically a cheaper alternative to client certificates, but with GNUK you already have client certificates, so why go with something that provides less security? To elaborate: With GnuPG, the reason you trust that Alice is really Alice is because you signed her public key with your private key. You can then secure your private key on a hardware device with GNUK. With FIDO U2F and GMail, you have to trust that you are accessing GMail, which is done through pinned certificates and a chain of trust starting from a public CA root. This system doesn't offer you much granularity for trusting certificates. Adding FIDO U2F to a system designed to support a GnuPG-like model of trust dilutes the purpose of the device. By analogy, imagine if you used your credit card to log in to GMail, maybe by using it as the secret key for U2F. The analogy isn't great, but you can imagine that even if you can trust that (through the protocol) GMail can't steal your credit card number, the fact that you are waving your credit card about all the time makes it a little less secure. In general, people who work on GnuPG and other similar cryptography systems tend to be critical of the whole PKI, and I'm sympathetic to that viewpoint.
- tialaramex 8y agoU2F really, really isn't at all like client certificates. The certs baked into tokens are for _batches_ the specification says (and famous implementations like those from Yubico do this) that a batch of thousands of similar keys should have the same certificate, it exists to say e.g. "This is a Genuine Mattel Girl Power FIDO Token" versus "This a Bank Corp. Banking Bank Security Token". Relying parties are discouraged from examining it, since in most cases there's no reason to care. Unlike your GnuPG key, the FIDO token isn't an identity. The token is designed so that a particular domain can verify that it is talking to the same token it talked to last time, but nothing more. So e.g. if you use your GnuPG key for PornHub, GitHub and Facebook, anyone with access to all three systems can figure out that it's the same person. Whereas if you use the same FIDO token, that's invisible even to someone with full backend access to all three systems.
- SilasX 8y agoI appreciate the summary, but it's still a bit unclear to me. What do you mean by "for each website"? Certainly that doesn't mean every website in existence, so there must be some process by which a new website is registered with the hardware and the key communicated to the site? But if so, I don't see how that solves the problem of "user goes to site X for the first time, mistakenly thinking it's Github." That registers a new entry for the site and sends different credentials/signatures than it would send to Github. But site X doesn't care that they're invalid, and logs you in anyway, hoping you will pass on some secret information. Am I missing something?
- crunchatized 8y agoSolely going by GP's summary, nothing needs to be 'registered with the hardware' because the public/private keypair is deterministically generated on-the-fly, cheaply, with a PRNG every time it's needed. Only two things are ever in the nonvolatile storage on the device: the secret key used as entropy to generate those keypairs, and the single global counter. The system makes it impossible for phishing sites to log in to your account using your credentials. That's the threat model it guards against. Entering 'secret information' that isn't user credentials just plain isn't part of it. Though wouldn't anyone phished by e.g. FakeGmail already get suspicious if they don't see any of their actual emails that they remember from the last time they logged in to Gmail?
- SilasX 8y ago>The system makes it impossible for phishing sites to log in to your account using your credentials. So it's an additional factor for authentication, not a way of identifying fraudulent sites to the user? Okay, but you also said: >Entering 'secret information' that isn't user credentials just plain isn't part of it. Which is it? >Entering 'secret information' that isn't user credentials just plain isn't part of it. Though wouldn't anyone phished by e.g. FakeGmail already get suspicious if they don't see any of their actual emails that they remember from the last time they logged in to Gmail? You would think, but people have definitely entered information in similar circumstances. Also, there's always "sorry, server problem showing your emails, feel free to send in the mean time".
- IloveHN84 8y agoI hope Firefox will implement it, because Chrome isn't a trusted browser anymore
- schwap 8y agoFirefox has implemented it, although you need to go to about:config and enable "security.webauth.u2f" for it to work.
- tialaramex 8y agoThis is disabled by default because it doesn't entirely work. WebAuthn is fully implemented in Firefox, and on by default, but U2F is so far still much more common, and the U2F enabled by this feature switch is only kinda-sorta compatible. Sites need to move to WebAuthn, which works with the same tokens and browsers (well, Chrome, Firefox, Edge) have either shipped or demo'd with a promise to ship. But right now today U2F works in a lot of places if you have Chrome whereas WebAuthn is mostly tech demos. The most notable website that has WebAuthn working today is Dropbox, seamless in Chrome or Firefox, any mainstream platform (including Linux) and all the tokens I have work. That's what everybody needs to be doing.
- mdp 8y agoIf you're interested in seeing how it works in action, I built a U2F demo site that shows all the nitty-gritty details of the process - https://mdp.github.io/u2fdemo/ https://mdp.github.io/u2fdemo/ You just need a U2F key to try it.
- x0x0 8y agoDo you have a recommended device? Ideally it would work reasonably well with iphone as well as macbooks (unfortunately both usb-A and a courage's worth of usb-C). thank you
- bogomipz 8y agoSo is the main difference between FIDO U2F and regular TOTP simply the addition of the HMAC-SHA256 of the domain on the server side? Is there a requirement that FIDO be implemented on a hardware device?