Skip to main content
← Blog

Compared · Security+ · CISSP

Symmetric vs asymmetric encryption, with hashing

Count the keys. One shared secret key is symmetric, a public/private pair is asymmetric, and no key at all is a hash, which isn't encryption.

Published

The short answer: symmetric algorithms (AES, for example) use the same secret key to encrypt and decrypt. They are fast, so they protect bulk data, but every pair of parties needs a shared key that has to reach both sides secretly. Asymmetric (public-key) algorithms use a key pair: what one key does, only the other can undo or verify. They are much slower, so they are used for digital signatures and to establish symmetric keys, not for large amounts of data. A hash function uses no key: it turns any input into a fixed-length value that can't practically be reversed. It detects changes; it doesn't keep anything secret. Real protocols such as TLS combine all three.

The three side by side

Symmetric encryptionAsymmetric (public-key)Hashing
KeysOne secret key, sharedA key pair: public and privateNone (HMAC adds a secret key)
Reversible?Yes, with the same keyYes, with the other key of the pairNo: one-way by design
OutputCiphertextCiphertext or a signatureA fixed-length hash value (message digest)
SpeedFastMuch slowerFast (password hashing is slowed on purpose)
Main usesBulk encryption, MACs, key wrappingDigital signatures, key agreement and key transportIntegrity checks, signatures, HMAC, password storage
ProvidesConfidentiality (and integrity via a MAC)Source authentication, integrity, non-repudiation; key exchangeIntegrity, only when the hash itself is protected
Hard partDistributing and storing the keysTrusting that a public key belongs to its ownerChoosing a hash that stays collision resistant
NIST examplesAES (FIPS 197)RSA, Diffie-Hellman, ECDSASHA-2 (FIPS 180), SHA-3 (FIPS 202)

Uses, speed and the services each provides follow NIST's SP 800-175B Rev. 1, sections 3 and 4.

Symmetric: one key, fast, hard to distribute

NIST's glossary defines a symmetric-key algorithm as one that uses the same secret key for an operation and its complement, such as encryption and decryption; it is also called a secret-key algorithm. AES, the approved block cipher, works on 128-bit blocks with 128-, 192- or 256-bit keys. The catch is the number of keys: SP 800-175B's example is that 1,000 parties who each talk privately to each other have 499,500 pairs, so at least that many keys, each of which both sides must keep secret. Because both holders have the same key, either could have produced a given ciphertext, so symmetric encryption alone can't prove who sent a message.

Asymmetric: a key pair, slow, solves distribution

An asymmetric-key algorithm uses two mathematically related keys, and NIST's definition adds that the private key can't feasibly be derived from the public one. The public key can be published; the private key must stay secret. Which key does what depends on the job:

  • Encryption: encrypt with the recipient's public key; only their private key decrypts.
  • Digital signature: sign with your own private key; anyone verifies with your public key. NIST lists the services as data integrity, identity and source authentication, and support for non-repudiation.

SP 800-175B says these algorithms "tend to be much slower than symmetric-key algorithms so are not used to process large amounts of data". Their job is signatures and key establishment.

Hybrid: why TLS uses both

Combining the two gets the best of each. Public-key operations (key agreement or key transport) set up a fresh symmetric session key between the two sides, with certificates and signatures proving who is on the other end. The fast symmetric cipher then encrypts the actual traffic. NIST describes this combination as more efficient than using only asymmetric algorithms, while needing far fewer keys than using only symmetric ones.

Hashing: no key, one way

A hash function maps input of any length to a fixed-length output. NIST's glossary lists the two properties that matter: one-way (it is computationally infeasible to find an input that maps to a given output) and collision resistant (it is infeasible to find two different inputs with the same output). Hashing isn't encryption: there is no key and nothing to decrypt.

