# Cyphers & Encryption - Vernam's Cypher

Show/Hide:DefinitionsFormulae Instructions

## Introduction:

This page allows you to encode text or decode text encrypted with Vernam's cypher. The strength of this cypher depends on knowing an independant secret, such as a secret word, or a page from a book. If the length of the 'secret' is as long as the length of the message itself, then the code that is produced cannot be cracked by statistical methods. If the 'secret' consists of only a single letter, then the cypher becomes a variant of Rot13, which can easily be cracked - it is often used in Puzzle Books for exactly that reason.

## Caveats:

If you are reading this paragraph, then you probably don't have JavaScript installed/enabled on your computer.
At this point in time the calculators on this site are entirely dependent on JavaScript. Given enough time and money it is hoped to develop a version in the future which will be able to operate independently. Since JavaScript runs on your own computer, rather than on this server, it has been possible to set up this site much more quickly than if a server-side language was used, and it is possible to serve far more pages with the available bandwidth.
If you think that you can assist with this project in any way, then please visit the Support section and leave a message.

## Definitions:

Secret
A piece of text known to both the sender and recipient of the message, which acts as the 'key' to code.
Salt
Alternative name for the secret piece of text used to encrypt the message.
Rot13
A classical cypher, where the alphabet can be written in a circle, and which shares some common ground with this cypher.

## Formulae:

Vernam's Cypher works in the same manner as Caesar's Cypher, but uses a different offset for each character. The cypher works by converting each character (in both the 'secret' and the main text) into a corresponding number, like so: a=1, b=2 etc. (though in a semi-random order.) Once this conversion is complete, the value of each character of the main text is added to the value of the corresponding letter from the 'secret', then converted back to a character.

## Instructions

1. Type, or Copy-and-Paste the text to be encrypted / decrypted where indicated below.
2. Type, or Copy-and-Paste the 'secret' into the second field.
3. Click the 'Encrypt' or 'Decrypt' button below the input fields.
4. The converted text will be displayed below.
5. To do further encryptions / decryptions simply change the text in the input field, and then click the 'Encrypt' or 'Decrypt' button again.
Enter text to be encrypted / decrypted here:Enter the 'secret' / salt here:
Encrypted Text: