Cryptography Fundamentals: DES, AES, RSA and Security
1. DES Structure
DES (Data Encryption Standard) is a symmetric key block cipher used for data encryption. It encrypts 64-bit plaintext using a 56-bit secret key.
DES uses a 16-round Feistel structure. The plaintext first undergoes initial permutation and is divided into left and right halves. In every round, the right half is processed using a round function and XORed with the left half. After 16 rounds, a final permutation is performed to generate the ciphertext.
Features
- 64-bit block size
- 56-bit key
- 16 rounds
- Uses Feistel structure
Advantages
- Simple implementation
- Efficient hardware encryption
Disadvantages
- Weak against brute-force attacks
2. AES Algorithm
AES (Advanced Encryption Standard) is a symmetric encryption algorithm used to secure digital communication. It replaced DES due to security vulnerabilities.
AES uses:
- 128-bit block size
- 128/192/256-bit keys
AES performs four operations:
- SubBytes
- ShiftRows
- MixColumns
- AddRoundKey
The number of rounds depends on key size:
- 10 rounds for 128-bit
- 12 rounds for 192-bit
- 14 rounds for 256-bit
Advantages
- Faster than DES
- Highly secure
- Resistant to attacks
Applications
- Banking systems
- Wireless security
- Internet security
3. RSA Algorithm
RSA is an asymmetric cryptographic algorithm that uses public and private keys for secure communication.
Steps of RSA
- Choose prime numbers p and q.
- Compute n = p × q.
- Compute φ(n) = (p-1)(q-1).
- Choose public key e.
- Compute private key d.
Encryption and Decryption
Encryption: C = Me mod n
Decryption: M = Cd mod n
Advantages
- High security
- Used in digital signatures and secure communication
4. SHA-512 and MD5
SHA-512 and MD5 are cryptographic hash algorithms used to verify message integrity.
Comparison
| Feature | SHA-512 | MD5 |
|---|---|---|
| Digest Size | 512-bit | 128-bit |
| Security | High | Low (Collision prone) |
| Speed | Slower | Faster |
Applications
- Password protection
- Digital signatures
- Data integrity
5. Symmetric vs. Asymmetric Cryptography
Symmetric and asymmetric cryptography are two major encryption techniques.
| Feature | Symmetric | Asymmetric |
|---|---|---|
| Keys | One key | Two keys (Public/Private) |
| Speed | Faster | Slower |
| Key Sharing | Less secure | More secure |
| Examples | DES, AES | RSA, ElGamal |
In symmetric encryption, the same key is used for encryption and decryption. In asymmetric encryption, public and private keys are used. Conclusion: Symmetric encryption is fast, while asymmetric encryption provides better security.
6. Feistel Structure
The Feistel structure is a design model used in block ciphers such as DES and Blowfish. Plaintext is divided into left and right halves. In each round, the right half is processed using a function and XORed with the left half, then the halves are swapped.
Formulas
Li = Ri-1
Ri = Li-1 ⊕ F(Ri-1, Ki)
Advantages
- Efficient implementation
- Same structure for encryption and decryption
7. Digital Signatures
A digital signature is a cryptographic technique used to verify the authenticity and integrity of messages.
Working Process
- Sender creates a message digest using a hash function.
- Digest is encrypted using the sender’s private key.
- Signature is attached to the message.
- Receiver decrypts the signature using the sender’s public key.
- Hashes are compared for verification.
Advantages
- Authentication
- Integrity
- Non-repudiation
8. Blowfish Algorithm
Blowfish is a symmetric block cipher developed by Bruce Schneier as a secure alternative to DES.
Features
- 64-bit block size
- Variable key length (32–448 bits)
- 16 Feistel rounds
- Fast encryption
Advantages
- Flexible key length
- Strong security
- Faster than DES
9. IDEA Algorithm
IDEA (International Data Encryption Algorithm) is a symmetric block cipher used for secure data encryption.
Features
- 64-bit block size
- 128-bit key
- 8 rounds and final transformation
Operations
- XOR
- Addition modulo
- Multiplication modulo
Advantages
- Strong security
- Resistant to cryptanalysis
10. Cryptographic Attacks
Cryptographic attacks are methods used to break encryption systems and access confidential information.
Types of Attacks
- Ciphertext-only: Attacker has only ciphertext.
- Known Plaintext: Attacker knows plaintext and ciphertext.
- Chosen Plaintext: Attacker chooses plaintext and gets ciphertext.
- Brute Force: Attacker tries all possible keys.
- Man-in-the-Middle: Attacker intercepts communication.
Prevention
- Strong encryption
- Long keys
- Secure protocols
with a size of 6.12 KB