When encrypting, a person looks up each letter of the message in the 'plain' line and writes down the corresponding letter in the 'cipher' line. The encryption can also be represented using modular arithmetic by first transforming the letters into numbers, according to the scheme, A = 0, B = 1,..., Z = 25.Encryption of a letter x by a shift n can be described mathematically as Plaintext: Decryption is performed similarly, (There are different definitions for the modulo operation. I.e., if x n or x-n are not in the range 0...25, we have to subtract or add 26.) Read more ...Atbash is an ancient encryption system created in the Middle East. The Atbash cipher is a simple substitution cipher that relies on transposing all the letters in the alphabet such that the resulting alphabet is backwards.The first letter is replaced with the last letter, the second with the second-last, and so on.Only those letters which occur in the English alphabet are affected; numbers, symbols, whitespace, and all other characters are left unchanged.Because there are 26 letters in the English alphabet and 26 = 2 * 13, the ROT13 function is its own inverse: ROT13(ROT13(x)) = x for any basic Latin-alphabet text x An example plaintext to ciphertext using ROT13: A Polybius Square is a table that allows someone to translate letters into numbers.To give a small level of encryption, this table can be randomized and shared with the recipient.
n E t J s- s*' ' r ^ ' \ Hi PEAt OKIUM COMMENTATl ONa M A • SOCi£TATi BUS Li TTEUAiin S EDITARUM. An example plaintext to ciphertext using Atbash: a AAAAA g AABBA m ABABB s BAAAB y BABBA b AAAAB h AABBB n ABBAA t BAABA z BABBB c AAABA i ABAAA o ABBAB u BAABB d AAABB j BBBAA p ABBBA v BBBAB e AABAA k ABAAB q ABBBB w BABAA f AABAB l ABABA r BAAAA x BABAB In the affine cipher the letters of an alphabet of size m are first mapped to the integers in the range 0..m - 1.It then uses modular arithmetic to transform the integer that each plaintext letter corresponds to into another integer that correspond to a ciphertext letter.Applying ROT13 to a piece of text merely requires examining its alphabetic characters and replacing each one by the letter 13 places further along in the alphabet, wrapping back to the beginning if necessary.A becomes N, B becomes O, and so on up to M, which becomes Z, then the sequence continues at the beginning of the alphabet: N becomes A, O becomes B, and so on to Z, which becomes M.