Cryptography Concepts, Hashing, Salting, Symmetric, Asymmetric, HMAC
SSCP · Lesson 11 of 19 · 1:31:22
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the ISC2 SSCP exam, on the current exam outline. In this lesson: why we use cryptography, data sensitivity and regulations, entropy and quantum cryptography, hashing and salting, symmetric and asymmetric encryption, digital signatures, certificates, and HMAC, key strength, and cryptographic attacks. Includes three original practice questions, with Brindlewood Hardware, a fictional regional chain of hardware stores, as the example.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Data worth stealing
Brindlewood keeps card details for refunds, customer addresses for deliveries, and staff health records for insurance. A stolen laptop or an intercepted connection should reveal nothing useful. Cryptography is how you make sure of that, and how you prove that data was not changed.
Reasons and requirements
Cryptography serves several goals. Encryption protects confidentiality: without the key, the data is unreadable. Hashes and signatures protect integrity and authenticity: they show whether data changed, and who it came from. Which data to protect depends on its sensitivity: personally identifiable information, or PII, intellectual property, such as supplier price lists, and protected health information, or PHI. Regulations and industry standards often require it, such as PCI DSS for card numbers, and the ISO 27001 controls on cryptography.
Entropy and quantum
Strong cryptography needs entropy: keys and random numbers must be truly unpredictable, from a good random source. Quantum computing threatens today's public key algorithms, so NIST published post-quantum algorithms in twenty twenty four, and organizations are planning their migration. Quantum key distribution is different: it uses the physics of light to exchange keys so that eavesdropping can be detected, but it needs special hardware and links. AI raises the stakes too: training data and model secrets need encryption at rest and in transit, and newer techniques protect data even while it is in use.
Hashing and salting
A hash function turns any input into a fixed-length hash value, and the smallest change in the input changes the whole value. It is one-way: you cannot get the input back from the hash value. SHA-256 and the rest of the SHA-2 and SHA-3 families are current, while MD5 and SHA-1 are broken, and should not be used for security. Passwords are stored as salted hashes: a random salt, unique to each password, is added before hashing, so identical passwords give different hashes, and precomputed rainbow tables become useless.
Symmetric and asymmetric
Symmetric encryption uses one shared secret key to encrypt and decrypt, and it is fast, so it protects bulk data. The Advanced Encryption Standard, or AES, is the common choice, with keys of one hundred twenty eight, one hundred ninety two, or two hundred fifty six bits. Its weakness is key distribution: every pair of parties needs a shared key, delivered safely. Asymmetric encryption uses a key pair: a public key that anyone can have, and a private key that only its owner keeps. RSA needs long keys, two thousand forty eight bits or more today, while elliptic curve cryptography, or ECC, gives the same strength with much shorter keys, which suits phones and smart cards.
Signatures, certificates, HMAC
In practice, the two are combined: asymmetric cryptography exchanges a symmetric session key, which then encrypts the data. A digital signature is a hash of the message, signed with the sender's private key: anyone with the public key can check it, but only the owner of the private key could have made it. That gives integrity, authenticity, and non-repudiation, and a digital certificate binds the public key to its owner. A hash-based message authentication code, or HMAC, uses a shared secret key: it proves integrity and authenticity between two parties, but not non-repudiation, since both of them hold the key. Audit trails add non-repudiation for actions, as long as they are protected from tampering.
Key strength and attacks
Strength depends on the algorithm and on the key length: a longer key means more possible keys to try. Brute force tries every key, which is hopeless against AES with a long key, but works against short keys or weak passwords. Dictionary attacks try likely passwords, birthday attacks look for two inputs with the same hash, and replay attacks resend a captured message. Side-channel attacks read timing, power use, or radiation, instead of breaking the math. Cryptanalysis studies all these weaknesses, which is why algorithms are retired over time, like DES and SHA-1.
Recap
Let's recap. Cryptography protects confidentiality, integrity, and authenticity, for PII, PHI, and intellectual property, often because PCI DSS or ISO requires it. Good keys need entropy, and post-quantum algorithms and quantum key distribution prepare for quantum computing. Hashes are one-way, MD5 and SHA-1 are broken, and passwords are stored with a unique salt. AES is symmetric and fast, RSA and ECC are asymmetric, and an HMAC checks integrity, but only a digital signature gives non-repudiation. And brute force, dictionary, birthday, replay, and side-channel attacks explain why key length and algorithm choice matter.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
An attacker steals the password database, and notices that two staff accounts have exactly the same hash. What was missing?
- Encryption of the database in transit
- A longer hash digest
- A unique salt for each password
- A digital signature on each hash
Show the answer
A unique salt for each password
With a unique salt for each password, two identical passwords would give two different hashes. “Encryption of the database in transit” is wrong, because encryption in transit protects the database while it moves, not the stored hashes. “A longer hash digest” is wrong, since a longer hash value still gives identical hashes for identical passwords. And “A digital signature on each hash” is wrong, because a digital signature proves origin, and does not hide matching passwords.
A supplier sends Brindlewood a digitally signed price list. Which key does Brindlewood use to check the signature?
- Brindlewood’s own private key
- The supplier’s public key
- The supplier’s private key
- A shared session key
Show the answer
The supplier’s public key
A signature made with the supplier's private key is checked with the supplier's public key. “Brindlewood’s own private key” is wrong, because Brindlewood's own private key has nothing to do with the supplier's signature. “The supplier’s private key” is wrong, since only the supplier holds its private key, and must never share it. And “A shared session key” is wrong, because a shared session key encrypts data, and cannot prove who signed.
An attacker captures a valid payment authorization message, and sends it again later to repeat the payment. Which attack is this?
- Brute force
- Birthday attack
- Side-channel attack
- Replay attack
Show the answer
Replay attack
Resending a captured, valid message is a replay attack, stopped by time stamps, nonces, or one-time tokens. “Brute force” is wrong, because brute force tries every possible key. “Birthday attack” is wrong, since a birthday attack looks for two inputs with the same hash. And “Side-channel attack” is wrong, because a side-channel attack reads timing or power use.