8

What are the pros and cons of using Yubico OTP vs. OATH-HOTP? They both seem very similar.

1 Answer 1

8

Usability

The Yubico AES mode does only work with a yubikey. The device returns a long data structure, that needs to be decrypted.

HOTP returns a 6 or 8 digit code. The algorithm uses a truncation to form the digit code. The digit code is created so that a user is able to read the code and type the code into a keyboard.

Thus: With Yubico AES mode you need to have a device that creates and inputs the one time password, while with HOTP you can always rely on the keyboard.

Sync

The Yubico AES mode increases two counters. A plug counter and a usage counter. This data is encrypted, then the encrypted value is sent for validation. Validation in this case means, that the encrypted value is decrypted and than the server verifies if the sent counters are bigger than the last counters, which the sever saw.

In HOTP mode the OTP value is calculated based on the counter. The server needs to perform the same operation like the OTP token. This is why you have this window thing. The token could be pressed without the value being sent to the server. The server knows the last value (counter=n) it saw. But it does not know, how many blank presses were performed on the OTP token. So the server needs to //try// n+1, n+2...

The HOTP token can get "out of sync". The Yubico AES mode can not.

Standards

Yubico AES mode is well documented. But it is only implemented by the Yubikey. HOTP is standardized in RFC 4226.

Crytpography

Well don't ask me. I suppose that both AES and HMAC-SHA1 are sill strong algorithms...

...now you can decide which aspect is a pro and which one a cons. Usually it boils down to usability and the question if you have a USB port or not. The yubikey is one of the few hardware tokens, that can be initialized and thus you can keep control over your key material. Use a open source backend lile privacyIDEA to enroll and manage the tokens.

8
  • 1
    I actually think you missed one important difference: The key that is used. IIUC, the Yubikey OTP method uses a hardcoded symmetric (AES) key that is known by Yubico. Services using this method forward the generated OTP code to YubiCloud, which checks it and tells the service if it was ok. This means you can use unlimited services, since they all use the same key and delegate to Yubico. With the OATH methods, the Yubikey and service agree on a shared key (configured through e.g. QR-code), which I would find more appealing (but is also limited to 32 keys/services with Yubikey 5). Commented Apr 20, 2022 at 20:00
  • 1
    @MatthijsKooijman The key for the AES mode is not hard coded, it is initialized, and thus YubiCloud knows it. You can very well initialize your own key for AES mode. This is what we can also do with privacyIDEA. Of course if you keep your Yubikey registered with the YubiCloud, you could use it with all services, that support the YubiCloud. So in my answer I did ignore the question, where the authenticating party (YubiCloud or on prem) is located because both is possible. And of course I personally would prefer on prem - but as you pointed out, some services will not support this...
    – cornelinux
    Commented Apr 25, 2022 at 15:21
  • Right, but even if you can replace the key used for the Yubikey OTP method, the significant difference is still that that method uses a single key, known by some party (yubicloud or your own server) that the services need to trust, while HOTP uses a unique key for each service, without requiring the service to trust any third party. Commented Apr 29, 2022 at 14:14
  • What? You can not use a unique Key with the Yubikey for different services. The yubikey as two slots. You can put two secret symmetric keys either for HOTP or for YubiOTP into it. No more. The "significat difference" does not exist - unless I completeyly do not understand, what you are trying to say.
    – cornelinux
    Commented Apr 30, 2022 at 19:51
  • Ah, I see. You are talking about the OTP mode, which has two slots which each can do Yubikey OTP, or OATH HOTP (or some others). I didn't realize that HOTP was also an option here, so I was talking about the OATH API method, which can store 30 credentials (but these need an app to access them, rather than a button and a keyboard emulator). So indeed, when comparing the different OTP modes, I agree the difference I pointed out does not exist, it is only between OTP and OATH modes. I couldn't quickly find the official docs, but this has good info: wiki.archlinux.org/title/YubiKey Commented May 1, 2022 at 20:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .