Computer Security Lecture 3 - Symmetric Cryptography
45 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the purpose of the collision-resistance property in hashing functions?

  • To make it impossible to reverse the hash to find the original message
  • To prevent two distinct messages from generating the same hash value (correct)
  • To allow the original message to be easily reconstructed from the hash
  • To ensure that the hash output is of fixed length
  • Given a hash output of $k$ bits, approximately how many hashing operations are necessary to find a collision?

  • $2^k$ operations
  • $2^{k/2}$ operations (correct)
  • $2^{k+1}$ operations
  • $k^2$ operations
  • Which of the following hash functions is considered to be secure for current use?

  • MD4
  • SHA-2 (correct)
  • MD5
  • SHA-1
  • What is the one-way property of a hash function?

    <p>Finding an original input from its hash output is computationally infeasible</p> Signup and view all the answers

    Which of the following statements about SHA-3 is correct?

    <p>It is the winner of the NIST hash function competition</p> Signup and view all the answers

    What is the size of the input block for the DES encryption process?

    <p>64 bits</p> Signup and view all the answers

    What is the purpose of the initial permutation in the DES encryption process?

    <p>To rearrange the bits of the input block</p> Signup and view all the answers

    How many rounds of processing does the DES encryption perform on the data?

    <p>16 rounds</p> Signup and view all the answers

    What is the role of the key schedule in the DES process?

    <p>To create multiple subkeys for each round</p> Signup and view all the answers

    What type of operation is performed on the left and right halves of the input during each DES round?

    <p>XOR operation</p> Signup and view all the answers

    What is the final output size of the DES encryption process after the last round?

    <p>64 bits</p> Signup and view all the answers

    Which of the following statements is true about the mangler function used in DES?

    <p>It combines the right half with a key to produce the output.</p> Signup and view all the answers

    The initial key used in DES has how many bits?

    <p>56 bits</p> Signup and view all the answers

    What is the primary characteristic of stateless signatures?

    <p>They do not require the signer to maintain key states.</p> Signup and view all the answers

    Which of the following is a known example of hash-based signatures?

    <p>SPHINCS+</p> Signup and view all the answers

    Which standard deals with modes of operation for an n-bit block cipher?

    <p>ISO/IEC 10116</p> Signup and view all the answers

    What is the useful bit length of the key used in DES?

    <p>56 bits</p> Signup and view all the answers

    What does the key schedule in DES produce for each round?

    <p>One 48-bit key</p> Signup and view all the answers

    What type of algorithms is described by ISO/IEC 17972?

    <p>Authenticated Encryption</p> Signup and view all the answers

    Which of the following is NOT a mode of operation mentioned for block ciphers?

    <p>GCM</p> Signup and view all the answers

    In the context of DES, which bits are considered parity bits?

    <p>Bits at positions 8, 16, 24, 32, 40, 48, 56, and 64</p> Signup and view all the answers

    What is the outcome of the mangler function in the DES decryption process?

    <p>It transforms the input using the current round key.</p> Signup and view all the answers

    What happens to the halves Li and Ri during the DES decryption rounds?

    <p>They are input in reverse order compared to encryption.</p> Signup and view all the answers

    What is necessary to retrieve Li and Ri from Li+1 and Ri+1 in DES decryption?

    <p>Apply the XOR operation with the mangler function.</p> Signup and view all the answers

    What is a limitation of DES that TripleDES addresses?

    <p>The key size is too small.</p> Signup and view all the answers

    How does the key schedule in TripleDES differ from that in single DES?

    <p>It applies key derivation from a longer key length.</p> Signup and view all the answers

    In DES decryption, which statement is true regarding the final permutation?

    <p>It has no role in the decryption process.</p> Signup and view all the answers

    What is an essential property of the mangle function during the DES process?

    <p>It does not require previous outputs to function.</p> Signup and view all the answers

    Which of the following statements about TripleDES is correct?

    <p>It provides key sizes of 112 or 168 bits.</p> Signup and view all the answers

    What is the first step in the AES decryption operation?

    <p>S = AddRoundKey(C, Kn)</p> Signup and view all the answers

    Which operation is performed last in the AES decryption process?

    <p>AddRoundKey(S, K0)</p> Signup and view all the answers

    In the AES decryption process, how many times does the loop execute for n rounds?

    <p>n-1 times</p> Signup and view all the answers

    What is the primary function of the MixColumns operation in AES?

    <p>To provide diffusion by mixing the columns of the state</p> Signup and view all the answers

    Which property of a hash function ensures that it is infeasible to find an input that maps to a given hash output?

    <p>Pre-image resistance</p> Signup and view all the answers

    What does the operation S = SubBytes-1(S) achieve during AES decryption?

    <p>It performs a byte substitution using the inverse S-box</p> Signup and view all the answers

    What is a key feature of the hash function described in the text?

    <p>It maps variable-length data to a fixed-length output</p> Signup and view all the answers

    For which purpose is a hash function NOT used according to the content?

    <p>Encrypting data</p> Signup and view all the answers

    What is the main purpose of hashing a password before storing it?

    <p>To protect the password in case the database is compromised</p> Signup and view all the answers

    What does adding a salt to a hashed password help to prevent?

    <p>Brute-force attacks with precomputed hashes</p> Signup and view all the answers

    Which attack method is specifically mentioned as being mitigated by using salts?

    <p>Rainbow table attacks</p> Signup and view all the answers

    How does the process of storing a password in encrypted form differ from storing it in hashed form?

    <p>Encryption requires a key, while hashing does not.</p> Signup and view all the answers

    What is a potential risk if the key used for encrypting passwords is compromised?

    <p>The encrypted passwords can be decrypted and accessed by unauthorized users</p> Signup and view all the answers

    What security measure can be adopted to slow down brute-force attacks on hashed passwords?

    <p>Implementing repeated hashing in the computation</p> Signup and view all the answers

    Why is storing passwords in encrypted form considered better than hashed form when securing sensitive data?

    <p>Encrypted passwords can be recovered if the key is available, whereas hashed passwords cannot.</p> Signup and view all the answers

    What fundamental security issue remains even when passwords are stored using hashing or encryption?

    <p>Compromise of the password management system</p> Signup and view all the answers

    Study Notes

    Computer Security Lecture 3 - Symmetric Cryptography (II)

    • Review of previous lecture topics: block ciphers (e.g., DES and AES), padding, modes of operation (e.g., ECB, CBC, CTR), error propagation, message authentication codes (MACs), MACs based on block ciphers, and authenticated encryption.
    • Lecture Structure:
      • DES: Data Encryption Standard
      • AES: Advanced Encryption Standard
      • Hash functions
      • MACs based on hash functions
      • Hash-based signatures.

    DES (Data Encryption Standard)

    • Adopted as a standard by the USA's National Institute of Standards and Technology (NIST) in 1976, ratified every 5 years.
    • Ultimately replaced by AES (Advanced Encryption Standard) in 2001.
    • Uses 56-bit keys (plus 8 for parity checks).
    • 64-bit block cipher, encrypting in 64-bit (8-byte) blocks.
    • Component Operations:
      • Exclusive-or (XOR)
      • Permutation
      • Lookups
      • Left Bitshift
      • Loops / Repeated Rounds.

    DES Key

    • Presented as 8 bytes (e.g., 9F 6D 32 6A 01 68 EC 5B).
    • Contains 64 bits, but 8 bits (last bit of each byte) are parity bits.
    • Parity bits are effectively ignored and are usually ignored.
    • The least significant bit of each byte should be set to ensure an odd number of 1s in each key byte.
    • The key effectively contains 56 bits of entropy.
    • 56 bits are needed for encryption/decryption.

    DES Key Schedule

    • 64-bit DES key, ignore the 8-bit parity numbers (8, 16, 24, 32, 40, 48, 56, 64)
    • The key schedule algorithm takes the remaining 56-bit DES key as input and generates 16 48-bit subkeys (K1, K2, ..., K16).
    • Each subkey is used in one round.

    DES Schematic

    • Data flow illustrated graphically.

    Initial and Final Permutations (IP and IP⁻¹)

    • Defined in table format.
    • Show reordering of bits in inputs and outputs.

    DES Encryption Round

    • The process in which the cipher does 16 rounds of operations on input blocks.
    • Left half of the output is the right-hand half of the input
    • Right half of the output is obtained by XORing the left-hand half of the input with right-half mangled using the round key

    DES Decryption

    • The steps in reversing the encryption process.
    • The mangler function is not needed in decryption.

    TripleDES

    • DES has been deprecated, but TripleDES is still used.
    • TripleDES uses a longer key (112 or 168 bits) for enhanced security than DES (56-bit key).
    • Improved resistance against brute-force attacks.
    • 112-bit key: k = k1 || k2 (encryption of block b in TripleDES consists of encrypt with k1, decrypt the block b with k2 then encrypt the result with k1).
    • 168-bit key: k = k1 || k2 || k3 (encryption of block b in TripleDES consists of encrypt with k1, decrypt the block b with k2 then encrypt the result with k3).

    Why not Double DES

    • DoubleDES is not secure against brute-force attacks, and can be broken more quickly than DES.
    • Meet-in-the-middle attack is possible.

    AES (Advanced Encryption Standard)

    • Current standard for encryption.
    • NIST ran a competition to find a replacement for DES.
    • Rijndael (a design by Joan Daemen and Vincent Rijmen) was selected.
    • Block size: 128 bits.
    • Key sizes: 128, 192, or 256 bits
    • Similar principles to DES with a focus on performance optimization in both hardware and software.

    AES further materials

    • Official definition (NIST publication).
    • YouTube conceptual overview (by Gideon Samid).
    • Cartoon guide (explaining the principles without diving into the complex math).

    AES Schematic

    • Diagram shows input and output block data sizes.

    AES Key Schedule

    • Generates n+1 subkeys from a key.
    • The number of rounds is 10, 12, or 14.

    AES Operations in the Rounds

    • Explanation of the key operations in the rounds.

    AES Encryption and Decryption

    • Descriptions, and detailed operations for encrypting and decrypting processes.

    AES S-Box

    • Table listing the mapping of input values to output values in the S-Box.

    Hash Functions

    • Function that maps variable-length input (x) to fixed-length output (y).
    • Cryptographic hash functions have three important properties: one-way, second pre-image, collision-resistance.

    Standard Hash Functions (SHA, MD)

    • Various standard hash functions were and are widely used, including MD4, MD5, SHA-1, SHA-2, and SHA-3 (aka Keccak).

    MAC (Message Authentication Code)

    • MACs provide data integrity without considering confidentiality.
    • Using hash functions to calculate MACs.
    • HMAC (Hash-based Message Authentication Code), HMAC function is more widely used MAC than the basic MAC function because HMAC is more security.

    Hash-based Signatures

    • Discussion of various hash-based signature schemes. (Lamport, Winternitz, Merkle, etc.) and how they're used and their characteristics.
    • Descriptions and details of different multi-level signatures (e.g., XMSS, LMS, SPHINCS+) and their characteristics.

    Storing Passwords

    • Various approaches for securely storing passwords: storing as plaintext, hashing, and encrypting.
    • Discussion of the vulnerabilities of each approach.

    Lab: AES and Hash Functions

    • Lab exercises for demonstration and training.

    Appendices

    • Further information and explanations of topics.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Computer Security Lecture 3 PDF

    Description

    This quiz covers the core concepts of symmetric cryptography discussed in Lecture 3, including block ciphers like DES and AES, modes of operation, and message authentication codes. You will explore key operations and functionalities of these cryptographic standards, enhancing your understanding of data security mechanisms.

    More Like This

    Use Quizgecko on...
    Browser
    Browser