# Cyphers & Encryption - Caesar's Cypher

Show/Hide:DefinitionsFormulaeInstructions

## Introduction:

This page allows you to encode or decode text using a secret code system that was known in the tome of the Romans, and commonly bears the name of Julius Caesar as a result.

## 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:

Offset
The difference in position between each encrypted and un-encrypted character.

## Formulae:

Caesar's Cypher works in the same manner as the Rot13 Cypher, but uses a variable offset. The cypher works by converting each character into a corresponding number, like so: a=1, b=2 etc. Once this conversion is complete, the 'offset' is added to each number, then converted back to a character. This is the same mechanism as the Rot13 Cypher, except that the offset used can be varied. This means that if the encrypted message is intercepted, in order to break the code, it is necessary to know not only the workings of the cypher, but which offset has been used. Legend has it that Caesar (after whom the cypher is named) always used an offset value of 3, which is also used here as the default value. Unlike the Rot13 Cypher, this method of encryption can handle all characters, not just letters, leading to a slightly higher level of security. (This is nowhere near as secure as a modern cypher, due in part to the fact that each character will always be transformed into the same character, making it very easy to do statistical analysis on larger passages of text.) This version of the algorithm is able to restore the original case of letters, ie Upper-case letters in the original text will re-appear as Upper-case when de-crypted. Again, this is not possible with the Rot13 Cypher, which must use either all Upper- or all Lower-case.

## Instructions

1. Type, or Copy-and-Paste the text to be encrypted where indicated.
2. Choose the offset to be used this time.
3. If you intend to send the encrypted text to someone else, make a note of the offset, as they won't find it easy to decrypt the text without it.
4. Click the 'Encrypt' button below the input field.
5. The encrypted text will be displayed below, along with a button to decrypt the text.
6. If you wish to demonstrate the importance of knowing the offset, then change it to a different number before decrypting, and you will note that the output remains unintelligible.
7. To do further encryptions simply change the text in the input field, optionally change the offset, and then click the 'Encrypt' button again.
Enter text to be encrypted here:
Encrypted Text:
De-Crypted Text: