Table of Contents


What is cryptography?

Cryptography is the practice of securing communication and data by transforming it into a readable format only accessible to authorized parties. It uses algorithms to encrypt and decrypt information, ensuring privacy and integrity.

  • AES (Advanced Encryption Standard) – Symmetric encryption, widely used in government, business, and secure communications.
  • RSA – Asymmetric encryption for secure data transmission.
  • ECC (Elliptic Curve Cryptography) – Efficient asymmetric encryption with smaller key sizes, used in mobile devices and IoT.
  • SHA-2 (Secure Hash Algorithm 2) – Cryptographic hash function, commonly used for data integrity verification. SHA-256 is one of its most popular variants.
  • MD5 – Vulnerable to collision attacks, but still used in non-security-critical applications.
  • DES (Data Encryption Standard) – Outdated, easily cracked due to short key size (56 bits).
  • RC4 – Stream cipher with known vulnerabilities, no longer recommended for use.

Block vs Stream ciphers

  • Block Ciphers encrypt data in fixed-size blocks (e.g., 128 bits). Example: AES, DES.
  • Stream Ciphers encrypt data bit-by-bit or byte-by-byte. Example: RC4, Salsa20.

Difference: Block ciphers are more secure for larger data sets, while stream ciphers are more efficient for continuous data (e.g., live streaming).

Symmetric vs Asymmetric encryption

  • Symmetric Encryption uses the same key for both encryption and decryption. Example: AES.
  • Asymmetric Encryption uses a pair of keys: a public key for encryption and a private key for decryption. Example: RSA, ECC.

What is Diffie-Hellman?

Diffie-Hellman is a key exchange protocol allowing two parties to securely share a secret key over an insecure channel, using their private keys and public values. It enables encryption without direct exchange of secret information.

What are digital signatures?

Digital signatures verify the authenticity of a message or document. They use the sender’s private key to sign the data, and the recipient can verify the signature using the sender’s public key. This ensures both integrity and authenticity.

Key length vs algorithm strength

  • More key length generally equals more security, but the effectiveness depends on the algorithm.
    • Example: AES-256 is stronger than AES-128 due to its longer key.
    • RSA-2048 is considered secure but less efficient than ECC-256, which provides similar security with a smaller key.
  • Larger keys lead to more computational cost and may not always offer proportional security gains, especially with advanced algorithms like ECC.