Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's tools.
Encranger, short for 'ENCryption by RAndom Number GeneratoR' is a tool to encrypt en de-encrypt single-line text messages. MultiEncranger is the multi-line version of Encranger.
The source code is hosted at the Encranger GitHub.
The Encranger encryption algorithm is a form of the Vigenere cipher. In the Vigenere cipher the shift of letters differs per position and are determined by the letters in a keyword. In the Encranger algorithm these shifts are determined by a random number generator, set by a key.
To make this clear, I will first briefly explain Caesar cipher, then I ll explain Vigenere cipher and finally show the difference between the Vigenere cipher and the Encranger algorithm.
Caesar cipher encrypts text by adding a value to each letter in a word. This value is the key or password. For example, the text AAAAA with the key +1 becomes BBBBB .
Vigenere cipher encrypts text by adding a value to each letter in a word, in which the shift changes per letter. For example, the key ABCDE might hold the shifts +1 +2 +3 +4 +5 . The plaintext AAAAA encrypted by the key ABCDE then becomes BCDEF .
Encranger, as Vigenere cipher, encrypts text by adding a value to each letter in a word, in which the shift changes per letter. These shifts are not determined by a word, but are generated randomly using a value (the key). For example, using an alphabet of only five letters, the value of 123 generates a shift sequence of +5 +3 +1 +2 +4. The plaintext AAAAA encrypted by the value 123 then becomes ADBCE. Encranger uses n (about fifty) characters, consisting of letters and punctuation characters. For a certain Encranger key, it is theoretically possible to calculate the Vigenere cipher key (also of n characters). Because Encranger uses the C++ random number generator to generate a random sequence of letter shifts, it is estimated that Encranger only has 32768 (RAND_MAX) or 4294967296 (2^32, the maximal integer value) different keys, instead of the highest possible, which would be the factorial of n.
Go back to Richel Bilderbeek's tools.
Go back to Richel Bilderbeek's homepage.