Module 3 · Cryptography and PKI · Lesson 22 of 42

Symmetric and asymmetric encryption

Shared keys vs key pairs, key exchange, and which algorithm fits which job.

In this lesson · about 20 minutes

  • Explain how symmetric and asymmetric encryption differ
  • Know which key encrypts and which decrypts in each case
  • Recognize common algorithms and their purpose
  • Describe where data is encrypted: at rest, in transit and by level

Encryption turns readable plaintext into unreadable ciphertext using an algorithm (the method) and a key (the secret). The algorithm can be public; the security lives in the key. Longer keys are harder to brute-force.

Symmetric: one shared key

The same key encrypts and decrypts. It is fast and good for bulk data, but both sides need the key, and sharing it safely is the hard part (the key distribution problem). Main algorithm: AES (128, 192 or 256-bit keys). Older ones you should know are weak or retired: DES, 3DES, RC4.

Asymmetric: a key pair

Each party has a public key (shared with anyone) and a private key (never shared). What one key encrypts, only the other can decrypt. It is slower, so it is used for small jobs: exchanging keys and making signatures. Algorithms: RSA, ECC (elliptic curve; same strength with shorter keys, good for phones and IoT).

GoalKey used
Send a secret message to BobEncrypt with Bob's public key; only Bob's private key decrypts
Prove a message came from AliceAlice signs with Alice's private key; anyone verifies with her public key

Key exchange: best of both

Real protocols such as TLS use asymmetric crypto to agree on a session key, then switch to fast symmetric encryption. Diffie-Hellman (and its elliptic-curve version ECDHE) lets two parties create a shared secret over an open network. The "E" for ephemeral means a fresh key each session, which gives perfect forward secrecy: stealing the server's long-term key later doesn't unlock old sessions.

Where encryption is applied

  • Data at rest: full-disk (BitLocker, FileVault), partition, volume, file, database, and record (a single row or field).
  • Data in transit: TLS for web and email, IPsec and other VPNs, SSH.
  • Data in use: protected in memory, for example by secure enclaves.

Sorting drill

Symmetric, asymmetric or key exchange?

Sort each algorithm or use.

  • AES-256
  • RSA
  • ECDHE
  • ECC on a smartphone
  • 3DES (legacy)
  • Diffie-Hellman

0 of 6 sorted

Check your understanding0 of 4 correct

Question 1

1.Alice wants to send Bob a file only Bob can read. Which key should she encrypt it with?

Question 2

2.Why does TLS use symmetric encryption for the bulk of a session?

Question 3

3.Which property ensures a stolen server private key can't decrypt previously recorded sessions?

Question 4

4.A stolen laptop's data stays protected because the whole drive is encrypted. Which is this?

Quiz score: 0 of 4

Tip: answer every quiz question correctly first.

Noviq Academy is free and for learning. This course is independent and is not affiliated with or endorsed by CompTIA. CompTIA and Security+ are trademarks of CompTIA, Inc. Exam details such as price and policies change; confirm them on CompTIA's website before you book.