DIY USB password generator – (USB PRC) enhanced #1

This article describes an enhancement to the DIY USB password generator, a small USB HID keyboard device that types a password stored in EEPROM automatically when it is attached.

Digispark01

The implementation was on a Digispark ATTINY85 General Micro USB Development Board which was purchased on eBay for a few dollars. The board uses different pin connections to USB to the original.

In the process of changing the code, I updated the V-USB driver. That necessitated quite a few changes to source code.

The enhancements comprise:

  • maximum password length configured to 50 characters;
  • toggling NUM LOCK adds a character and terminates generation; and
  • if SCROLL LOCK if on, a newline is appended to the password message.

These changes allow some level of customisation of the generated password message at generation time rather than needing to recompile and load new firmware.

So, before starting password generation set SCROLL LOCK as desired, and CAPS LOCK and NUM LOCK both off. Open an application that will display the keyboard input from the generator, eg compose a mail message.

Then toggle CAPS LOCK 4 times to start generation (message written), toggle CAPS LOCK to append random characters to the generated password, toggle NUM LOCK to append the final random character to the generated password and save the result to EEPROM.

Updated hex is available at https://github.com/owenduffy/usbprc/src .

Keep in mind that this does not compare to most hardware security dongles, it is simply a convenient means of simulating a long random (ie strong) password from the keyboard. NEVER use the same password for multiple online services.