Title: Theory / Unimportant / CS / Softw / Security / HOTP

Name: HMAC-based One-Time Password
Page: https://www.rfc-editor.org/rfc/rfc6238
Abbreviation: HOTP

Question: How to resynchronize HOTP if some OTP are lost
Answer: Request multiple successive OTP.
Page: https://www.rfc-editor.org/rfc/rfc4226
Context: HOTP

Question: What size should have HTOP result
Answer: At least 6 digits
Page: https://www.rfc-editor.org/rfc/rfc4226
Context: HOTP

Page: https://www.rfc-editor.org/rfc/rfc4226
Implementation: int offset   =  hmac_result[19] & 0xf ;
        int bin_code = (hmac_result[offset]  & 0x7f) << 24
           | (hmac_result[offset+1] & 0xff) << 16
           | (hmac_result[offset+2] & 0xff) <<  8
| (hmac_result[offset+3] & 0xff) ;
Variables: int[] hmac_result
Language: c
Time complexity: O(1)
Returns: 6 secure digits from HMAC_key
Context: HOTP