Questions tagged [hotp]

The HMAC-based one-time password algorithm defined in RFC 4226.

Filter by
Sorted by
Tagged with
1 vote
0 answers
72 views

Is there a multi-key HMAC scheme?

I wonder if there is any scheme or algorithm to generate HMACs that verify with multiple keys. Suppose I have the secret keys K1, K2 and K3 and I have a message M1. Is the following possible? ...
Different-March-5530's user avatar
3 votes
0 answers
1k views

How to migrate SafeNet MobilePASS seed to another TOTP app?

Based on How does SafeNet MobilePASS generate passwords?, I'm not sure if the MobilePASS token can be extracted for use in another TOTP app such as andOTP or KeePassXC. (I guess it depends whether the ...
l0b0's user avatar
  • 163
1 vote
0 answers
36 views

Developing a Simmetric Key Distribution protocol to use with rfc6238

I'm trying to develop a Key Distribution Protocol to share symmetric keys in RFC 6238 (OTP). I started with RFC 6063, but this protocol is developed over old and known insecure algorithms like PBKDF ...
Fernando Silva's user avatar
3 votes
1 answer
73 views

Can future time-based keys be deduced from a previous key?

If a time-based key generated by an authenticator app like Google Authenticator is compromised, can future keys be deduced from the compromised key?
Oscar's user avatar
  • 33
1 vote
1 answer
54 views

Securing counter value for OTP [closed]

I'm working on a project that needs an OTP based on counter value and needs some advice. Suppose we encrypt the counter value C in this way and let's say our sending packet is P = AES(key,C). If ...
Eunseok Lee's user avatar
0 votes
1 answer
115 views

Is this the right way to implement one time pad?

I would like to know if this the right way to use the one time pad based on this table Now, my idea is to use the same Ascii #2 to again if the message is longer, I know this is bad practice, what I ...
Marvix's user avatar
  • 13
2 votes
1 answer
529 views

Security Considerations in using SHA-1 for One Time Passwords

SHA-1 is considered broken. That's why I'm assuming that using SHA-1 for RFC2289 OTPs is broken as well. Is this assumption correct? Going further with this assumption using SHA-1 for RFC4226 HOTPs ...
Fandi's user avatar
  • 23
0 votes
1 answer
1k views

Counters in HOTP

In the HOTP (HMAC-based One-time Password) algorithm the client and the server can have different counter values. Es. if an attacker tries to crack the password with no success. How does HOPT deal ...
AleWolf's user avatar
  • 461
2 votes
1 answer
622 views

What time is used in a TOTP counter?

I am currently working on a desktop TOTP client. From the TOTP spec at https://www.rfc-editor.org/rfc/rfc6238#section-4.1, the 6 digit OTP is generated from counter (in this case time). But what is &...
M4X_'s user avatar
  • 145
0 votes
1 answer
57 views

Security of HOTP over an unencrypted channel for controling an actuator

I have a simple on/off actuator that I want to control remotely. I want to use available hardware: a pair of microcontrollers connected to a pair of wireless transceiver modules. Can HOTP algorithm ...
user3368561's user avatar
0 votes
0 answers
146 views

Split TOTP/HOTP secret and generate pin without trusted dealer

