Available algorithms
Caesar cipher
Substitution cipher that shifts letters by a fixed position
Transposition cipher
Rearranges message letters using a columnar transposition matrix
RSA encryption
Asymmetric encryption using public and private key pairs
Comparison table
| Feature | Caesar | Transposition | RSA |
|---|---|---|---|
| Type | Substitution | Transposition | Asymmetric |
| Key type | Single integer (shift) | Column count | Public/private key pair |
| Default key | 8 positions | 5 columns | 32-bit keys |
| Alphabet support | Spanish (A-Z + Ñ) | Any characters | ASCII characters |
| Complexity | Very low | Low | High |
| Security level | Educational only | Educational only | Educational only |
| Output format | Text | Text | Array of numbers |
Security considerations
Why these implementations are not secure
Caesar cipher vulnerabilities
Caesar cipher vulnerabilities
- Only 27 possible keys (easily brute-forced)
- Vulnerable to frequency analysis
- No protection against known-plaintext attacks
- Trivial computational complexity to break
Transposition cipher vulnerabilities
Transposition cipher vulnerabilities
- Does not hide letter frequencies
- Vulnerable to anagramming attacks
- Pattern analysis can reveal the key
- No protection for short messages
RSA implementation vulnerabilities
RSA implementation vulnerabilities
- 32-bit keys are extremely weak (can be factored in seconds)
- No padding scheme (vulnerable to various attacks)
- No salt or randomization
- Simple prime generation without cryptographic guarantees
- Production RSA uses 2048+ bit keys minimum
For production cryptography, use established libraries like
cryptography or pycryptodome that implement modern, secure algorithms with proper key sizes and security measures.Choosing an algorithm
For learning purposes
- Start with Caesar
- Then Transposition
- Finally RSA
Best for beginnersThe Caesar cipher is the simplest to understand and implement. It’s perfect for:
- Understanding basic encryption concepts
- Learning about modular arithmetic
- Exploring frequency analysis attacks
- First steps in cryptography
Common features
All three algorithms in this project share:- Encrypt and decrypt functions: Each algorithm provides bidirectional operations
- Key-based encryption: All require a key (shift, column count, or key pair)
- Python implementation: Pure Python code without external crypto libraries
- CLI and web interface: Available through
main.py(console) orapp.py(Flask) - Spanish language support: Caesar cipher includes the Ñ character
Next steps
Explore individual algorithms
Read the detailed documentation for each algorithm to understand how they work