🌍 Ethical Hacking · subject

Ethical Hacking Cryptography Syllabus

The Cryptography syllabus for Ethical Hacking in full: 4 chapters and 12 topics, every one listed below, plus 60 Cryptography flashcards with answers.

4Chapters
12Topics
60Flashcards

Cryptography syllabus: all 4 chapters

Expand any chapter to see its topics and sub-topics.

  1. Cryptography Concepts

    3 topics
    • What is Cryptography?
    • Types of Cryptographic Algorithms
    • Cryptographic Protocols
  2. Encryption Techniques

    3 topics
    • Symmetric Encryption
    • Asymmetric Encryption
    • Hashing
  3. Cryptographic Attacks

    3 topics
    • Brute Force Attacks
    • Cryptanalysis
    • Man-in-the-Middle Attacks
  4. Cryptography in Practice

    3 topics
    • Public Key Infrastructure (PKI)
    • Digital Signatures
    • SSL/TLS

Ethical Hacking Cryptography flashcards — 60 questions with answers

  1. What is cryptography?

    The practice and study of techniques for securing communication and data by transforming information so only authorized parties can read it. It provides confidentiality, integrity, authentication, and non-repudiation.

  2. Name the four core security goals (services) that cryptography aims to provide.

    Confidentiality (secrecy), Integrity (data unaltered), Authentication (verify identity/origin), and Non-repudiation (sender cannot deny sending).

  3. Define plaintext, ciphertext, and a cryptographic key.

    Plaintext is the original readable message; ciphertext is the scrambled/encrypted output; the key is the secret parameter that controls the encryption/decryption transformation.

  4. What is the difference between encryption and encoding?

    Encryption uses a key to protect confidentiality and is reversible only with the key. Encoding (e.g., Base64) transforms data for compatibility/transport using a public scheme with no secret, so it provides no security.

  5. What are the three main categories of cryptographic algorithms?

    Symmetric-key (secret-key) algorithms, Asymmetric-key (public-key) algorithms, and Hash functions (keyless one-way functions).

  6. What is Kerckhoffs's principle?

    A cryptosystem should remain secure even if everything about the system, except the key, is public knowledge. Security must rest on the secrecy of the key, not the secrecy of the algorithm.

  7. Distinguish a block cipher from a stream cipher.

    A block cipher encrypts fixed-size blocks of data (e.g., 128 bits) at a time; a stream cipher encrypts data bit-by-bit or byte-by-byte, typically by XOR-ing plaintext with a pseudorandom keystream.

  8. Give one example each of a block cipher and a stream cipher.

    Block cipher: AES (or DES/3DES). Stream cipher: RC4 (or ChaCha20, Salsa20).

  9. What is symmetric encryption?

    An encryption scheme in which the same secret key is used for both encryption and decryption, and both parties must share that key in advance.

  10. State two main advantages and one main disadvantage of symmetric encryption.

    Advantages: very fast and efficient, suitable for large data. Disadvantage: secure key distribution/exchange is difficult since both parties need the same secret key, and n users need many keys.

  11. How many symmetric keys are needed for secure pairwise communication among $n$ users?

    $\frac{n(n-1)}{2}$ keys, since each unique pair of users requires its own shared key.

  12. What key sizes does AES support, and what is its block size?

    AES uses a fixed block size of 128 bits and supports key sizes of 128, 192, or 256 bits.

  13. What is the effective key length of DES, and why is it considered insecure today?

    DES has a 56-bit effective key. Its keyspace of $2^{56}$ is small enough to be exhausted by modern brute-force attacks, so it is considered insecure.

  14. What problem does Triple DES (3DES) solve and how does it work?

    It strengthens DES against brute force by applying the DES cipher three times (encrypt-decrypt-encrypt) with two or three keys, giving an effective strength up to 112 bits.

  15. What is asymmetric (public-key) encryption?

    An encryption scheme using a mathematically linked key pair: a public key that anyone can use to encrypt (or verify), and a private key kept secret to decrypt (or sign). Different keys are used for the two operations.

  16. In asymmetric encryption, which key encrypts a message for confidentiality and which decrypts it?

    The recipient's public key encrypts the message; only the recipient's corresponding private key can decrypt it.

  17. On what mathematical hard problem does RSA rely for its security?

    The difficulty of factoring the product of two large prime numbers (integer factorization). Given $n = p \times q$, recovering $p$ and $q$ from $n$ is computationally infeasible for large primes.

  18. In RSA, how are the public and private exponents related to $\phi(n)$?

    The public exponent $e$ and private exponent $d$ satisfy $e \cdot d \equiv 1 \pmod{\phi(n)}$, where $\phi(n) = (p-1)(q-1)$ for $n = pq$.

  19. Write the RSA encryption and decryption formulas.

    Encryption: $c = m^{e} \bmod n$. Decryption: $m = c^{d} \bmod n$, where $(e, n)$ is the public key and $(d, n)$ is the private key.

  20. What is the main advantage of Elliptic Curve Cryptography (ECC) over RSA?

    ECC achieves equivalent security with much smaller key sizes (e.g., a 256-bit ECC key ≈ a 3072-bit RSA key), giving faster computation and lower resource use.

