shannonturner / text-to-bitmap

Encodes your secret message or file as an image
http://shannonturner.github.io/text-to-bitmap/
MIT License
8 stars 0 forks source link

Unicode whitespace scrambling #9

Closed shannonturner closed 10 years ago

shannonturner commented 10 years ago

Whitespace is probably one of the most common characters in any message, and if not handled correctly, may undermine existing security measures like the minimum character offset.

For example, if the lowest ord value of all characters in the original text is 32 (for a single space on the spacebar), that's one fewer piece of information needed to break the code.

Scrambling whitespace characters like ord 9 (tab), ord 10 (new line), ord 13 (carriage return), and ord 32 (space) into unicode whitespace characters would mitigate this weakness.

See http://www.cs.tut.fi/~jkorpela/chars/spaces.html for a handy table on unicode whitespace characters to use.