In article <qm0hul$8h5$
1...@dont-email.me>, Ken <
K...@invalid.com> wrote:
>Very clever way of compensating for a time difference. Then are the
>codes in all similar devices the same with respect to their code
>sequence, just that each device started the sequence at a different time??
Nope, not in the general case. Each individual device (or each
instance of a token-generating application on e.g. a smartphone) has
an individual secret (or secrets, if it's generating one-time
passwords for multiple services).
The service knows the secret for each device.
The one-time passwords (codes) are generated by a deterministic
process, which takes as input the time and the device secret. This
process is designed to be cryptographically strong... it's infeasible
to predict what one code will be, based on its predecessors, unless
you know the correct shared secret. It's also infeasible to "compute
back" and figure out the shared secret even if you know a large number
of the OTP codes that have been generated.
Thus, if you have two OTP generators, both generating codes for the
same service (for e.g. two different user-IDs), and both happen to
show a code of 123456 in this minute, it is extremely unlikely that
they'll display the same codes during the next minute.
You can, however, program two or more OTP generators with the same
shared secret, if you choose. For example, if you own a smartphone
and a tablet, you can sign up with a service that offers one-time-code
access, get your secret (some services deliver it as a scannable
barcode or QR code), and load the secret into an OTP-generating app on
both devices. These devices will then generate the same code
sequences and you can use either to authenticate.
The TOTP algorithm is standardized, so you can use different
OTP-generating dongles or apps based on a single shared secret, and
they'll all interoperate.
Different devices/apps can store their secrets differently. For
example, as I understand it, the Google Authenticator app for Android
stores the secrets in a smartphone's internal hardware-backed
keystore, and won't ever export them or back them up to a server. If
you lose or wipe the phone, all of the secrets are gone for good.
Other apps (e.g andOTP) store the secrets in the device's flash
memory, encrypted with a password that you must enter to use the app.
andOTP will allow you to export the secrets via email (after
encrypting them with a PGP key of your choice for security), and then
re-import them into a different phone or tablet.