Show the other 40 Cryptography flashcards
  1. Compare symmetric and asymmetric encryption on speed and key management.

    Symmetric is fast but requires secure sharing of one secret key. Asymmetric is much slower but solves key distribution because the public key can be shared openly while the private key stays secret.

  2. How do hybrid cryptosystems (e.g., in TLS) combine both encryption types?

    They use slow asymmetric encryption to securely exchange or agree on a symmetric session key, then use fast symmetric encryption for the bulk data. This gets both secure key exchange and high speed.

  3. What is the purpose of the Diffie-Hellman protocol?

    It lets two parties establish a shared secret key over an insecure channel without ever transmitting the key itself, using modular exponentiation. It provides key exchange, not encryption.

  4. On what hard mathematical problem does Diffie-Hellman rely?

    The discrete logarithm problem: given $g$, $p$, and $g^{a} \bmod p$, it is computationally infeasible to recover the exponent $a$.

  5. In Diffie-Hellman, if Alice picks secret $a$ and Bob picks secret $b$ with public base $g$ and modulus $p$, what shared secret do they compute?

    Both compute the same shared key $s = g^{ab} \bmod p$. Alice computes $(g^{b})^{a}$ and Bob computes $(g^{a})^{b}$.

  6. What is a cryptographic hash function?

    A one-way function that maps input of arbitrary length to a fixed-size output (digest/hash). It is deterministic, fast to compute, and infeasible to invert.

  7. List the three key security properties of a cryptographic hash function.

    Pre-image resistance (can't find input from hash), second pre-image resistance (can't find a different input with the same hash as a given input), and collision resistance (can't find any two distinct inputs with the same hash).

  8. What is the avalanche effect in a hash function?

    A small change in the input (even one bit) produces a drastically different output hash, so about half the output bits flip. It prevents inferring input similarity from output similarity.

  9. Give the output (digest) sizes of MD5, SHA-1, and SHA-256.

    MD5 produces 128 bits, SHA-1 produces 160 bits, and SHA-256 produces 256 bits.

  10. Why are MD5 and SHA-1 no longer considered secure?

    Both are vulnerable to collision attacks: practical methods exist to find two different inputs producing the same hash, breaking collision resistance. SHA-2/SHA-3 should be used instead.

  11. What is a salt and why is it added when hashing passwords?

    A salt is a random value appended to a password before hashing. It ensures identical passwords produce different hashes, defeating precomputed rainbow-table attacks and forcing per-password cracking.

  12. What is a rainbow table attack?

    An attack that uses precomputed tables mapping hashes back to plaintexts (via reduction chains) to reverse unsalted password hashes quickly, trading memory for computation time.

  13. What is an HMAC and what does it provide?

    A Hash-based Message Authentication Code combines a hash function with a secret key to provide both data integrity and authentication, verifying that a message came from a party holding the key and was not altered.

  14. What is a brute-force attack?

    An attack that systematically tries every possible key or password until the correct one is found. Its feasibility depends directly on the size of the keyspace.

  15. How large is the keyspace for a key of length $n$ bits, and what does adding one bit do?

    The keyspace is $2^{n}$ possible keys. Adding one bit doubles the keyspace, doubling the brute-force effort.

  16. What is a dictionary attack and how does it differ from pure brute force?

    A dictionary attack tries a precompiled list of likely passwords/words rather than all possible combinations. It is faster than exhaustive brute force but only succeeds if the target is in the list.

  17. Name two defenses that make brute-force attacks impractical.

    Use large key sizes (e.g., 256-bit keys), and add rate limiting, account lockouts, or slow key-derivation functions (e.g., bcrypt, PBKDF2, Argon2) to increase per-guess cost.

  18. What is cryptanalysis?

    The study of analyzing and breaking cryptographic systems to recover plaintext or keys without being given the key, by exploiting weaknesses in the algorithm or implementation.

  19. Differentiate a known-plaintext attack from a chosen-plaintext attack.

    In a known-plaintext attack the analyst has some plaintext-ciphertext pairs. In a chosen-plaintext attack the analyst can pick arbitrary plaintexts and obtain their ciphertexts, giving more power to deduce the key.

  20. What is a ciphertext-only attack?

    The weakest attack model, where the cryptanalyst has access only to ciphertext (no plaintext) and tries to recover the key or plaintext, often using statistical/frequency analysis.

  21. What is a side-channel attack? Give an example.

    An attack that exploits physical information leaked during computation rather than mathematical weaknesses. Examples: timing analysis, power consumption analysis, electromagnetic emissions, or acoustic leakage.

  22. What is a birthday attack and which property does it threaten?

    An attack exploiting the birthday paradox to find hash collisions: for an $n$-bit hash, a collision is expected after about $2^{n/2}$ trials, threatening collision resistance.

  23. What is a Man-in-the-Middle (MITM) attack?

    An attack where the attacker secretly relays and possibly alters communication between two parties who believe they are talking directly, intercepting or modifying messages in transit.

  24. Why is plain (unauthenticated) Diffie-Hellman vulnerable to a MITM attack?

    Because it exchanges public values without authenticating identities, an attacker can establish separate shared keys with each party and relay messages, decrypting and re-encrypting them undetected.

  25. Name two defenses against Man-in-the-Middle attacks.

    Use authentication via digital certificates/PKI (e.g., verifying TLS certificates), and use authenticated key exchange, certificate pinning, or mutual authentication to bind identities to keys.

  26. What is Public Key Infrastructure (PKI)?

    The framework of hardware, software, policies, and roles (certificate authorities, registration authorities, certificates) that creates, manages, distributes, and revokes digital certificates to bind public keys to verified identities.

  27. What is the role of a Certificate Authority (CA) in PKI?

    A trusted third party that verifies an entity's identity and issues a digitally signed certificate binding that identity to its public key, allowing others to trust the key.

  28. What is contained in an X.509 digital certificate?

    It contains the subject's identity, the subject's public key, the issuing CA, validity period (not-before/not-after dates), serial number, and the CA's digital signature over the certificate.

  29. How is a certificate revoked in PKI, and name the two main mechanisms.

    A CA revokes a compromised or invalid certificate before expiry. Clients check status via a Certificate Revocation List (CRL) or the Online Certificate Status Protocol (OCSP).

  30. What is a chain of trust in PKI?

    A hierarchical path of certificates from a trusted root CA through intermediate CAs down to the end-entity certificate, where each certificate is signed by the one above it, so trust in the root extends to the leaf.

  31. What is a digital signature and what does it provide?

    A cryptographic value created by signing a message's hash with the sender's private key. It provides authentication, data integrity, and non-repudiation.

  32. Describe the process of creating a digital signature.

    The signer computes a hash of the message, then encrypts (signs) that hash with their private key. The signature is sent alongside the message.

  33. How is a digital signature verified?

    The verifier decrypts the signature with the sender's public key to recover the original hash, independently hashes the received message, and checks that the two hashes match. A match confirms authenticity and integrity.

  34. Why does a digital signature use the private key, while confidentiality encryption uses the public key?

    Signing uses the sender's private key so anyone can verify with the public key (proving origin). Confidentiality encrypts with the recipient's public key so only the recipient's private key can decrypt (proving secrecy).

  35. Why is the message hashed before signing rather than signing the whole message?

    Signing a small fixed-size hash is far more efficient than signing large data with slow asymmetric operations, and the hash's collision resistance still binds the signature to the exact message content.

  36. What is the difference between SSL and TLS?

    TLS (Transport Layer Security) is the modern successor to the now-deprecated SSL (Secure Sockets Layer). TLS is more secure; SSL versions are obsolete though 'SSL' is still used colloquially.

  37. What security services does SSL/TLS provide?

    Confidentiality (encryption of data in transit), integrity (via MACs/AEAD), and server (and optionally client) authentication using digital certificates.

  38. Outline the main steps of the TLS handshake.

    Client and server exchange hellos (agreeing on cipher suite and random values), the server presents its certificate, they perform key exchange to derive a shared session key, verify each other, and then switch to encrypted symmetric communication.

  39. How does TLS use both asymmetric and symmetric cryptography?

    It uses asymmetric cryptography (certificates and key exchange like RSA or ECDHE) during the handshake to authenticate and establish a shared session key, then uses fast symmetric encryption (e.g., AES) for the actual data transfer.

  40. What is forward secrecy (Perfect Forward Secrecy) in TLS?

    A property where ephemeral session keys are used (e.g., via ephemeral Diffie-Hellman, ECDHE) so that compromise of the server's long-term private key does not allow decryption of previously recorded sessions.

Ethical Hacking Cryptography FAQ

What is in the Ethical Hacking Cryptography syllabus?

Ethical Hacking Cryptography is split into 4 chapters: Cryptography Concepts, Encryption Techniques, Cryptographic Attacks and Cryptography in Practice. Together they contain 12 topics.

How many chapters are in Ethical Hacking Cryptography?

4 chapters, containing 12 topics. The largest chapter is Cryptography Concepts, with 3 topics.

Are there flashcards for Ethical Hacking Cryptography?

Yes — a 60-card Cryptography deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.