In\u00a0late March when I got an unsettling message on my Gmail account:\u00a0"Warning: Google may have detected government-backed attackers trying to steal your password."Google sends them out when it detects a "government-backed attacker" has attempted to hack an account through\u00a0phishing or malware.Last time I saw one, I added two-factor authentication to many of my accounts. This time it prompted me to ask: Can I do even better? Martyn Williams\/IDGNS A security warning message displayed by Google.It turns out I can.Google suggests a security key\u00a0as a more secure alternative.\u00a0These are little USB devices that generate one-time tokens in place of the six-digit codes from authenticator apps.Google supports a format called\u00a0FIDO Universal 2nd Factor\u00a0(U2F), which it helped develop.\u00a0Keys are available that work over USB,\u00a0Bluetooth, and NFC, so they can be used with a smartphone or tablet in addition to a PC. Martyn Williams\/IDGNS Hardware security keys from Feitian (left) and Yubico.They are really easy to use.First, once you've bought a key, it needs to be registered with the site.\u00a0When subsequently logging in, a prompt appears after a username and password have been entered. Authenticating with the key is simply a matter of plugging it into a USB socket and pressing the small gold disc.MARTYN WILLIAMS\/IDGNSA dialog box greets users signing into a Facebook account protected by a security key.The disc triggers the key to transmit\u00a0a 44-character code\u00a0to confirm the login. The first 12 characters of the code are the public key of the device being used and the remaining 32 are a unique passcode for the login attempt.On a smartphone, an NFC key can simply be placed against the back of the phone to send the codes.And that's all there is to it. It's much easier than juggling a smartphone and authentication codes.Before you commitU2F is currently only supported by two browsers, Google Chrome and Opera. Together, they account for about two-thirds of desktop browsing and are available on Windows, macOS, and Linux, so a good portion of the market is covered, but if you prefer Firefox, Safari, or another browser, you'll need to switch.And U2F only works on a handful of sites and services at present, but they do include some major ones like Google, Facebook, Salesforce, GitHub, and DropBox. Simply securing your Google and Facebook accounts might be compelling enough to add a security key to your key ring because both sites are prime targets for cyberattacks and identify theft.But, if you use an iPhone or iPad, bad news. The keys don't properly work with these\u00a0devices. You should have no problem with Android. Martyn Williams\/IDGNS Yubico's smallest key can slip into a wallet or remain in an USB socket.Also consider logistics. With an authenticator app, the codes are wherever your phone is, and your phone is usually with you. With a security key, you'll need to carry it around. The good news is that it's small, very sturdy and easily sits on a keyring.Know your standardsThe security key can also be used to protect access to a password manager.The Dashlane password manager supports FIDO U2F, while several other competitors, including LastPass, support OTP, a similar but incompatible standard, so you need to be careful while shopping as not all keys will generate both U2F and OTP codes.Some of the most popular keys come from Yubico and most support both U2F and OTP, but the cheapest of the company's line-up isn't compatible with OTP.One step forward, two steps backWhile Google and Facebook both promote security keys as a better way to keep your account safe, both companies have a potential hole in their implementations. If you set a recovery phone number to receive security codes via SMS, that phone number remains active until you disable it.That's a problem because SMS is not a secure transmission channel. Hackers have\u00a0already managed to attack bank accounts\u00a0protected with SMS-based authentication codes due to weaknesses in the protocol.So, you need to disable phone backup. The security settings pages in both Google and Facebook will allow you to do that.While you're in there, it's a good idea to\u00a0set up account login alerts, so you if someone does manage to get into your account by no matter what means, you'll know about it.Google and Facebook wouldn't comment on their use of security keys.Where can you use security keys?Yubico has a helpful matrix on its site detailing compatibility, and there are a couple of listings of sites that support security keys and the standards they use. One is maintained by Yubico, but the most exhaustive I found was from Germany's Nitrokey, which also sells security keys.If you head over to our Facebook page, your comments are unprotected from prying eyes.