|
Leancrypto 1.6.0
Post-Quantum Cryptographic Library
|
Functions | |
| void | lc_hotp (const uint8_t *hmac_key, size_t hmac_key_len, uint64_t counter, uint32_t digits, uint32_t *hotp_val) |
| HMAC-Based One-Time Password Algorithm - RFC 4226. | |
| int | lc_totp (const uint8_t *hmac_key, size_t hmac_key_len, uint32_t step, uint32_t digits, uint32_t *totp_val) |
| Time-Based One-Time Password Algorithm - RFC 6238. | |
| void lc_hotp | ( | const uint8_t * | hmac_key, |
| size_t | hmac_key_len, | ||
| uint64_t | counter, | ||
| uint32_t | digits, | ||
| uint32_t * | hotp_val ) |
HMAC-Based One-Time Password Algorithm - RFC 4226.
The HOTP algorithm uses HMAC SHA-256
| [in] | hmac_key | Seed key / HMAC key K - shared secret between client and server; each HOTP generator has a different and unique secret K. |
| [in] | hmac_key_len | Seed key / HMAC key length |
| [in] | counter | Counter C - 8-byte counter value, the moving factor. This counter MUST be synchronized between the HOTP generator (client) and the HOTP validator (server). |
| [in] | digits | number of digits in an HOTP value; system parameter. |
| [out] | hotp_val | HOTP output value |
| int lc_totp | ( | const uint8_t * | hmac_key, |
| size_t | hmac_key_len, | ||
| uint32_t | step, | ||
| uint32_t | digits, | ||
| uint32_t * | totp_val ) |
Time-Based One-Time Password Algorithm - RFC 6238.
The TOTP algorithm uses HMAC SHA-256
| [in] | hmac_key | Seed key / HMAC key K - shared secret between client and server; each HOTP generator has a different and unique secret K. |
| [in] | hmac_key_len | Seed key / HMAC key length |
| [in] | step | Time step in seconds - to use the default value of 30 seconds, use 30 |
| [in] | digits | number of digits in a TOTP value; system parameter. |
| [out] | totp_val | TOTP output value |