Curated

Security Engineering 4 (3.7–3.8)

0 votes

Questions51

  1. Question 1

    Security Engineering

    A cloud provider totals a customer's encrypted invoice amounts using homomorphic encryption. What does the provider need in order to produce the encrypted total?

    Show the answer

    Correct answerA. Only the ciphertexts and public evaluation parameters

    AWhy this is right: Operations act on ciphertext with public parameters, so the provider can compute without any ability to decrypt.

    BWhy not this: Holding the private key would let the provider read the invoices, which the scheme is meant to prevent.

    CWhy not this: Forward secrecy protects transport sessions; it plays no role in computing on encrypted values.

    DWhy not this: That describes envelope encryption, where the provider would unwrap a data key and then see plaintext.

    Homomorphic operations are performed on ciphertexts using public parameters, so the provider never needs the private key, and only the key owner can decrypt the total. Requiring the private key would mean the provider could read the data, defeating the purpose.

    Open this question
  2. Question 2

    Security Engineering

    An audit finds user passwords stored as single-pass fast hashes that GPUs can guess billions of times per second offline. What should the team adopt to make each guess more costly?

    Show the answer

    Correct answerC. Key stretching with a high iteration count

    AWhy not this: Faster hashing hardware increases guesses per second, which is the opposite of the goal here.

    BWhy not this: Wrapping hashes under another key protects them at rest but does not make each password guess more expensive.

    CWhy this is right: Iterated or memory-hard derivation raises the work per guess, slowing offline brute force of weak passwords.

    DWhy not this: Forward secrecy protects past session traffic from later key compromise; it does nothing for stored password hashes.

    Key stretching (PBKDF2, bcrypt, scrypt, Argon2) repeats or hardens the derivation so every offline guess costs far more work. Hardware acceleration makes hashing faster, which helps an attacker guess more quickly rather than slowing them.

    Open this question
  3. Question 3

    Security Engineering

    A hospital wants a cloud provider to compute aggregate statistics on its encrypted patient records without the provider ever holding a decryption key. Only the hospital will read the results. Which technique fits?

    Show the answer

    Correct answerD. Homomorphic encryption

    AWhy not this: Provides confidentiality and integrity for stored or sent data but cannot be computed on without decrypting.

    BWhy not this: The provider would need the unwrapped data key to process the records, so it would see plaintext.

    CWhy not this: Designed for multiple parties jointly computing over their own private inputs; here one owner holds all the data.

    DWhy this is right: Computation runs directly on ciphertext, so the provider never needs a key and the hospital decrypts the result.

    Homomorphic encryption lets a provider compute on ciphertext and return an encrypted result that only the data owner can decrypt. Secure multiparty computation fits several parties each holding private inputs, not one owner outsourcing computation.

    Open this question
  4. Question 4

    Security Engineering

    A bank must back up its offline root CA private key so no single custodian can recover it, yet recovery must still work if two of five custodians are unavailable. Which design meets both requirements?

    Show the answer

    Correct answerD. A 3-of-5 threshold split of the key among the custodians

    AWhy not this: Requires all five shares, so the absence of even one custodian blocks recovery.

    BWhy not this: One officer holding the wrapping key is a single point of control, so one person could recover the key alone.

    CWhy not this: A shared passphrase gives every custodian full access individually; stretching it does not divide control.

    DWhy this is right: Any three shares rebuild the key, but one or two shares reveal nothing, meeting both separation and availability needs.

    A 3-of-5 threshold split (secret sharing) means no one or two custodians can rebuild the key, while any three can, so two absences are tolerated. A 5-of-5 split needs every custodian, so it fails the availability requirement.

    Open this question
  5. Question 5

    Security Engineering

    A vendor learns that its code-signing private key was stolen and has been used to sign malware. Customers must stop trusting anything signed after the theft, and legitimate releases must remain installable. What should the vendor do?

    Show the answer

    Correct answerA. Revoke the certificate, generate a new key pair in an HSM, and re-sign legitimate releases

    AWhy this is right: Revocation blocks the stolen key, and a new HSM-held key pair lets legitimate software be re-signed and trusted.

    BWhy not this: Timestamping does not invalidate the stolen key, so the attacker can keep producing trusted signatures.

    CWhy not this: Website hashes do not stop validators trusting the stolen key, and OS signature checks ignore them.

    DWhy not this: Installers are not protected by a symmetric key; this does nothing about a stolen signing key.

    Revocation makes validators reject signatures from the compromised key, and a new HSM-protected key pair restores trust for re-signed legitimate releases. Timestamping proves when something was signed but does not stop the thief from signing.

    Open this question
  6. Question 6

    Security Engineering

    A SaaS provider must make a terminated tenant's data unrecoverable on cloud SSD volumes it cannot physically access. The volumes are encrypted at rest with a per-tenant AES-256 key. What is the BEST way to sanitize them?

    Show the answer

    Correct answerA. Securely destroy the tenant's data-encryption key and all its copies

    AWhy this is right: Destroying every copy of the key makes the encrypted data permanently unreadable, with no physical access needed.

    BWhy not this: Masking alters how values display but does not sanitize the underlying stored data.

    CWhy not this: Logical overwrites may miss remapped SSD blocks and are not verifiable in a cloud environment.

    DWhy not this: Tokenization needs the original data protected elsewhere and does not sanitize the existing volumes.

    Cryptographic erase destroys the key, leaving only ciphertext that cannot be decrypted, which works without physical access to the media. A logical overwrite is tempting but unreliable on SSDs and cloud storage, where wear leveling and abstraction leave original blocks untouched.

    Open this question
  7. Question 7

    Security Engineering

    What does a valid code-signing signature on a downloaded installer let the operating system verify?

    Show the answer

    Correct answerC. The publisher's key signed it and it is unmodified

    AWhy not this: Signing does not encrypt anything; transport confidentiality comes from something like TLS.

    BWhy not this: Signing does not require or imply published source code; closed-source software is signed routinely.

    CWhy this is right: The signature checks against the publisher's public key and the code hash, proving authenticity and integrity.

    DWhy not this: Signing proves origin and integrity only; a signed program can still contain malware or flaws.

    A code-signing signature is a digital signature over the code's hash. It proves the code came from the holder of the signing key and has not changed since signing. It says nothing about whether the code is safe.

    Open this question
  8. Question 8

    Security Engineering

    A retailer's order database must hold a 16-digit stand-in for each card number, and the refund service must be able to retrieve the original number. The stand-in must have no mathematical relationship to the card number, so no key can recover it. Which technique fits?

    Show the answer

    Correct answerC. Tokenization with a separate token vault

    AWhy not this: Ciphertext is mathematically derived from the card number and can be reversed by anyone holding the key.

    BWhy not this: Hashing is one-way, so the refund service could never retrieve the original card number.

    CWhy this is right: A random token has no mathematical link to the card number; only the vault lookup recovers the original.

    DWhy not this: Masking destroys digits in the stored record, so the original cannot be retrieved for refunds.

    Tokenization swaps the card number for a random token with no mathematical link to it, and the original is retrievable only by lookup in a separate vault. Symmetric encryption is tempting, but its output can be reversed with a key, which the requirement rules out.

    Open this question
  9. Question 9

    Security Engineering

    A database server's storage drives could be physically removed from the datacenter. Which control best protects the stored records if a drive is stolen?

    Show the answer

    Correct answerC. Volume encryption with keys held in a separate key management system

    AWhy not this: Hashing is one-way, so the records could not be read back by the application, and it is not a storage protection.

    BWhy not this: This secures email content, a different use case that does not protect database storage.

    CWhy this is right: Encrypts stored data so a stolen drive is unreadable, and the separate key store keeps the key off the drive.

    DWhy not this: This protects data moving between servers, not data stored on a drive that has been removed.

    Encrypting the volume protects data at rest, so a stolen drive yields only ciphertext, and keeping the keys in a separate key management system means the drive does not carry its own key. An IPsec tunnel protects data in transit only and does nothing for a drive removed from the server.

    Open this question
  10. Question 10

    Security Engineering

    A company runs an unmodifiable application on a cloud VM that must process plaintext customer data. Cloud provider administrators must not be able to read the data in memory during processing. What should the company use?

    Show the answer

    Correct answerC. Hardware-based trusted execution environment

    AWhy not this: This protects data in transit and leaves memory on the VM exposed to the provider.

    BWhy not this: This protects data at rest only; the data is decrypted in memory when the application processes it.

    CWhy this is right: Hardware isolation keeps data in use protected from the hypervisor and administrators while the app processes plaintext.

    DWhy not this: Masking changes the values, so the application would not be processing the real plaintext data.

    A trusted execution environment (secure enclave) isolates memory and code in hardware so data is decrypted only inside it during processing, hidden from the hypervisor and administrators. Volume encryption protects stored data, but the data is plaintext in memory while in use.

    Open this question
  11. Question 11

    Security Engineering

    Which cryptographic technique lets a service perform calculations on data while it remains encrypted?

    Show the answer

    Correct answerD. Homomorphic encryption

    AWhy not this: It proves origin and integrity but does not allow calculation on encrypted data.

    BWhy not this: It protects data moving between endpoints and is unrelated to computing on data.

    CWhy not this: It protects stored data, and the data must be decrypted before it can be processed.

    DWhy this is right: It permits computation on ciphertext, protecting data in use without decrypting it.

    Homomorphic encryption allows computation directly on ciphertext, so results can be produced without decrypting the data, which protects it while in use. Full-disk encryption protects data at rest and requires decryption before any processing.

    Open this question
  12. Question 12

    Security Engineering

    Two sites must exchange traffic from legacy applications that lack TLS support over the internet. Payload and original internal IP headers must both be hidden, with the gateways authenticating each other. Which configuration meets this?

    Show the answer

    Correct answerA. IPsec tunnel mode with ESP between the site gateways

    AWhy this is right: Tunnel mode wraps the whole original packet and ESP encrypts it, protecting any protocol between gateways.

    BWhy not this: A TLS proxy covers only the web applications it fronts, not legacy protocols or inner IP headers.

    CWhy not this: Transport mode leaves the original IP header visible and protects host to host, not site to site.

    DWhy not this: AH provides integrity and authentication but no encryption, so payload and headers stay readable.

    Tunnel mode encapsulates the entire original packet, including its internal IP header, and ESP encrypts it, so any protocol is protected between the gateways without changing the applications. AH only authenticates and does not encrypt, so the payload would stay readable.

    Open this question
  13. Question 13

    Security Engineering

    After enabling a lattice-based key encapsulation mechanism in place of ECDHE, a team sees TLS handshakes fragmenting and failing across a low-MTU link. Which difference between post-quantum and elliptic curve key establishment BEST explains this?

    Show the answer

    Correct answerA. Public keys and ciphertexts are much larger than ECC values

    AWhy this is right: Post-quantum keys and ciphertexts are far larger than compact ECC points, which inflates handshake messages.

    BWhy not this: Session keys stay the same size (such as 256 bits); the growth is in the exchanged key material, not the derived key.

    CWhy not this: Post-quantum algorithms run in software on classical networks; QKD is a separate, hardware-based technology.

    DWhy not this: Key encapsulation creates the shared secret itself; it does not need a pre-shared symmetric key.

    Lattice-based KEMs have public keys and ciphertexts of hundreds to over a thousand bytes, against about 32-65 bytes for ECDH values, so handshake messages grow and fragment. The other options invent requirements: KEMs need no pre-shared key and no QKD hardware.

    Open this question
  14. Question 14

    Security Engineering

    A bank must protect long-lived TLS traffic against future quantum attacks but cannot yet trust new post-quantum algorithms to be free of undiscovered flaws. Which deployment approach BEST fits?

    Show the answer

    Correct answerB. Run ECDHE and a post-quantum KEM together and derive one key from both

    AWhy not this: Dropping the classical exchange leaves the new algorithm as a single point of failure if it has an undiscovered flaw.

    BWhy this is right: A hybrid exchange stays secure unless both the classical and post-quantum components are broken.

    CWhy not this: A larger curve is still broken by Shor's algorithm, so recorded exchanges remain exposed.

    DWhy not this: A longer AES key does not protect the key exchange, which is the part quantum attacks break.

    Hybrid key exchange combines a classical exchange with a post-quantum KEM, so the session key stays safe if either algorithm is broken. A post-quantum KEM alone removes the hedge against flaws in the new algorithm, and larger curves or longer AES keys do not stop Shor's algorithm against the exchange.

    Open this question
  15. Question 15

    Security Engineering

    A firm sends records that must stay confidential for 30 years over TLS 1.3 using ECDHE and AES-256-GCM, with certificates reissued every 90 days. An adversary is recording the traffic now to decrypt it with a future quantum computer. Which component should be migrated to post-quantum protection first?

    Show the answer

    Correct answerA. ECDHE key exchange

    AWhy this is right: Shor's algorithm can retroactively recover the shared secret from recorded exchanges, exposing every session key.

    BWhy not this: A signature must be forged at authentication time, and 90-day certificates leave no long window for retroactive attack.

    CWhy not this: Hash functions face only a Grover-type quadratic speedup, and 384-bit output keeps adequate security.

    DWhy not this: Grover's algorithm only halves its effective strength, so 256-bit keys remain adequate.

    A recorded ECDHE exchange can be broken later with Shor's algorithm, exposing the session keys and all the traffic. Signatures only need to resist forgery while certificates are valid, and AES-256 and SHA-384 are only weakened by Grover's algorithm, which leaves adequate margin.

    Open this question
  16. Question 16

    Security Engineering

    Which statements about resistance to quantum computing decryption attacks are accurate? (Choose four.)

    Choose 4 answers

    Show the answer

    Correct answersB. Grover's algorithm roughly halves effective symmetric key strength, so AES-256 remains adequateC. Harvest-now-decrypt-later means ciphertext captured today may be decrypted once quantum computers existD. Lattice-based schemes rely on problems with no known efficient quantum algorithmE. Shor's algorithm on a quantum computer can break RSA, DH and ECC

    AWhy not this: Shor's algorithm scales polynomially with key size, so a longer RSA modulus only delays the break slightly.

    BWhy this is right: Grover gives only a quadratic speedup, so doubling the symmetric key length (AES-256) keeps adequate margin.

    CWhy this is right: Adversaries can record encrypted traffic now and decrypt it later, so long-lived secrets are already at risk.

    DWhy this is right: Lattice problems have no known efficient quantum algorithm, which is why they underpin most of NIST's post-quantum selections.

    EWhy this is right: Shor's algorithm solves factoring and discrete logarithms in polynomial time, breaking all three.

    FWhy not this: Shor's algorithm attacks factoring and discrete logarithms; hash-based signatures rely on hash security and resist it.

    Shor's algorithm solves factoring and discrete logarithms efficiently, Grover only gives a quadratic speedup against symmetric keys, and captured traffic can be decrypted later. Lattice problems have no known efficient quantum attack. Larger RSA keys do not help because Shor's runtime stays polynomial.

    Open this question
  17. Question 17

    Security Engineering

    A team must rotate the top-level key protecting 40 million stored objects without re-encrypting any object's data. Which design allows this?

    Show the answer

    Correct answerA. Per-object data keys wrapped by a key encryption key in a KMS

    AWhy this is right: Only the small wrapped data keys need re-wrapping when the key encryption key rotates; object data stays untouched.

    BWhy not this: Key stretching slows passphrase guessing; it provides no layered key hierarchy for rotation.

    CWhy not this: Direct encryption under one key means rotating it requires re-encrypting all 40 million objects.

    DWhy not this: Key splitting divides custody of a key but the data is still encrypted under that same key, so rotation re-encrypts it.

    In envelope encryption each object is encrypted with its own data key, and a key encryption key wraps those data keys. Rotating the KEK only requires re-wrapping the small data keys. Splitting a key among custodians controls who can recover it but does not avoid re-encrypting data when it changes.

    Open this question
  18. Question 18

    Security Engineering

    A TLS gateway using AES-256-GCM saturates its CPU at peak load. Policy forbids shorter keys or weaker ciphers and requires keys to stay in tamper-resistant hardware. What should the architect do?

    Show the answer

    Correct answerD. Offload cryptographic operations to an HSM or crypto accelerator card

    AWhy not this: A shorter key trades security for speed and breaks the stated policy against shorter keys.

    BWhy not this: Longer tickets cut handshake cost but weaken forward secrecy and leave the CPU doing the crypto work and keys outside hardware.

    CWhy not this: Key stretching deliberately adds computation, so it would worsen the CPU saturation.

    DWhy this is right: Dedicated crypto hardware takes over heavy operations and protects keys, with no loss of strength.

    Dedicated cryptographic hardware performs the operations faster than general-purpose CPUs while keeping the algorithms and key sizes unchanged and the keys inside tamper-resistant hardware. Switching to AES-128 reduces load but violates the policy by weakening the cipher.

    Open this question
  19. Question 19

    Security Engineering

    An attacker recorded a year of TLS traffic and has now stolen the web server's private key. Which key-exchange design would have kept the recorded sessions unreadable?

    Show the answer

    Correct answerB. Ephemeral Diffie-Hellman key exchange for each session

    AWhy not this: Static RSA transport encrypts session keys under the long-term key, so a stolen key decrypts every recording regardless of size.

    BWhy this is right: Per-session ephemeral keys are discarded, so the long-term key cannot recover past session keys.

    CWhy not this: Mutual authentication proves identity on both sides but does not make session keys independent of the long-term key.

    DWhy not this: AEAD protects confidentiality and integrity of the data but does not change how the session key is established.

    Ephemeral Diffie-Hellman (forward secrecy) derives a fresh session key that is never protected by the server's long-term key, so stealing that key later reveals nothing about past sessions. A larger static RSA key still lets the stolen key decrypt recorded session keys.

    Open this question
  20. Question 20

    Security Engineering

    Which changes raise cryptographic strength but add processing cost or latency? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersC. Increasing the iteration count of password hashingD. Moving from a 2048-bit to a 4096-bit RSA key

    AWhy not this: A smaller key speeds processing but reduces security margin.

    BWhy not this: Hardware acceleration speeds up operations without changing strength; it is not a security increase.

    CWhy this is right: More iterations make each guess slower for attackers and for the server, trading speed for strength.

    DWhy this is right: A larger RSA key is harder to attack but makes private-key operations slower.

    EWhy not this: Longer ticket lifetimes improve speed but weaken security, which is the opposite direction.

    FWhy not this: A fast hash improves speed but makes offline guessing far easier, lowering security.

    More hash iterations and larger RSA keys both strengthen security and cost more computation, which is the performance versus security tradeoff. The other options either speed things up without adding strength or gain speed by giving up security.

    Open this question
  21. Question 21

    Security Engineering

    A health agency will publish aggregate counts from a patient dataset. It needs a mathematically provable limit on what any observer can learn about whether one individual is in the data. Which technique fits?

    Show the answer

    Correct answerC. Differential privacy

    AWhy not this: Tokens replace identifiers but leave records and counts unchanged, so they give no provable limit on what results reveal about one person.

    BWhy not this: Unsalted hashes of identifiers can be reversed by guessing, and they give no guarantee about published statistics.

    CWhy this is right: Calibrated noise gives a formal, quantifiable bound on what results reveal about any one person.

    DWhy not this: It hides individuals in groups but offers no provable bound and can fail against linkage with outside data.

    Differential privacy adds calibrated noise to query results, giving a formal bound on what is revealed about any single individual. K-anonymity has no such formal bound and can be defeated by linkage with outside data.

    Open this question
  22. Question 22

    Security Engineering

    A bank must prove to an arbitrator years later that a specific officer approved a wire transfer. It must also show that the bank itself could not have fabricated that approval. Which design meets both requirements?

    Show the answer

    Correct answerB. Digital signature from a private key held only on the officer's smartcard

    AWhy not this: Both parties hold the secret, so either could create the tag; it proves integrity but not who approved.

    BWhy this is right: Sole control of the private key means only the officer could sign, and the signature stays verifiable by a third party.

    CWhy not this: The bank holds the signing key, so it could have produced the approval, which defeats non-repudiation.

    DWhy not this: TLS authenticates the session endpoints but leaves no signed, transaction-level evidence for later proof.

    A signature from a key only the officer controls is verifiable by anyone with the public key, and the bank cannot forge it. A shared-secret HMAC fails because the bank could produce the same value, so it cannot prove the officer approved the transfer.

    Open this question
  23. Question 23

    Security Engineering

    An audit team needs a ledger in which any change to past records is detectable and no single administrator can quietly rewrite history. Which two blockchain properties provide this? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersA. Each block contains the hash of the previous blockC. Ledger copies are replicated across nodes that agree through consensus

    AWhy this is right: Chained hashes mean altering an old block invalidates all later blocks, exposing the tampering.

    BWhy not this: Encryption provides confidentiality, and the administrator holding the key keeps a single point of control.

    CWhy this is right: Many nodes hold copies and must agree, so one administrator cannot rewrite history unnoticed.

    DWhy not this: Tokenization hides sensitive values but does nothing to make past records tamper-evident.

    Hash chaining makes any alteration of an earlier block break every later hash, so tampering is detectable. Replication with consensus stops one party from rewriting the ledger alone. Encryption with an administrator-held key gives confidentiality, not immutability.

    Open this question
  24. Question 24

    Security Engineering

    An EU company stores customer records with a US-headquartered cloud provider in an EU region. Counsel warns that the provider could be compelled under the US CLOUD Act to hand over stored data. Which encryption design BEST limits what the provider could disclose?

    Show the answer

    Correct answerC. Encryption with keys held in the company's own external key manager

    AWhy not this: The provider generates and holds the keys, so it could decrypt the data if compelled; rotation does not change that.

    BWhy not this: The keys still sit in a service the provider runs, so a compelled provider could use them to decrypt.

    CWhy this is right: The provider holds only ciphertext and never the keys, so it cannot produce readable data.

    DWhy not this: TLS protects data in transit; the provider still stores and can read the data once it arrives.

    The CLOUD Act lets US authorities compel US providers to produce data they control, wherever it is stored. If the keys stay in a key manager the company runs outside the provider (hold your own key), the provider holds only ciphertext and cannot decrypt it, even when compelled. Keys in the provider's own services stay within its reach.

    Open this question
  25. Question 25

    Security Engineering

    A law firm must ensure only the intended recipient can read a message, even if the mail provider's servers are compromised. The recipient must also be able to verify who sent it. Which approach meets both needs?

    Show the answer

    Correct answerC. S/MIME with sender signing and recipient-key encryption

    AWhy not this: TLS protects each server hop only; compromised servers still hold plaintext and no sender signature is added.

    BWhy not this: The provider holds the mailbox keys, so a compromised provider can read the mail, and sender identity is not proven.

    CWhy this is right: End-to-end encryption plus a sender signature, so servers never see plaintext and the sender is verifiable.

    DWhy not this: DKIM and SPF authenticate the sending domain or server, not the individual sender, and give no confidentiality.

    S/MIME encrypts to the recipient's public key and signs with the sender's private key, so confidentiality and sender verification hold end to end, even if servers are compromised. Enforced TLS only protects each hop, and mail servers still handle plaintext.

    Open this question
  26. Question 26

    Security Engineering

    A vendor verifies firmware downloaded from third-party mirrors by comparing an MD5 digest. Researchers show that an attacker who supplies an image can produce a benign and a malicious version that share one MD5 digest. What is the best fix?

    Show the answer

    Correct answerD. Replace MD5 with SHA-256 for the digest

    AWhy not this: Encrypting the image hides its content in transit but does not make the digest check trustworthy.

    BWhy not this: A salt does not make MD5 collision resistant; the attacker builds the colliding pair on the salted input.

    CWhy not this: Hiding the digest does not help; the malicious twin matches whatever digest the benign image has.

    DWhy this is right: SHA-256 is collision resistant, so an attacker cannot practically build two images that share a digest.

    MD5 is not collision resistant, so an attacker can build two different images with the same digest and swap the malicious one in after the benign one is accepted. SHA-256 is collision resistant. Salting does not help, because the attacker simply builds the colliding pair for the salted input.

    Open this question
  27. Question 27

    Security Engineering

    A web application deserializes objects that clients send in a cookie, and a test shows an attacker can craft a payload that runs code on the server. Which three actions reduce this risk? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. Use a data-only format such as JSON with schema validationB. Verify an HMAC over the serialized data before deserializing itC. Allow only an approved list of object types to be deserialized

    AWhy this is right: A data-only format with schema validation carries no executable object behavior, so crafted payloads cannot run code.

    BWhy this is right: An HMAC lets the server reject any serialized data a client has altered or forged.

    CWhy this is right: An allowlist stops attacker-chosen classes from being instantiated during deserialization.

    DWhy not this: Base64 is a reversible encoding, not protection; an attacker can decode, craft and re-encode a payload.

    EWhy not this: These flags guard the cookie in transit and from page scripts, but the attacker edits their own cookie directly.

    Insecure deserialization is prevented by rejecting tampered data (HMAC), limiting which types can be rebuilt, and avoiding native object formats in favour of validated data-only formats. Base64 is only an encoding that anyone can reverse, and the Secure and HttpOnly flags protect the cookie in transit and from scripts, not from a client who edits it.

    Open this question
  28. Question 28

    Security Engineering

    After a breach of its user database, which stored unsalted SHA-256 password hashes, a company redesigns storage. Identical passwords must yield different stored values, offline guessing must be slow, and plaintext must not be recoverable. Which design meets all three?

    Show the answer

    Correct answerD. Per-user random salts with a tunable-cost, memory-hard hash such as Argon2

    AWhy not this: A shared salt gives identical passwords identical hashes, and one fast round is cheap to guess offline.

    BWhy not this: Unique salts separate identical passwords, but one fast SHA-3 round lets attackers guess very quickly offline.

    CWhy not this: Encryption is reversible, so anyone with key access can recover every plaintext password.

    DWhy this is right: Unique salts vary each hash, a tunable work factor slows guessing, and hashing cannot be reversed.

    Per-user salts make identical passwords hash differently, and a tunable-cost, memory-hard hash makes each offline guess expensive, while hashing is one-way. A single fast round, even with unique salts, still allows rapid guessing.

    Open this question
  29. Question 29

    Security Engineering

    A developer's mobile app must run directly on user devices with no decryption step, yet decompiling it exposes readable method names and logic. What should the developer apply to make reverse engineering harder?

    Show the answer

    Correct answerC. Code obfuscation

    AWhy not this: Signing proves who published the code and that it is unmodified; it does not hide the logic.

    BWhy not this: A hash is a one-way digest used for integrity checks; it cannot make the code harder to read.

    CWhy this is right: Obfuscation renames symbols and reshapes control flow, so the app still runs but decompiled code is hard to read.

    DWhy not this: An encrypted binary cannot run until decrypted, and the key must be on the device, so it conflicts with the stated requirement.

    Code obfuscation renames symbols and scrambles control flow so the app runs unchanged but its decompiled code is hard to follow. Encrypting the binary fails here because the device would need the key and a decryption step to run it.

    Open this question
  30. Question 30

    Security Engineering

    A records system must sign multi-gigabyte engineering archives so that any recipient can verify who released each one and that it is unaltered. Applying the RSA private-key operation to a whole archive is impractical. How do digital signature schemes handle this?

    Show the answer

    Correct answerA. Sign a hash of the archive with the signer's private key

    AWhy this is right: The digest stands for the whole archive, so any change breaks verification, and only the private key holder could sign it.

    BWhy not this: A signature over the AES key says nothing about the archive's contents, which could be altered without detection.

    CWhy not this: Every recipient holds the shared key and could produce the same HMAC, so it cannot prove who released the archive.

    DWhy not this: Blocks between the first and last are not covered, so changes to them would go undetected.

    Signature schemes hash the message and apply the private key to the fixed-size digest. The verifier recomputes the hash and checks it against the signature with the public key. Because the hash is collision resistant, any change to the archive changes the digest, so signing the digest protects the whole archive.

    Open this question
  31. Question 31

    Security Engineering

    Three competing banks want the combined total of their fraud losses. No bank may reveal its own figure to the others, and no trusted third party is allowed. Which technique fits?

    Show the answer

    Correct answerC. Secure multiparty computation

    AWhy not this: Key splitting shares one secret key among custodians; it does not compute a result from separate inputs.

    BWhy not this: Key stretching slows password guessing by making hashing costly; it is unrelated to joint computation.

    CWhy this is right: Parties jointly compute the total over their own private inputs, and none learns another's figure.

    DWhy not this: Envelope encryption protects data keys with a master key; it does not enable joint computation.

    Secure multiparty computation lets parties jointly compute a function over their private inputs while each input stays hidden from the others. Key splitting divides a secret key among custodians, but it does not compute anything over private data.

    Open this question
  32. Question 32

    Security Engineering

    A protocol sends a header (tenant ID, sequence number) that routers must read, then a payload that must stay confidential. The receiver must detect any change to either part. Which construction meets all three needs?

    Show the answer

    Correct answerB. Encrypt the payload with AEAD and pass the header as associated data

    AWhy not this: CBC provides no integrity, so header or payload tampering would go undetected.

    BWhy this is right: Associated data stays readable yet is covered by the authentication tag, along with the ciphertext.

    CWhy not this: The header would be encrypted, so routers could not read the tenant ID or sequence number.

    DWhy not this: An unkeyed hash lets an attacker alter the header and recompute the hash, so tampering is not detected.

    AEAD authenticates associated data without encrypting it, so routers can read the header while any change to it or to the ciphertext fails tag verification. Encrypting the header too would hide it from routers; an unkeyed hash can be recomputed by an attacker.

    Open this question
  33. Question 33

    Security Engineering

    Five organisations run a secure multiparty computation protocol that tolerates up to two colluding parties. An attacker fully compromises two of them. What can the attacker learn about the other three organisations' inputs?

    Show the answer

    Correct answerA. Only what the agreed final result itself reveals about those inputs

    AWhy this is right: Below the threshold, only the output, which all parties receive, leaks anything about honest inputs.

    BWhy not this: The computed result is revealed to participants, so what it implies about inputs is not hidden.

    CWhy not this: The reconstruction threshold is above two here, so two shares reveal nothing about an input.

    DWhy not this: Shares are spread so that fewer parties than the threshold cannot rebuild any input.

    The protocol's collusion threshold is two, so two compromised parties hold too few shares to reconstruct any honest input. The output is public to all participants, so what it implies is still learnable. Claiming nothing at all leaks ignores that.

    Open this question
  34. Question 34

    Security Engineering

    A service's TLS handshake validates only the server certificate, and a rogue internal device has been calling its API with a stolen API key. The team needs each side to prove its identity cryptographically at connection time. What should it configure?

    Show the answer

    Correct answerA. Client certificates validated by the server (mutual TLS)

    AWhy this is right: The server validates a client certificate in the handshake, so both parties prove who they are.

    BWhy not this: Pinning hardens the client's check of the server only; the server still cannot verify the client.

    CWhy not this: Ephemeral key exchange gives forward secrecy but does not authenticate the client.

    DWhy not this: An AEAD cipher suite protects confidentiality and integrity but does not identify the client.

    Mutual TLS has the server also request and validate a client certificate, so both sides prove identity during the handshake. Pinning only strengthens the client's check of the server and leaves the client unauthenticated at the transport layer.

    Open this question
  35. Question 35

    Security Engineering

    A company is leaving a cloud provider and must sanitize data held on block volumes, snapshots and backups that it cannot physically reach. All of it was encrypted from creation with the company's customer-managed keys. What should the team do?

    Show the answer

    Correct answerA. Schedule deletion of the customer-managed keys once the data is removed

    AWhy this is right: Destroying the keys makes every encrypted copy, including snapshots and backups, unreadable without touching the media.

    BWhy not this: Degaussing affects magnetic media only, and a tenant cannot have shared provider drives degaussed on request.

    CWhy not this: An overwrite reaches only the live volume, not provider replicas, snapshots or backups.

    DWhy not this: Providers do not shred shared multi-tenant drives on a customer's request, and the data would wait for that drive's retirement.

    Cryptographic erase sanitizes data by destroying the keys that encrypt it. Because every copy, including snapshots and backups, was encrypted under the company's keys from creation, deleting those keys leaves the remaining ciphertext unreadable. An overwrite reaches only the live volume, not replicas or backups.

    Open this question
  36. Question 36

    Security Engineering

    A SaaS vendor's federal contract requires government-approved cryptography for stored data. Its engineers use a widely reviewed open-source library that implements AES-256-GCM correctly. Which action best demonstrates compliance?

    Show the answer

    Correct answerC. Move encryption into a FIPS 140-validated cryptographic module

    AWhy not this: a penetration test finds weaknesses but does not confer FIPS 140 validation.

    BWhy not this: proprietary algorithms are not approved and are weaker than vetted standards.

    CWhy this is right: government work requires modules validated under FIPS 140, which tests the implementation itself.

    DWhy not this: public review shows quality but is not formal validation of the module.

    Federal requirements call for cryptographic modules validated under FIPS 140 through the CMVP, so the implementation must be validated, not just strong. A correct AES-256 library without validation does not meet the clause, and review results show quality, not validation status.

    Open this question
  37. Question 37

    Security Engineering

    A VPN authenticates users with client certificates stored as exportable PKCS#12 files. An attacker copied one and connected from another host before the theft was reported. Management wants to stay passwordless and prevent key duplication, not only react. Which change best meets this?

    Show the answer

    Correct answerB. Re-issue certificates with non-exportable private keys generated in each device's TPM

    AWhy not this: a static passphrase breaks the passwordless requirement and can itself be stolen.

    BWhy this is right: a hardware-bound, non-exportable key cannot be duplicated, so a copied file fails elsewhere.

    CWhy not this: faster CRLs still act only after the theft is noticed, leaving a window of use.

    DWhy not this: short lifetimes shrink the window but exportable keys can still be copied and used.

    A private key generated in and bound to the TPM cannot be copied, so a stolen file is useless on another host, and authentication stays passwordless. Faster revocation and shorter lifetimes only narrow the window, as the exportable key remains copyable and usable until then.

    Open this question
  38. Question 38

    Security Engineering

    Battery-powered field sensors have limited CPU and memory and send signed telemetry over a low-bandwidth link. Which option gives roughly 128-bit security at the lowest compute and bandwidth cost?

    Show the answer

    Correct answerD. ECDSA signatures using the P-256 curve

    AWhy not this: homomorphic encryption is very resource-heavy and does not provide signatures.

    BWhy not this: blockchain anchoring adds heavy network and processing cost and is not a signing scheme.

    CWhy not this: RSA-3072 matches the strength but needs far larger keys and signatures and more compute.

    DWhy this is right: ECC gives equal strength with small keys and signatures, saving CPU, memory and bandwidth.

    Elliptic curve cryptography reaches about 128-bit strength with 256-bit keys and much smaller signatures than RSA-3072, which suits constrained devices. RSA gives the same strength but with larger keys, signatures and computation.

    Open this question
  39. Question 39

    Security Engineering

    A research team will publicly release a patient dataset. Names are removed, but exact ZIP code, birth date and sex remain, so records could be linked to voter rolls. Which technique best reduces this re-identification risk?

    Show the answer

    Correct answerC. Generalize quasi-identifiers to meet k-anonymity

    AWhy not this: encryption hides the data from everyone, so it cannot be released for use.

    BWhy not this: names are already removed, and hashing does not alter the linkable fields.

    CWhy this is right: coarsening ZIP, birth date and sex makes each record indistinguishable from k-1 others.

    DWhy not this: tokens are reversible pseudonyms and do nothing about the linkable quasi-identifiers.

    Generalizing quasi-identifiers, such as truncating ZIP codes and using age ranges, makes each record match at least k others and defeats linkage. Reversible tokens only pseudonymize identifiers and leave the quasi-identifiers that enable linkage.

    Open this question
  40. Question 40

    Security Engineering

    Two services share a pre-provisioned 256-bit key and exchange high-volume messages. Messages must stay confidential, modified ciphertext must be detected, and AES hardware acceleration is available. Which configuration is best?

    Show the answer

    Correct answerD. AES-256-GCM with a unique nonce for every message

    AWhy not this: Nonce reuse under one key breaks GCM, leaking plaintext XOR relationships and weakening the authentication.

    BWhy not this: Asymmetric encryption is slow and size-limited for bulk traffic, and a shared symmetric key already exists.

    CWhy not this: CBC alone provides no integrity, so modified ciphertext goes undetected, and a predictable IV adds further weakness.

    DWhy this is right: Authenticated encryption with a per-message nonce gives confidentiality, tamper detection and high throughput.

    AES-GCM is authenticated encryption: it gives confidentiality and a tag that detects modification, and it is fast with AES hardware support. It stays secure only if each nonce is unique under a key. A fixed nonce reuses the keystream and exposes plaintext relationships and the authentication key.

    Open this question
  41. Question 41

    Security Engineering

    A supplier must send a confidential file to a partner with whom it has never exchanged any secret, and only the partner must be able to read it. What should the supplier use?

    Show the answer

    Correct answerB. Encrypting the content key with the partner's public key

    AWhy not this: Anyone holding the supplier's public key can decrypt this, so it gives no confidentiality.

    BWhy this is right: Only the partner's private key can unwrap the content key, so only the partner can read the file.

    CWhy not this: A digest is one-way and carries no recoverable content, so it provides neither delivery nor confidentiality.

    DWhy not this: A signature proves who sent the file and that it is unchanged, but does not hide its content.

    Encrypting with the recipient's public key means only the partner's private key can decrypt it, so no prior shared secret is needed. Signing with the supplier's private key is tempting, but it proves origin and integrity; anyone with the supplier's public key can still read the file.

    Open this question
  42. Question 42

    Security Engineering

    Battery-powered sensors with a few KB of RAM and no AES hardware must encrypt telemetry and detect tampering. Which approach fits best?

    Show the answer

    Correct answerD. An authenticated lightweight cipher such as Ascon

    AWhy not this: 3DES is slow, has small blocks, is deprecated, and CBC adds no tamper detection.

    BWhy not this: Public-key operations on every reading are too costly in CPU, power and memory for tiny sensors.

    CWhy not this: A pad needs key material as long as all future data, which is impractical to provision and renew.

    DWhy this is right: It offers authenticated encryption designed for low memory, power and compute, so it also detects tampering.

    Ascon, selected by NIST for lightweight cryptography, provides authenticated encryption with a small memory and energy footprint on constrained devices. RSA is tempting for its strength, but its large keys and heavy computation drain batteries and it lacks symmetric bulk speed.

    Open this question
  43. Question 43

    Security Engineering

    A team needs information-theoretic perfect secrecy for a 2 KB message and will use a one-time pad. Which key meets the requirement?

    Show the answer

    Correct answerB. A truly random key as long as the message, used for this message only

    AWhy not this: Reuse is fatal: XORing two ciphertexts removes the key and leaks the XOR of the two plaintexts.

    BWhy this is right: Random, message-length and single-use are the three conditions that give a one-time pad perfect secrecy.

    CWhy not this: Expanding a short key makes a stream cipher, which is computationally secure but not a one-time pad and gives no perfect secrecy.

    DWhy not this: A passphrase-derived key is low entropy and deterministic, so it is not truly random and is guessable.

    A one-time pad gives perfect secrecy only if the key is truly random, at least as long as the message, and never reused. A reused pad is tempting because it is random and long enough, but XORing two ciphertexts cancels the key and exposes the XOR of the plaintexts.

    Open this question
  44. Question 44

    Security Engineering

    What is the primary purpose of lightweight cryptography?

    Show the answer

    Correct answerB. Protecting constrained devices with low memory, power and processing cost

    AWhy not this: Security is not traded away through weak keys; the efficiency comes from algorithm design.

    BWhy this is right: Efficient algorithms for resource-limited hardware that still give adequate security are its defining goal.

    CWhy not this: Hiding code logic is obfuscation, a different technique that does not encrypt data.

    DWhy not this: Single-use pads are a separate technique and do not define lightweight algorithms or remove key management.

    Lightweight cryptography provides algorithms tuned for constrained devices such as sensors, RFID tags and embedded controllers, keeping memory, energy and compute low while preserving adequate security. It does not mean weak keys; speed comes from efficient design, not reduced strength.

    Open this question
  45. Question 45

    Security Engineering

    A holding company has subsidiaries in three countries. Local law requires each country's administrators to hold sole control of its encryption keys, and one breach must not expose the others. Headquarters wants a consistent key lifecycle standard. Which design fits?

    Show the answer

    Correct answerA. Separate per-subsidiary KMS or HSM under local control, following a common lifecycle policy

    AWhy this is right: Independent local key stores meet sole control and containment, and a common policy still gives consistent lifecycle rules.

    BWhy not this: Headquarters holding the root means local staff lack sole control, and a root compromise exposes every subsidiary.

    CWhy not this: Unmanaged user keys give no policy, rotation, recovery or audit, so the lifecycle standard cannot be met.

    DWhy not this: Central custody breaks the local sole-control requirement, and one compromise exposes all subsidiaries' keys.

    Decentralized key custody gives each subsidiary sole control and limits a breach to its own keys, while a shared lifecycle policy delivers consistency. Local instances under a headquarters root fail sole control and let one root compromise expose every subsidiary.

    Open this question
  46. Question 46

    Security Engineering

    An updater downloads a package and its SHA-256 hash from the same vendor mirror. An attacker who compromises the mirror could replace both files. What change lets the updater detect a swapped package?

    Show the answer

    Correct answerA. Verify a digital signature against the publisher's pinned public key

    AWhy this is right: The attacker cannot forge a signature without the publisher's private key, so a swapped package fails verification.

    BWhy not this: A key stored on the compromised mirror is available to the attacker, and encryption does not prove who published the package.

    CWhy not this: TLS protects the download in transit but not the files stored on a compromised mirror.

    DWhy not this: A longer hash is just as easy for an attacker with mirror access to recompute and replace.

    A signature can only be produced with the publisher's private key, which the mirror does not hold, so a replaced package fails verification against the pinned public key. A hash on the same mirror can simply be regenerated by the attacker, whatever its length.

    Open this question
  47. Question 47

    Security Engineering

    A vendor must show customers which source commit and build system produced a released binary. What should it publish alongside the release?

    Show the answer

    Correct answerA. A signed attestation of the source commit and build environment

    AWhy this is right: A signed attestation ties the artifact to its source commit and build environment, giving verifiable origin.

    BWhy not this: An SBOM inventories components for vulnerability tracking but says nothing about who built the binary or from what source.

    CWhy not this: Obfuscation hinders reverse engineering and gives no evidence of origin.

    DWhy not this: A digest shows the file is unchanged since publication, but not which source or builder produced it.

    Provenance is verifiable evidence of where software came from and how it was built; a signed build attestation records the source revision and builder. An SBOM lists components, not origin, so it cannot show which commit or build system produced the binary.

    Open this question
  48. Question 48

    Security Engineering

    Users type credentials into a phishing site that relays them to the real service in real time. The company wants a passwordless method this relay cannot replay. Which should it deploy?

    Show the answer

    Correct answerC. FIDO2/WebAuthn credentials bound to the site's origin

    AWhy not this: The code is a shared secret sent over the phone network and can be typed into the phishing page and relayed.

    BWhy not this: A proxy can capture the six-digit code and submit it to the real service within its validity window.

    CWhy this is right: The credential is scoped to the registered origin, so a look-alike or relay site cannot obtain a usable signature.

    DWhy not this: The user still approves a login that the proxy initiates, so the relay succeeds.

    FIDO2/WebAuthn uses a per-site key pair, and the authenticator signs a challenge only for the origin that registered it. A relay site has a different origin, so the assertion is useless. One-time codes and push approvals are values a user can be tricked into handing over or approving through a proxy.

    Open this question
  49. Question 49

    Security Engineering

    Which three methods let users sign in without entering a password? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. Hardware security key using FIDO2D. Biometric unlock of a device-bound private keyE. Passkey stored on the user's device

    Passwordless methods prove possession of a private key held on a device or token, unlocked by a PIN or biometric. A password with an extra factor is still password-based, because the password is still used and verified.

    Open this question
  50. Question 50

    Security Engineering

    What does the performance versus security tradeoff mean when choosing cryptographic algorithms and settings?

    Show the answer

    Correct answerA. Stronger settings usually cost more CPU time, latency or power, so designers balance protection against speed.

    AWhy this is right: Stronger protection generally consumes more processing, time or power, so the design must balance the two.

    BWhy not this: Optimised implementations can be fast and still secure; speed does not automatically weaken a cipher.

    CWhy not this: Hardware acceleration lowers the cost but does not remove it, and limits on cost and capacity remain.

    DWhy not this: Mode, rounds, iteration count and algorithm choice also affect security, and all of them affect processing cost.

    Stronger algorithms, longer keys and more iterations consume more computing resources, so designers must balance protection against speed and resource limits. Hardware acceleration can reduce the cost but does not remove the need to weigh it.

    Open this question