Cryptography Fundamentals: DES, AES, RSA and Security

Posted by Anonymous and classified in Computers

Written on in with a size of 6.12 KB

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:

  1. SubBytes
  2. ShiftRows
  3. MixColumns
  4. 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

  1. Choose prime numbers p and q.
  2. Compute n = p × q.
  3. Compute φ(n) = (p-1)(q-1).
  4. Choose public key e.
  5. 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

FeatureSHA-512MD5
Digest Size512-bit128-bit
SecurityHighLow (Collision prone)
SpeedSlowerFaster

Applications

  • Password protection
  • Digital signatures
  • Data integrity

5. Symmetric vs. Asymmetric Cryptography

Symmetric and asymmetric cryptography are two major encryption techniques.

FeatureSymmetricAsymmetric
KeysOne keyTwo keys (Public/Private)
SpeedFasterSlower
Key SharingLess secureMore secure
ExamplesDES, AESRSA, 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

  1. Sender creates a message digest using a hash function.
  2. Digest is encrypted using the sender’s private key.
  3. Signature is attached to the message.
  4. Receiver decrypts the signature using the sender’s public key.
  5. 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

  1. XOR
  2. Addition modulo
  3. 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

Related entries: