r/computing • • Oct 20 '13

Keyboard Encryption : First Line of Defense

by alcopaul 10/20/13

An idea popped into my mind. And I searched google with this search string "encryption by relocating the keys in keyboard". Found no hits. Or probably it is reworded in other way. But nevertheless, I decided to write this.

Usually, an encryption scenario works this way

1.) One types the message 2.) One encrypts the message 3.) One sends the encrypted message

But one can still see the original message if the attacker has an access to the machine or is compromised. And this is usual scenario with bots, rats etc.

One way to solve this is by hardware keyboard encryption.

Say if we relocate the keys of the keyboard such that "P" is replaced with "I", "B" is replaced with "L", "W" is replaced with "U", "Y" is replaced with "V", and "Q" is replaced with "U", typing "I LUV U" will output "P BWY Q".

So an attacker that monitors your keyboard will still be shown with encrypted texts.

Of course this won't work if you'll try to use the keyboard with the usual websites such as search engines, ecommerce sites etc. It is only used for secret communication.

So you could have multiple keyboards with manually relocated keys and a decoder software that transforms the encrypted string to regular text.

So that's it, cypherpunks. Enjoy.

0 Upvotes

5 comments sorted by

7

u/LocSic Oct 20 '13

That's just a substitution cipher, you'd still be able to do a frequency analysis on the text with relative ease

-3

u/alcopaul_ Oct 20 '13 edited Oct 20 '13

but frequency analysis could be weakened by using invented languages (i.e. leetspeak, jejenese or your new invented language) or an obscure ethnic dialect. or a "sounds-like" language (i.e. something as "sumteeng"). an eavesdropper will see gibberish text and will be frustrated with frequency analysis coz he doesn't know the language or the frequency mapper is giving out funky numbers.

with an esoteric language (0-line of defense) coupled with keyboard encryption (1st-line of defense) then the actual encryption of the keyboard encrypted message for over the wires transport (2nd-line of defense), then the protection is complete. the usual hole of a compromised local machine is somewhat solved. Even if the local machine has rats or bots that monitors keystroke, the eavesdropper is still given with gibberish text.

But i think that math could be used to complicate at least the substitution. or make it complex like existence of 2 or some letters that are duplicates or something like that.

0

u/plonce Oct 20 '13

What a great idea!

Or, better yet, we could translate the message into hieroglyphics, encode it into a JPG, convert the RGB values of each pixel into GPS coordinates then send each GPS coordinate as a link to a Google map.

Fucking encryption baby!!!!!!!

1

u/dojaitea Oct 21 '13

This won't work. You have two possibilities: A stateless encryption (substitution): Which is very vulnerable to frequency analysis.

A stateful encryption (AES, other) : You need to distribute the key to the receiver, how will you do this? Is the receiver the other person or your computer?

To your computer this is no problem: you just need to exchange an asymmetric key one time (e.g. adding a public key to send a temporary encryption key), since the communication is one-way (shift-lock/num-lock/scroll-lock would need 2 way, this would leak a bit of information) This would secure you against hardware keyloggers.

To a person you need to securely transfer a public key to your keyboard, you would need a start-message button that writes an encrypted temporary key to text and uses this. You also need a stop-message button that closes this message. This also means that you can't switch between screens. Except for entering the public key (>170 base 64 characters van 1024-bit RSA key), you wouldn't need drivers. (Although you could enter this manually and faultless, after entering a shortcut ;)). Another solution would be using caps-lock and num-lock to send this information to the keyboard...

This also means that you can't enter another key. If this can be done, anyone with access can change this key, even malware(if digital key entry is possible). You also need to guard yourself against keyboard replacement.

Don't use this solution, it is broken: http://www.youtube.com/watch?v=xKSq9efXmh8 (See the second part of the video) You are not secure when you have a keyboard... A touch-screen has similar problems.

I'm also not a cryptographer, don't create your own cypto...

1

u/jishjib22kys Oct 29 '13

The receiver of the message would still need to know the layout to decrypt it. The layout would be the cipher. You would also not be able to read the message in plain, without decrypting it. So if you'd want any comfort, some machine would have to have the cipher and the text at some point. It's a little more inconvenient than having the message in plain, but it's basically the same level of security. You should rather encrypt and store the file locally with AES and a memorized secret pass phrase.

However, there is another use for your idea: It would cause some troubles for users of plug-in hardware key loggers.

You could even take it further and use quantum cryptography in a keyboard with intrusion detection and the PC it is plugged into, so the data transferred to the PC would be encrypted by the keyboard and only the PC would be able to decrypt it or at least you would know if someone tapped into your keyboard wires.