calc.pw was developed with portability in mind. The backend library "cryptuino" can be compiled for the Arduino platform as well as other Little Endian platforms like x86 and x64 systems. Support for Big Endian systems has been prepared but could not be implemented due to a missing test platform.
The core functionality including the algorithms for the password generation has been encapsulated in the "cryptuino" library. It includes a memory manager, cryptographic functions (SHA-1 and Arc4) and a compatibility layer for PROGMEM.
Due to the platform independence there are not only the hardware revisions A to C but also a so-called software revision 1 which compiles for Windows as well as for unixoid systems. It generates the same passwords when provided with the same master password and information.
For the USB connectivity the USB-Host-Shield-Library developed by Circuits@Home was used. An additional event was added to handle control key presses. Due to a problem with the keyboard emulation of the Arduino Leonardo the Arduino core had to be modified. This allows us to forward keyboard input to the computer without modifying the input.
In addition a mechanism was implemented which allows calc.pw to be used with different keyboard layouts. To do this the EEPROM of the Arduino is used. A layout file is written to it which serves as a translation table beween the scancodes of the keyboard and the characters of the ISO 8859-1 encoding.