Small form factor security token firmware.
Find a file
2022-08-09 16:41:08 -06:00
Base32.hpp . 2022-08-09 16:41:08 -06:00
Code39Ring.hpp . 2022-08-09 16:41:08 -06:00
ECC.hpp . 2022-08-09 16:41:08 -06:00
GaloisField.hpp . 2022-08-09 16:41:08 -06:00
HOTP.hpp . 2022-08-09 16:41:08 -06:00
ir_hotp.ino . 2022-08-09 16:41:08 -06:00
LICENSE . 2022-08-09 16:41:08 -06:00
README.md . 2022-08-09 16:41:08 -06:00
SHA1.hpp . 2022-08-09 16:41:08 -06:00
V39.hpp . 2022-08-09 16:41:08 -06:00

IR HOTP

Small form factor security token firmware.

This includes a modification of the original RFC 4226 for AVR chips. This uses the HOTP algorithm, replacing the counter with a maxmial length linear feedback shift register. It also adds four symbols of error correction to the end of the original 6 digit OTP, which is encoded using code-39 and pulsed out as simply as the microcontroller allows.

The Shift Register

LFSRs count using a shift register and some simple binary logic. All states, excluding one lockup state can be utilized. This uses a LFSR of 39 bits, with taps at 35 and 39. (Feedback polynomial of X^39 + X^35 + 1) Each increment does 5 iterations, to reduce the number of writes to EEPROM.

Reed Solomon Error Correction

Four symbols are added to the end for error correction. If a mis-read is detected by a reader, a couple characters can be recovered, or the message discarded. This is to limit the likelihood a mis-read causes a lock-out, while also enabling readers to be more reliable

Power-up sequence


Setup
- Read EEPROM
- Increment LFSR (5x)
- Write EEPROM (shift start by one)
- Generate OTP
- Encode barcode

Loop
- Continuously transmit barcode

(Safely brown-out to power loss)