On its own, a hash only shows that data changed by accident. SP 800-175B warns that if a hash is used without a secret key, an attacker can alter the data and simply compute a new hash. Adding a key (an HMAC) or signing the hash with a private key (a digital signature) is what protects against deliberate tampering. A signature is, in practice, a hash of the message processed with the signer's private key: it gives integrity, origin authentication and non-repudiation, but no confidentiality, because the message itself isn't encrypted.

Passwords are the classic case for hashing rather than encryption: the server never needs the password back, only to check a guess. NIST SP 800-63B requires verifiers to store passwords salted and hashed with a suitable password hashing scheme, a salt of at least 32 bits, and a cost factor as high as practical, raised over time, so that offline guessing is slow.

Exam traps

  • Which key encrypts? To keep a message secret, use the recipient's public key. To sign, use your own private key. Encrypting with your own private key gives authenticity, not secrecy.
  • Symmetric can't give non-repudiation. Both sides hold the same key. Non-repudiation needs a private key only one party has, which means a digital signature.
  • Hashing is not encryption. "Decrypt the hash" and "the salt is the key" are wrong. A salt is a random value stored next to the hash; it makes identical passwords hash differently.
  • A plain hash doesn't stop an attacker. Anyone who can change the file can recompute its hash. For tamper protection the answer is HMAC or a digital signature.
  • "Large file" or "bulk data" points to symmetric encryption. Asymmetric encryption of bulk traffic is wrong even if it sounds more secure.
  • Key counts. n parties need n(n-1)/2 symmetric keys for private pairwise links, but only n key pairs with public-key cryptography.

Practice questions from our bank

