ATBASHCipher
A simple linear cipher originally used on the Hebrew alphabet.
Install / Use
/learn @CrypTools/ATBASHCipherREADME
ATBASH Cipher
<p align="center"> <!-- replace image by project Image --> <img height="128" src="https://cryptools.github.io/img/atbash.svg"> </p> <p align="center"> <img src="https://cryptools.github.io/img/status/implemented.svg"> <img src="https://img.shields.io/travis/CrypTools/ATBASHCipher.svg"> <img src="https://img.shields.io/github/license/Cryptools/ATBASHCipher.svg"> <img src="https://img.shields.io/github/contributors/Cryptools/ATBASHCipher.svg"> </p>A simple linear cipher originally used on the Hebrew alphabet. Atbash is considered a special case of Affine Cipher, a monoalphabetic substitution cipher.
How it works
Encoding
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
Decoding
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
Cons
- Pretty simple and famous cipher.
- Frequency analysis can be used to crack the code, if the message is long enough.
Implementations
| 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 |
Running the tests
Tests are automatically handled by Travis CI.
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
Made with ❤️ at CrypTools.
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Related Skills
node-connect
340.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
340.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.1kCommit, push, and open a PR
