This isn’t strictly a privacy question as a security one, so I’m asking this in the context of individuals, not organizations.
I currently use OTP 2FA everywhere I can, though some services I use support hardware security keys like the Yubikey. Getting a hardware key may be slightly more convenient since I wouldn’t need to type anything in but could just press a button, but there’s added risk with losing the key (I can easily backup OTP configs).
Do any of you use hardware security keys? If so, do you have a good argument in favor or against specific keys? (e.g. Yubikey, Nitrokey, etc)
This is not quite the same product but I thought this device looked interesting
I bought a couple of yubikeys but haven’t fully implemented yet. When 1password has full support for using a security key in place of a passphrase, I will consider using them as my primary unlock method.
I have to say that the Google Titan appears to be better bang for your buck than yubikeys. The FIDO2 yubikey is $55 which is pretty pricey considering you will probably want multiple. I’d be really curious if there’s a strong argument against using the Google keys.
The FIDO2-only device is $25 for USB A, $30 for USB-C and supports NFC. You only need the $50+ devices if you want Yubikey OTP, OpenPGP, etc, but if you just want FIDO and FIDO2, they’re overkill.
So I get very confused over which protocol is which. I think the cheaper keys lack support for OAUTH. Which is required for things like windows login.
Yes, they don’t have OATH (not OAuth, that’s a different thing), Smart Card, or PGP. I don’t know what Windows uses (haven’t used Windows in >10 years), but Linux can use FIDO IIRC.
I have used them and they can give good security but most everyone these days uses phone apps. From an organizational perspective you might use tokens to make it harder for your staff to exfiltrate keys by rooting their phones. For an individual, carrying a FIDO token is potentially more convenient and private than carrying a phone, but the ease of pressing a button vs typing 6 digits isn’t that big a deal unless you do it constantly.
I guess there is another virtue, if you’re using the phone itself as a login device, with a password manager accessible from the phone. In that case, a 2fa app on the same phone is no longer truly a second factor. A token fixes that. I have a to-do item of setting up my phone to use a token to unlock the TOTP app. So that wouldn’t eliminate typing 6 digits. It would just make the TOTP app use real 2FA.
Would a passcode (different from phone, of course) or biometric unlock for the 2FA app count? For example, I have bitwarden and Aegis, both have fingerprint unlock when opened with a reasonably short timeout. So, even if my phone pin was compromised, both would still require biometric unlock to access.
Fingerprint might count though I’ve considered fingerprint sensors to be a bit dubious. There was a famous incident in Germany(?) where some government muckymuck called for fingerprint based biometrics in a panel discussion at a security conference. Someone nabbed his water glass afterwards, lifted his fingerprints from it, and fooled a fingerprint reader. You can also duplicate your own fingerprints with Elmer’s glue. Just spread it on your fingertip, let it dry, and peel it off.
Password to unlock the totp app might count. Auth methods include knowledge such as passwords, objects such as tokens, and physical characteristics like fingerprints. 2fa means one thing from each of two categories. So the phone with the app and stored password is one factor, and the memorized app password is the second. But, remembering and entering complex passwords is a pain, and a lockout in the app for too many wrong passwords is a DOS vector (in the event that you get your phone back after such an attack). So it sounds annoying, idk.
I guess you might already have a similar lock on your whole phone anyway, so another one on the app might be redundant.
Right, so fingerprint on everything wouldn’t be the best practice, because it’s all in one category and everything can be unlocked by a compromise of that one thing.
That’s a good point. I might look at removing that from my totp app and using a passcode instead.
Yeah and if your fingerprint is compromised, you can’t update it.
I worry most about the phone, since they get stolen all the time and they are full of software vulnerabilities. For my own phone I’m hoping to use a token to unlock. So that’s two objects from one category but the token should be harder to steal, if the thief even knows about it.
I expect high security stuff like banking ops is done only from on-premises terminals and not from someone’s phone. I will try to ask my buddies in that field.
Physical location can be an auth factor too: you could have a token permanently installed at your desk, so it activated only when you are there.
You will probably like the book “Security Engineering” by Ross Anderson if you’re not already familiar with it. PDFs of the full 2nd edition and part of the 3rd are here:
I am very confused what you mean that a phone doesn’t count as a 2nd factor.
Your password is factor one.
An OTP is factor 2, whether it is on a phone or a yubikey makes literally 0 difference practically. It is a “something you have”.
If you need biometric unlock to get into your 2fa app or on the yubikey itself, that is a 3rd factor of “something you are.”
If you are very worried about someone compromising your phone app and already knowing your password, (which is not how 99% of intrusions are done) then put a pin or fingerprint on your 2FA app and it is back to being a secure 2nd factor.
The probability of someone breaking into your phone, hacking your bitwarden password, and having a fingerprint exploit that allows them to break into your 2FA app is like 1 in 1 billion unless you are like top 1000 most important people in the world. But as a thought exercise, a dongle indeed has the potential to be more secure because it is an additional “something you have” to your phone.
The idea is that your passwords are stored on the phone. You want a separate long random password for each account, so it’s unfeasible to remember them. It’s also a big pain to type every one such password on a screen keyboard. Thus, the password and the phone are the same factor.
I have avoided having important passwords on my phone because of this, but some people use their phones more heavily than I do. My more important accounts are only accessed via my laptop, using a TOTP phone app as 2nd factor. I rarely take the laptop out of the house.
But this is only the case if you store your passwords in a plaintext file on your phone. Something that I hope nobody would be dumb enough to do, but I guess many people would.
If you have an encrypted password manager like Bitwarden or so where you have a single long password to open and get at your other long secure passwords, then it is essentially a different factor than your phone, right? Since having the phone unlocked would do nothing to help the attacker get to your password vault.
If you don’t mind, maybe you can answer this question for me. I finally jumped on the Yubikey train recently, added a couple accounts, no problem. But then I noticed apparently I can connect my key to any random install of the authenticator app on any device, and it will show the accounts I have protected with that key.
To me, this means if I lose my key someone can learn a fair bit about who owned that key just from looking at the accounts on their own phone when they find it on the street. Now someone knows I have the account myname@someemailprovider.com (among others) when they didn’t know that before. Etc.
I have googled unsuccessfully to find out if for some reason this is less of a problem than I feel like it is, or if it can be masked somehow, but my keyword choices must have been poor.
Do you have any opinion on this? I googled specifically if it would allow you to set a PIN to unmask that info or similar, but the PIN articles I found seemed to relate to something else.
I’m unfamiliar with how Yubikey works but I thought the FIDO2 protocol was designed to prevent that sort of association. Anyway it doesn’t sound good. Cryptographer’s saying (by Silvio Micali): “A good disguise should not reveal the person’s height”.
Oh yeah it clearly seems a bad idea to me, which is why I’m assuming error on my part. 100% though I took an unrelated phone, installed the yubico app, slapped my nfc yubikey up to it, and could see my accounts listed.
Oh I misunderstood what you were describing but yeah, it doesn’t sound good. It sounds like the key is supposed to be an SSO credential for multiple phones? Maybe there’s a way to set it up differently. You might ask their support.
I probably described it poorly.
It’s nothing that exotic. I use it as MFA for a few different accounts as I assume anyone who has one does. :)
Using one easy example, I have myname@anemailprovideryou’veheardof.com set up and I can clearly see “myname@anemailprovideryouveheardof.com” as a linked account on my yubikey on any device. I can’t do anything with it, but I see my username in the format shown above, and the one time code counting down.
I don’t actually know why I haven’t gone to their support - hadn’t thought about it for awhile until reading this thread, so that’s a good suggestion and will do.
Yeah it would be preferable IMHO if you had to enroll a newly installed app with username and password in addition to the key.
I think y’all are talking about different things. Some sites (like google) have direct yubikey support where you plug the key into the device and what you’re talking about isn’t an issue
Other sites don’t have direct support, but allow you to use any authenticator app which is what you’re talking about with using the yubico authenticator app/key combination. Plugging it into a yubico authenticator app on any device will show the codes
Unfortunately I don’t have an answer for a way to protect those other accounts. I guess the hope is that if you lose it, it can’t be tied to your accounts, just the websites themselves
I have not used hardware keys, but if I were going to, I would want one that is open source hardware and software like the solo key.
Thanks for the heads up! Great suggestion!
No problem. I was looking into it at one point, but didn’t ultimately end up going through with it. Because of my password manager and OTP.
Can relate. I‘m getting a bit fussy bc of the otp being on my phone and backup keys being spotty and stored indiscriminately atm. Any idea how to solve that without embracing the lock out scenario (storing the keys in a vault locked by one of the keys)?
I just have my OTP secrets within my password manager. I know I know bad me, but in my defense my password manager is local only and is not stored in the cloud at all. My master password is also quite a long passphrase with special characters in it.
Okay, thanks for elaborating. My vault is also on my home network only with an insanely long password.
But since someone tried breaking into my network recently I felt like I might need to harden up a bit.
In a professional environment I would obviously be much more paranoid but my home server is for tinkering so I dont expect perfection.
I would like a better setup for the vault and otp though. Like, if I store the admin otp key in the vault, I would be unable to retrieve it and get admin access which is bad. Theoretically, I could just store it in an encrypted file with the password stored in the vault.
But I‘m not sure if that is best practice. With my backups I try my best for 3-2-1 backups procedure so I‘d love to make it easy and reproducible for myself.
Long text, sorry. Thanks for reading.
Built in hardware pin entry means your unlock code can’t be captured by a compromised machine. Emulates Yubikey if you need that, handles Fido / U2F, stores up to 12 passwords, acts as PGP and SSH key if you install the (open source) agent.
The SSH agent implementation is forked from https://trezor.io/ which is advertised more for crypyo wallet uses.
This is an interesting piece of kit, though I’m curious who the target market really is? Frankly I would be more comfortable regularly rotating my hardware security key’s password than I would be manually keying in my 2nd factors pin every time I need to use FIDO2 or TOTP. This would almost appear to be an excessive amount of security for me as an infosec professional which honestly makes me suspect it’s targeted towards a paranoid audience. Not that this wouldn’t have it’s applications. As a backup security key to be stored in a secure location this is definitely intriguing, but I can’t imagine using it on a daily basis.
I think “unnecessarily over-the-top” is a key demographic in every market. Not a large one, but definitely present.
Manually keying in the pin is only needed when plugging in the device. Challenges for TOTP, FIDO2, etc. are a configuration option, and are only 3 digits if enabled (press any button if disabled).
As for “excessive amount of security”, security as an absolute measure isn’t a great way to think about it. Use case and threat model are more apt.
For use case, I’ll point out it’s also a PGP and SSH device, where there is no third party server applying the first factor (something you know) and needs to apply both factors on device.
For threat model, I’ll give the example of an activist who is arrested. If their e-mail provider is in the country, they can compel the provider to give them access, allowing them to reset passwords on other more secure services hosted outside the country. The police now have the second factor (something you have), but can’t use it because it’s locked.
In my opinion the biggest problem with hardware keys is what happens when you lose them. You have to either provision the keys yourself, putting the secret on your computer. Or you have to buy backup keys and make sure to register both with all your services. You’ll end up using your phone or password manager as a “backup.” And then that backup becomes your primary 2FA.
Yeah this is the dichotomy I’m in. I have a yubikey, but obviously can’t afford to have all my eggs in one basket so every account I have the passkey on I also have 2FA setup with 2FAS Auth. Proton finally started storing passkeys tho so I’ll shift to that solution when I find the time.
I‘m still working on my setup so your considerations are most helpful. What stands out to me is the option to use an airgapped old crappy laptop to provision the keys. Ideally one with manually disabled modems. That way nobody without physical access should be able to compromise it.
Also, how can you provision your own hw keys?
You can use Yubikey Manager: https://www.yubico.com/support/download/yubikey-manager/
Last year Cloudflare had some offers to buy Yubikeys at half price. Bought two of them. Using these hardware keys is better than trusting phone to be single failure and getting locked out.
You should always back up your OTP secrets, but I agree Yubikeys are a good choice. You can get USB A for $25. I think the Yubikey 5 grants you app access for an additional $25 or more? Pass.
Yubikey bio has a fingerprint reader built into it. Which is very nice. Even if the device you’re using is compromised you will never expose your pin.
The only key also has that advantage.
Any key has a pin? 🤔
External entry of the pin, means you avoid compromising it on a compromised computer.
It really depends on your thread model
In my opinion the fingerprint won’t do any difference anyway
Who are we protecting against?
Hackers? They can’t press the button
Thieves? They don’t have your pin
Someone close who knows your pin? Maybe, but this is really an overkill
Evil maid? If somebody can pull up evil maid attack, they can hack the fingerprint anyway
Governments? They hack or force you to unlock it anyway
Summary: my opinion is that fingerprint is an overkill which doesn’t protect from any real thread, but costs more and lacks some functions
If I compromise your system. I can record the pin. Then I just need to steal the device.
The current bio model does not support PIV (Smartcard) tho, so it cant be used for PGP/SSH. They recently announced a new revision that can, but its not generally available yet.
Oh that’s awesome! Thanks for letting me know
I bought 2 yubikeys. I try to use it for as many accounts as I can but I can only think of a handful who allow yubikeys. I would get them if you want to but a good 2fa should work fine. Most banks and actual important stuff barely have totp 2fa anyways.
I think the best use case will be to use a yubikey with a password manager. That way it doesn’t matter what sites support the security key directly. You could also set up passkeys with the sites so that once you authenticate with your password manager, the login process is transparent. Once more sites support passkeys, anyway.
I suggest having a threat model about what attack(s) your security is protecting against.
I’d suggest this probably isn’t giving much extra security over a long unique password for your password manager:
- A remote attacker who doesn’t control your machine, but is trying to phish you will succeed the same - dependent on your practices and password manager to prevent copying text.
- A remote attacker who does control your machine will also not be affected. Once your password database in the password manager is decrypted, they can take the whole thing, whether or not you used a password or hardware key to decrypt it. The only difference is maybe they need slightly more technical skill than copying the file + using a keylogger - but the biggest threats probably automate this anyway and there is no material difference.
- A local attacker who makes a single entry to steal your hardware, and then tries to extract data from it, is either advantaged by having a hardware key (if they can steal it, and you don’t also use a password), or is in a neutral position (can’t crack the locked password safe protected by password, don’t have the hardware key / can’t bypass its physical security). It might be an advantage if you can physically protect your hardware key (e.g. take it with you, and your threat model is people who take the database while you are away from it), if you can’t remember a sufficiently unique passphrase.
- A local attacker who can make a surreptitious entry, and then come back later for the results is in basically the same position as a remote attacker who does control your machine after the first visit.
That said, it might be able to give you more convenience at the expense of slightly less security - particularly if your threat model is entirely around remote attackers - on the convenience/security trade-off. You would touch a button to decrypt instead of entering a long passphrase.
You are better off with an encrypted password store and a 2FA on a phone. You can back up both, easily, and they are both protected with fingerprints and/or global passwords.
Don’t go the fingerprint route if you care about your rights in the US. Biometrics, for some bizarre reason, don’t fall under the fourth amendment.
im preferential of the concept of just using a USB drive, and some basic scripting automation to trigger it.
Thats just me hating anything moderately proprietary though.
How would this work? Is there an open source project available?
i’m honestly not to sure how one would go about it, i know one of my friends has done it. I would assume there is at least one open source project for this type of thing. Realistically i can’t imagine it would be that hard, there are probably writeups on people doing it already. In the most simplistic form you’re keeping spicy private keys on an encrypted flash drive. That way they’re a physical hardware item, but also physically isolated. Though you would absolutely be in a bit of a bind if you ever lost it. Realistically, changing the key and it’s encryption will solve that problem though.
I’ve recently thought of doing similar things using forward secrecy keys stored on the flashdrive itself so that way it’s always different. Similar immediate security risk there, but again changing the key is the solution. Theoretically you could also do a two part key system, where you store a portion of it on your system, and the rest on the drive, so that way in the event of compromise, they only have a portion of the key. And they still need the other part in order to do anything.
scripting wise, it should be pretty simple, you plug in the drive, automount it, rip the key out, stuff it to where it needs to go, and then remove the drive. Always make sure you have secondary backups though, whether written down or stored somewhere. Losing accounts is no fun.
I’m not a security researcher or expert though, there are definitely smarter people out there that have already talked about this kind of thing at length.
I want to add that you can not only use USB keys as second factors, but also as a password replacement on Linux and Windows. It is extremely convenient to press a button instead of typing a 16 character pw.
Yup, my computers use full disk encryption and have long passwords (>15 characters). And those passwords are different from my login passwords. I find myself not shutting down as often because it’s a pain to log back in.
So they’re cost competitive with Google Titan. I would go with the Yubikey in this case since they have a stronger track record, but I also don’t see much of a conflict of interest with Google (they don’t want your logins, they just want your Internet data).
I’m not an expert but the way I see it is this: if you’re tech-savvy and use common sense, they’re not necessary, as a 2FA app with TOTP along with random, strong passwords should be enough. I still use both for most things, only securing more sensitive stuff with a physical key.
However, having one definitely can’t hurt, and if you’re passionate about cybersec, it’d be kinda strange if you didn’t have one.
I recommend NitroKeys. They are very secure and open-source.
Mostly yubikey users in here so shout out to fully open source SoloKeys.
OnlyKey and Nitrokey seem to also be fully open source.
I use an OnlyKey and Mooltipass interchangeably. Prefer the lower tech OnlyKey. My passwords are half memorized passphrase and half random characters on the device. Only use for disk encryption, main account, and password manager.