Base64 Cipher

Introduction §

Base64 isn't really a cipher, since there is no key. It was originally used to encode binary information like images into a character string consisting only of printable characters so it could be sent over text protocols like http. I see it a lot lately used like Rot13 - i.e. just a way to mask a plaintext, not really to encrypt it.

You can usually tell if you have a piece of Basee64 encoded text because it will often end in an equal sign (though not always...) and has many uppercase and lowercase characters. Very few of the other ciphers on this site consist of a jumble of uppercase characters, lowercase characters and numbers, so that is often a dead giveaway.

As an example, the text "defend the east wall of the castle" is encoded as:

ZGVmZW5kIHRoZSBlYXN0IHdhbGwgb2YgdGhlIGNhc3RsZQ==

Note the mix of characters and the equals signs on the end. There can be 0, 1 or 2 equals signs on the end, the exact number depends on the length of the input.

Javascript Example §

Plaintext

Ciphertext

Cryptanalysis §

Cryptanalysis is easy if you know your text is enciphered with Base64 - just run it through the decoder above. I have seen examples where it has been encoded multiple times - I had to decode it about 6 times to get to plain English.

To identify whether you have a Base64 encoded text, you can usually tell if the text ends in an equal sign and has many uppercase and lowercase characters.

References §

[1] Wikipedia has a good description of the encryption/decryption process and history of this algorithm
comments powered by Disqus
YBL KRQ IBF KFNLH R KFSQYRDQ MLXDQH MV TRPPVDQX - TFQZSTDSH