Free Hashing, Salting, and Digital Signatures practice questions
10 free SY0-801 questions on Hashing, Salting, and Digital Signatures, each with a full explanation — no account needed. This section sits in the Cryptography and PKI part of the exam. Answer every question to see your score, then read the lessons below for anything you missed.
A ticket says a technician will decrypt a stored SHA-256 hash to recover the original configuration value. Why won't this work?
Hashing is not encryption: a hash function has no key and no decrypt operation, and preimage resistance means there is no practical way to work back from a digest to its input. Answers that decrypt a hash with a private key, after salting, or with a newer algorithm such as SHA-3 all treat hashing as reversible encryption, which it never is.
An attacker takes over a download mirror and replaces both an installer and its SHA256SUMS file. A technician runs sha256sum -c against the new files, and the result is OK. What does this result prove?
A matching hash proves sameness, not authorship: an attacker who controls the server can replace the file and the checksum list together, and they will match perfectly. Proving the installer came from the vendor needs a digital signature checked with the vendor's public key. A plain checksum check involves no private key and no HMAC key.
An investigator images a suspect's drive through a write blocker. Before the case goes to court months later, how can she BEST show the image hasn't changed since collection?
Forensic images are hashed at acquisition and the values go into the chain-of-custody record, so rehashing later and getting the same value shows the image hasn't changed. File sizes and timestamps can stay the same even when content changes, and encryption, whether of the file or the server's disk, protects confidentiality without proving the content is unchanged.
An EDR search for the SHA-256 value of a malware sample from a threat report finds no matches anywhere in the fleet. What does this result show?
A hash indicator matches only exact copies, and changing a single byte gives a variant a completely new hash, so a miss proves only that this exact file isn't present. Claiming the fleet is free of the whole family overstates the result, and a missing match says nothing about encryption or hash collisions.
A document system fingerprints contracts with a 128-bit hash before they are signed. A consultant warns that, even with no design flaws, an attacker could find two contracts with the same digest in about 2^64 attempts. Which attack is this, and what is the fix?
Because of the birthday problem, finding a collision takes roughly 2^(n/2) attempts, so a 128-bit digest offers only about 2^64, and the fix is a stronger algorithm with a longer digest such as SHA-256. A preimage attack works back from one given digest rather than finding any matching pair, HMAC stops outsiders forging a keyed value but doesn't lengthen the digest, and work factors are a password hashing setting.
A website's forgot-password feature emails users their current password in plain text. What does this reveal about how the site stores passwords?
A site can email your existing password only if it stores it in plaintext or with reversible encryption, both of which expose every password once the database or key is stolen. Salted, slow hashes such as Argon2id or bcrypt are one-way, so a properly built site resets a forgotten password instead of reminding you of it.
Attackers obtain a leaked copy of a user database backup but never reach the application servers. Which additional control, if it had been in place, would stop them from testing any password guesses against the stolen hashes?
A pepper is a secret applied to every password and stored outside the database, so attackers holding only the database can't compute a single valid guess. Salts aren't secret and sit next to the hash, so longer salts don't block guessing, and lockout and TLS protect the live login page, which offline guessing against a stolen copy never touches.
A team raises its bcrypt cost factor from 10 to 12. How does this change the time needed to compute each password hash?
The bcrypt cost factor is an exponent: cost 12 means 2^12 rounds, and each step up doubles the time, so two steps make each hash about four times slower for the server and for an attacker. A single step would only double it, and the cost setting controls work, not salt length.
A developer uses each account's username as its password salt. Why is this a weak choice?
Names like admin and jsmith appear on thousands of systems, so attackers can precompute tables for them, which is exactly the shortcut a salt is supposed to remove. A salt doesn't need to be secret at all; it is stored next to the hash. A good salt is random, comes from a cryptographically secure generator, and is long enough that no two accounts share one.
A federal contractor must store passwords using an algorithm available in its FIPS-validated cryptographic module. Which choice BEST meets the requirement?
PBKDF2 is NIST-approved and available in FIPS-validated modules, which makes it the usual choice where FIPS compliance is required, and a high iteration count makes each guess slow. Argon2id is OWASP's first choice in general and is the tempting answer, but the deciding requirement here is FIPS validation: neither Argon2id nor bcrypt is a NIST-approved algorithm. Salted SHA-512 is a fast hash, so it fails as password storage regardless.
Study this section
Every lesson that covers Hashing, Salting, and Digital Signatures on the SY0-801 exam.