The Keyshanc Teensyduino is a device that encrypts keystrokes based on the Keyshanc algorithm. It has a PS/2 input and a USB output.
The device is intended to provide privacy from the keyboard-to-the-application on compromised (a.k.a. "monitored") and/or untrusted workstations.
No software is required on the workstation. The only software requirement is that the receiving application (or website) must be Keyshanc-enabled. In other words, the receiving application must allow the user to input a Keyshanc password (preferrably via a graphical keyboard) and then decrypt the keystrokes. I have an example console program available on GitHub and a webpage demo here.
Note: Software is required to initially program the Keyshanc Teensyduino, and is described below.
When first connected, the Keyshanc Teensyduino defaults to OFF (i.e. keystrokes are not encrypted). Use the function keys F1-F11 to toggle between the 11 stored passwords. Press F12 to turn encryption OFF.
Since the Keyshanc algorithm uses a simple substitution cipher, it is vulnerable to frequency analysis. The success rate of this method of attack should be lessened by allowing the user to switch between multiple passwords (ciphers).
Also, if a company wants to manufacture and sell Keyshanc Teensyduinos, then allowing the device to hold 11 passwords should give it a longer "useable lifespan" before it needs to be reprogrammed with new passwords.
That being said, there is no requirement for the user to switch passwords.
The following output is the same text encrypted with the first two default passwords:
[F1] &TxJYUT$J1}JFKUT$J18xDJmqqJmT(JUTJ18xJ(mK/TxzzJFUT(J18xD [F2] 7Ao!4KA'!<E!zdKA'!<Roa!P55!PA^!KA!<Ro!^PdpAoVV!zKA^!<Roa [F12] One Ring to bring them all and in the darkness bind them
The Keyshanc Teensyduino source code is available on GitHub. Please Fork this repo!
As you can see from the pictures below, the Keyshanc Teensyduino requires minimal assembly. No soldering experience is required.
Change the special key codes in PS2Keyboard.h to the following:
#define PS2_TAB 9 #define PS2_ENTER 13 #define PS2_BACKSPACE 1 #define PS2_ESC 27 #define PS2_INSERT 2 #define PS2_DELETE 127 #define PS2_HOME 3 #define PS2_END 4 #define PS2_PAGEUP 25 #define PS2_PAGEDOWN 26 #define PS2_UPARROW 11 #define PS2_LEFTARROW 8 #define PS2_DOWNARROW 10 #define PS2_RIGHTARROW 21 #define PS2_F1 5 #define PS2_F2 6 #define PS2_F3 7 #define PS2_F4 12 #define PS2_F5 14 #define PS2_F6 15 #define PS2_F7 16 #define PS2_F8 17 #define PS2_F9 18 #define PS2_F10 19 #define PS2_F11 20 #define PS2_F12 22 #define PS2_SCROLL 0
Make the following selections in the Arduino IDE:
In order to create your own Keyshanc passwords, download and compile the Keyshanc Generator. When run from a terminal, the Keyshanc Generator will prompt the user for 11 passwords and will then output the C++ code for the 11 associated arrays. This output should then be copied and pasted into keyshanc.ino, overwriting the 11 default arrays.
The Keyshanc Generator has the following dependencies:
The Keyshanc Teensyduino source code has the following default passwords:
F1: aragorn F2: bilbo F3: boromir F4: frodo F5: gandalf F6: gimli F7: gollum F8: legolas F9: meriadoc F10: peregrin F11: samwise
I would like to thank Paul Stoffregen of PJRC.com for offering the Teensy, which has made my efforts to bring Keyshanc to life actually possible.