An easy-to-deploy method to jumble a string of text into something only a predefined cypher can decode correctly. Not a substitute to public-key encription!

kzimmermann 8f0cafca5c Separated the cypher rows from the main program, created a Makefile for convenience 8 years ago
.gitignore 8f5831dd5b Init commit 8 years ago
ExampleEncoded.md 8f0cafca5c Separated the cypher rows from the main program, created a Makefile for convenience 8 years ago
LICENSE 8f5831dd5b Init commit 8 years ago
Makefile 8f0cafca5c Separated the cypher rows from the main program, created a Makefile for convenience 8 years ago
README.md 8f0cafca5c Separated the cypher rows from the main program, created a Makefile for convenience 8 years ago
cypher.h 8f0cafca5c Separated the cypher rows from the main program, created a Makefile for convenience 8 years ago
main.cpp 8f0cafca5c Separated the cypher rows from the main program, created a Makefile for convenience 8 years ago

README.md

Encoding engine based on Rotating Substitution Cyphers

quickcypher is a simple encoding mechanism based on the concept of Substitution Cyphers to translate a readable cleartext message into a cypher-specific encoded message. The user provides two cypher rows and these are used to translate a message. Any character outside the domain of the cypher is passed on unaltered, cleartext. To obtain the original message, just run the encoded message into the cypher again!

The cypher does not distinguish between encoded or decoded states, so you could in theory line up a few more cyphers to make a stronger encoding.

Please note that quickcypher is not a substitution for encryption, and not even labeled as an encryption engine. This is a hobby project from a guy on the internet, not some fully audited whistleblower-ready solution.

Compiling instructions

To compile the program, run the make command (requires GCC, and GNUMake to be installed). The Makefile provided in the package takes care of the rest.

Run the program with ./quickcypher (interactive mode) or put it along your scripts by redirect some input to it like echo "Some secret stuff" | ./quickcypher or ./quickcypher < secrets.txt

Make sure you edit the cypher.h file to create a strong cypher before compiling! Too weak a cypher, and your entire encoding can be cracked in a matter of minutes!

How to choose a good cypher

The cypher used by this program consists simply of two strings of equal length and among which no character repeats itself. The following are all invalid cyphers (the program would not run with them):

banana -> letters 'n' and 'a' repeat
------
joseph


9fak2mn -|
-------  |-> letter 'n' present on both rows
Ypof3n0 -|


^pOldnam3y
----------
oMAr!x4N   -> rows don't match in length

And here's an example of a valid, albeit weak, cypher:

tenis
-----
polar

This cypher is valid, but weak because it's only ten letters long and leaves out the following sets of characters:

  • Capital letters
  • Digits
  • Punctuation characters
  • Accented and non-roman alphabet characters.

Because the program allows plain passthrough of any character it doesn't contain in the cypher, this limited set would mean that texts containing capital letters only, for example, would be transmitted unencoded. So keep a watch on the complexity of your cypher!

Development roadmap

  • Provide a way to show the cypher's fingerprint, so that two people know that they are using the same cypher to translate their messages.
  • Teach people what a strong cypher is.

I don't plan quite yet on rolling a GUI with it, but demand only will tell...

License

quickcypher is released under the GNU General Public License version 3 or newer. See LICENSE for more information.

Like all other Free Software out there, quickcypher has no warranties whatsoever. See the LICENSE file for more information.

Authored by Klaus Zimmermann