A simple linear cipher originally used on the Hebrew alphabet. Atbash is considered a special case of Affine Cipher, a monoalphabetic substitution cipher.
The ATBASH cipher is pretty simple, and all its does is reverse the letters in the alphabet: A becomes Z, B becomes Y, ..., Y becomes B, Z becomes A.
Here's the full table:
A | B | C | D | E | F | G | H | I | J | K | L | M |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Z | Y | X | W | V | U | T | S | R | Q | P | O | N |
N | O | P | Q | R | S | T | U | V | W | X | Y | Z |
---|---|---|---|---|---|---|---|---|---|---|---|---|
M | L | K | J | I | H | G | F | E | D | C | B | A |
Encoding the word crypto
, we get:
C R Y P T O
X I B K G L
We can observe that applying the code twice to a message letter, will leave us with the original message. To decrypt, we just have to re-apply the code.
X I B K G L
C R Y P T O
- Pretty simple and famous cipher.
- Frequency analysis can be used to crack the code, if the message is long enough.
Language | Encrypt | Decrypt |
---|---|---|
C | ATBASHCipher.c | ATBASHCipher.c |
C++ | main.cpp | main.cpp |
Javascript | encrypt.js | decrypt.js |
Python | encrypt.py | decrypt.py |
Swift | lib.swift | lib.swift |
Tests are automatically handled by Travis CI.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
Made with ❤️ at CrypTools.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details