One Security+ SY0-701 question, one SY0-801 question and one CISSP question. Try each before opening the answer.

  1. Question 1 · SY0-701 · General Security Concepts

    A security engineer is explaining how a TLS session protects a large file download. Which statement correctly compares symmetric and asymmetric cryptography in this context?

    • ASymmetric suits the bulk data; asymmetric helps securely establish the session key
    • BAsymmetric suits the bulk data; symmetric helps securely establish the key pair
    • CSymmetric gives non-repudiation because both parties hold the same secret key
    • DAsymmetric uses one shared secret key; symmetric uses a linked public/private pair
    Show answer and explanation

    Answer: A) Symmetric suits the bulk data; asymmetric helps securely establish the session key

    Symmetric encryption uses one shared key and is fast enough for bulk data. Asymmetric encryption uses a key pair, is much slower, and is used for key exchange and digital signatures, so TLS combines the two.

    • ACorrect. Symmetric algorithms are much faster and handle large streams of data well. Asymmetric algorithms are slow and only encrypt small amounts, so they are used to get the symmetric session key to both sides securely, and for signatures.
    • BIncorrect. This reverses the roles. Asymmetric algorithms are much slower and are not designed to encrypt large amounts of data.
    • CIncorrect. Because both parties share the key, either one could have produced the ciphertext. Symmetric encryption therefore cannot prove which party sent a message.
    • DIncorrect. This swaps the definitions. Symmetric encryption uses a single shared secret key, and asymmetric encryption uses a mathematically linked public/private key pair.
  2. Question 2 · SY0-801 · General Security Concepts

    Why do security teams store user passwords as salted hashes instead of encrypting them with a key?

    • AHashing is one-way, so there is no key to steal and reverse, and unique salts defeat precomputed tables
    • BHashing is faster than encryption, so sign-ins complete sooner, and salts shorten each comparison
    • CSalted hashes can be reversed by the server holding the salt, so administrators can recover passwords
    • DThe salt acts as each user's encryption key, so a stolen database can't be decrypted without it
    Show answer and explanation

    Answer: A) Hashing is one-way, so there is no key to steal and reverse, and unique salts defeat precomputed tables

    Passwords are hashed because a one-way function leaves no key to steal and no way to reverse the stored values. Per-user salts make identical passwords produce different hashes, which defeats precomputed rainbow-table attacks.

    • ACorrect. A password hash comes from a one-way function and can't be reverted to plaintext, so there is no decryption key for an attacker to steal. A random per-user salt makes identical passwords hash differently, which defeats precomputed (rainbow-table) attacks.
    • BIncorrect. Password hashing is deliberately slowed with key stretching (for example, many PBKDF2 iterations) to make brute-force attacks harder. Salts add data. They don't speed up comparisons.
    • CIncorrect. Salts are not secret keys and don't make a hash reversible. Forgotten passwords are reset, not recovered.
    • DIncorrect. A salt is a random value mixed into the input before hashing and is usually stored next to the hash. It isn't an encryption key, and hashes aren't decrypted.
  3. Question 3 · CISSP · Security Architecture and Engineering

    A sender hashes a message, encrypts the hash with the sender's own private key, attaches the result, and sends the message without encrypting it. Which statement correctly describes the security services this provides?

    • AIntegrity, origin authentication, and non-repudiation, but not confidentiality
    • BConfidentiality, integrity, and origin authentication, but not non-repudiation
    • CIntegrity and confidentiality, but not origin authentication or non-repudiation
    • DOrigin authentication and confidentiality, but not integrity or non-repudiation
    Show answer and explanation

    Answer: A) Integrity, origin authentication, and non-repudiation, but not confidentiality

    A digital signature (a hash encrypted with the sender's private key) provides integrity, origin authentication, and non-repudiation. It does not provide confidentiality unless the message is also encrypted.

    • ACorrect. The recipient verifies the signature with the sender's public key. A match shows the message was not changed and that the holder of the private key signed it, which provides authentication and non-repudiation. The message itself is still plaintext, so it has no confidentiality.
    • BIncorrect. Only the hash is encrypted, and anyone with the public key can decrypt it, so the message is not kept confidential. A private-key signature also does provide non-repudiation, because only the key holder could have created it.
    • CIncorrect. A signature does not provide confidentiality. Because it is made with the sender's private key, it does tie the message to its origin and supports non-repudiation.
    • DIncorrect. Integrity is one of the main things a signature provides: any change to the message produces a different hash. A signature does not make the message confidential.

Where this comes up on the exams

Security+ (SY0-701 and SY0-801) covers cryptographic solutions in General Security Concepts: choosing between symmetric, asymmetric and hashing for a scenario, salting, signatures and key exchange. CISSP covers the same ideas in more depth in Security Architecture and Engineering, including which security services each mechanism provides.

Related: the security models in Bell-LaPadula vs Biba are about confidentiality versus integrity too, at the policy level rather than the algorithm level.

Sources

Facts checked against NIST on November 14, 2026.

Frequently asked questions

What is the difference between symmetric and asymmetric encryption?

Symmetric encryption uses one secret key shared by both sides to encrypt and decrypt, and is fast enough for bulk data. Asymmetric encryption uses a public/private key pair, where the private key can't feasibly be derived from the public one; it is much slower and is used for digital signatures and key establishment.

Is hashing the same as encryption?

No. Encryption is reversible with a key. A hash function uses no key and is one-way: it maps any input to a fixed-length value, and finding an input for a given hash is computationally infeasible. Hashes detect changes; they don't keep data secret.

Why does TLS use both symmetric and asymmetric cryptography?

Public-key operations establish a fresh symmetric session key and authenticate the server, and the much faster symmetric cipher then encrypts the session traffic. NIST describes this as more efficient than asymmetric alone while needing fewer keys than symmetric alone.

Which key do you use to encrypt with asymmetric cryptography?

To keep a message confidential, encrypt with the recipient's public key so only their private key can decrypt it. To sign, use your own private key; anyone can verify the signature with your public key.

Why are passwords hashed instead of encrypted?

The server only needs to check a guess, never to recover the password, so a one-way function leaves no decryption key to steal. NIST SP 800-63B requires passwords to be salted (at least 32 bits) and hashed with a password hashing scheme whose cost factor is as high as practical.