Many site use time-based one time password (totp) as second factor auth method, such as aws. So we can split the totp secret and distribute each part to different party to achieve threshold login ( ...
Sisyphus's user avatar
0 votes
0 answers
746 views

Is reverse engineering SHA256-HMAC function possible? [duplicate]

Assume HMAC function is used to generate a 6-digt integers time-based onetime password. As follows: $$K_h =\operatorname{HMAC}(k,t) = H((k\oplus\text{opad})\mathbin\| H((k\oplus\text{ipad})\mathbin\|...
Crankdat's user avatar
2 votes
2 answers
1k views

Can One-time-password be used as nonce in HMAC to prevent replay?

Note: In the following post OTP = one-time-password I am working on a project wherein I need send one way messages between two end points. There is already a shared secret via a side channel between ...
Jake's user avatar
  • 163
3 votes
3 answers
2k views

Security concern with TOTP

I am pretty new to cryptography and I have been studying up on TOTP (Time Based OTP) and while I have learnt how the computation works, I'm unable to figure out why using TOTP makes a system more ...
Arvind Sasikumar's user avatar
1 vote
2 answers
3k views

Recommended way to Implement One Time Password?

I need help with the process/commands needed to implement the below functionality: I'm modeling an OTP System, in which the user would request an OTP and the app will send him one. Later the user ...
Gatitopo's user avatar
2 votes
1 answer
1k views

Is key derivation of a token shared secret necessary for usage of token in TOTP as specified by RF6238?

TL;DR: Is it necessary to generate a 'random' key from a shared token secret string before putting it into a TOTP algorithm that follows the RFC 6238 specification? Or is it okay for me to put the ...
Nicholas Sadjoli's user avatar
2 votes
0 answers
890 views

Need help to get correct TOTP [closed]

I am really confused and need help on this problem related to TOTP as specified in RFC6238 here: https://www.rfc-editor.org/rfc/rfc6238#section-1.2. So I am now given a task to implement the RFC6238 ...
Nicholas Sadjoli's user avatar
1 vote
1 answer
743 views

Key Generation for TOTP in TLS

So lately I've been studying the TLS Protocol. In particular, going through RFC 2246, section 7.4.7.1, i.e, RSA Encrypted Premaster Secret Message, I encountered: If RSA is being used for key ...
Newbie's user avatar
  • 113
2 votes
3 answers
1k views

One Time Password generation algorithm to ensure data/transaction integrity?

Here is my use case: A user is trying to transfer money to his friend's account. He enters transaction details on banking website. Bank receives it and then Bank sends transaction details (receiver ...
aMa's user avatar
  • 121
4 votes
1 answer
343 views

(How) Can we use HOTP for file encryption?

I recently went through the list of available KeePass plug-ins and noticed one that advertises support for HOTP as a means to derive the database key. Now I trust the developer of this plug-in who is ...
SEJPM's user avatar
  • 45.9k
4 votes
1 answer
105 views

Is it wise to use HOTP (raw bytes) as a key for HMAC?

Assume I have client and server applications with a shared master secret KEY_SECRET already in place. Also assume that the client and server have an implicit shared ...
Petr Dvořák's user avatar
2 votes
2 answers
486 views

Is it secure to use TOTP with same key and different time-counters?

If I use TOTP to generate codes with different "expiration" time, using the same key for HMAC, will I create some kind of weakness?
user28101's user avatar
6 votes
1 answer
2k views

How does the HOTP dynamic truncation function generalize to longer hashes?

HOTP, the HMAC-based One-Time Password algorithm from RFC 4226, uses a "dynamic truncation" function to turn the 20 byte HMAC-SHA-1 value into a 31 bit string. The dynamic truncation (from Section 5.3)...
otus's user avatar
  • 32.1k
0 votes
1 answer
81 views

Security issues for integrating AAA and OTP services [closed]

What are the main security issues for integrating AAA and OTP services. In our organization with about 1000 clients, we want to integrate the services. What are the main security issues about the ...
remo's user avatar
  • 101
1 vote
1 answer
352 views

Detect desynchronization in HOTP authentication [duplicate]

In HOTP authentication, is there a way for a system to detect that the token has been desynchronized? If so how does it know that the OTP was generated from a desynchronized (but valid) token and is ...
Sam's user avatar
  • 19
2 votes
2 answers
1k views

counter to indicate hotp count

I was trying to figure out how HOTP kept from wrapping over, when I saw this explanation of how it works, by Thomas Pornin [source]: The intended scenario is the following: the client has a ...
Joseph L.'s user avatar
2 votes
1 answer
2k views

Using HMAC-SHA256 with short passwords and sliced outputs for short-lived secure hashing

I don't have much background in cryptography, so forgive me if I'm using the wrong mathematical terms to explain my needs. Following this question, I learned that taking a random secret 16-bytes <...
Ozo's user avatar
  • 309
10 votes
2 answers
5k views

Why are HOTP and TOTP implementations all using 6 digits and not more?

I was checking the RFC's after wondering for some time. In RFC 4226 - HOTP: An HMAC-Based One-Time Password Algorithm, it states on the appendix: A simple enhancement in terms of security would be to ...
Mamsaac's user avatar
  • 333
6 votes
1 answer
620 views

How HOTP values are validated according to RFC 4226

In Section 7.2 "Validation of HOTP Values" of the HOTP spec (RFC 4226) it says, in part, The HOTP client (hardware or software token) increments its counter and then calculates the next ...
rlandster's user avatar
  • 317
11 votes
2 answers
12k views

How does SafeNet MobilePASS generate passwords?

We use MobilePASS at work but the latest version of the android client seems to be buggy so I wanted to have a go at implementing the algorithm myself. You can download the client to play with here: ...
Dean Reilly's user avatar
21 votes
2 answers
2k views

Why does HOTP use such a complex truncate function?

In the HOTP protocol after calculating a 20 byte hash it is truncated to 4 bytes. For this first an offset is calculated (low-order 4 bits of the last byte) which determines the four bytes to be ...
Jeff's user avatar
  • 493
2 votes
1 answer
834 views

Is it considered insecure in an HOTP implementation to publicly provide the next counter?

I am working on a project that needs to securely authenticating one or more smartphone clients with a server running on a microcontroller so it has very limited resources. I have found plenty of ...
Devin's user avatar
  • 123
62 votes
2 answers
65k views

What are the advantages of TOTP over HOTP?

HMAC-based One Time Password (HOTP) was published as an informational IETF RFC 4226 in December 2005. In May, 2011, Time-based One-time Password Algorithm (TOTP) officially became RFC 6238. What ...
Jader Dias's user avatar
2 votes
1 answer
777 views

synchronization of counters in HOTP

How is synchronization of counter values achieved in the HOTP protocol? As I understand it, the server increments its counter value only if a match (of the OTP value) is found. What happens at client ...
kkk's user avatar
  • 23
4 votes
2 answers
1k views

How is de-synchronisation of HOTP solved?

From RFC 4226 I understand how HOTP generates one-time passwords by incrementing a counter and uses the 'look-ahead' window to try to resynchronise (from this counter), if the user tries a few wrong ...
Jim's user avatar
  • 41
27 votes
1 answer
9k views

How does HOTP keep in sync?

My understanding of HOTP is that each password is unique and based on a counter. $$PASSWORD = HOTP_1(K,C)$$ Where $C$ is an incremental counter. What I wish to know, is how you keep the client ...
mrwooster's user avatar
  • 373