Cipher tools
A collection of tools for encrypting and decrypting data, using some commonly known ciphers.
Please note that these tools aren't optimized for large amounts of data, processing can slow down or run into problems once you reach above 150,000
characters. A cap of 1 million characters is currently in place.
Atbash cipher
A simple substitution cipher that takes a string and transforms each letter to its mirror image in the alphabet. For example:
A ⇆ Z
B ⇆ Y
etc.
Beaufort cipher
Similar to the Vigenère cipher (the decryption process is the same), except you start with a reversed alphabet. For example: SENTENCE
encrypted with a key of TEST
would shift like:
S → T → B
E → E → A
N → S → F
T → T → A
- then loop back and start from the first letter in the key again. There is more information available on the Beaufort cipher Wikipedia page.
Caesar cipher
A very simple method of encryption, the Caesar cipher - also known as a shift cipher - 'shifts' the alphabet a certain number of spaces, pushing the letters at the end to the beginning.
The most common Caesar cipher is Rot 13, where
A
becomes
N
and so forth. You can optionally add a key to the cipher to further encrypt your results, this will create a custom alphabet to rotate through –
see the Substitution Cipher below for more information.
There is more information available on the Caesar_cipher Wikipedia page.
Chaocipher
Chaocipher is an encryption method invented by John F. Byrne in the 1920s. It uses two shifting sets of the alphabet to scramble messages uniquely each time. Only someone with the correct settings can decode the scrambled message back to its original form. For example:
HELLO WORLD
→
WAHQZIUETS
etc. There is more information available on the Chaocipher Wikipedia page
Hash
Generate various hash values for a given text string. More information about hashes and the libraries used here, can be found on the CryptoJS Gitbook documentation site.
Keyword cipher
Similar to the Vigenère cipher (the decryption process is the same), except you start with a reversed alphabet. For example:
TEST SENTENCE
encrypted with a key of WORD
would shift like:
TBST SBLTBLDB
Rail fence cipher
Also known as the Zig Zag cipher, takes its name from the way in which the encryption is performed - in analogy to a fence built with horizontal rails. Below is an example using 3 rails, more rails equals more complexity and makes it harder to decode without the correct number of rails. There is more information available on the Rail fence cipher Wikipedia page.
WE ARE DISCOVERED. RUN AT ONCE.
W . . . E . . . C . . . R . . . U . . . O . . .
. E . R . D . S . O . E . E . R . N . T . N . E
. . A . . . I . . . V . . . D . . . A . . . C .
WECRUO ERDSOEERNTNE AIVDAC
Substitution cipher
A substitution cipher uses a key or a phrase to make a new alphabet, with the end result potentially being a completely jumbled up alphabet.
A quick example substitution:
SENTENCE
→
TEST
→
QBLRBLSB
- The full alphabet would look like
TESABCDFGHIJKLMNOPQRUVWXYZ
– notice that T, E and S have moved to the start, the second T in TEST isn't present again as it has already been used and placed.
Mixed case strings and keys are supported here, for example:
SENTence
→
TEST
→
QBLRblsb
or
SENTence
→
TEst
→
PAKQaksa
– There is more information available on the Substitution cipher Wikipedia page.
Vigenère cipher
One of the most well known cipher methods. Each letter of the message is shifted by a corresponding character of the key, running out of characters in the key will loop back to the beginning. For example: SENTENCE
encrypted with a key of TEST
would shift like:
S → T → L
E → E → I
N → S → F
T → T → M
- for the next letters, the key would loop back and start from the first T in TEST again. There is more information available on the Vigenère cipher Wikipedia page.