← Microsoft Interview Insights

Microsoft·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Interviewed for a security analyst role at Microsoft, got a pretty foundational crypto question that I thought I'd nailed but second-guessed myself halfway through.

Questions Asked (1)

Q1

What is the difference between encryption and hashing?

Technical Trade-offsSystem Design
Author's notes

I knew this one cold but somehow started rambling about SHA-256 before actually defining either term.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining encryption and hashing clearly, emphasizing their core purposes: encryption is for confidentiality (reversible with a key), while hashing is for integrity (one-way). Then contrast them across dimensions like reversibility, use cases, and security properties, and tie it back to practical scenarios in system design.

Pro tip: Mention that encryption alone doesn't guarantee integrity—you often need a MAC or digital signature—and that hashing with salt is crucial for password storage to prevent rainbow table attacks. This shows depth beyond textbook definitions.

1. Define encryption

Explain that encryption transforms plaintext into ciphertext using an algorithm and a key, and it is reversible (decryption) to recover the original data. Its primary goal is confidentiality.

2. Define hashing

Explain that hashing converts input data into a fixed-size digest using a one-way function, and it is not reversible. Its primary goals are integrity verification and fast lookup.

3. Contrast key differences

Highlight reversibility (encryption is reversible, hashing is not), key usage (encryption uses keys, hashing typically doesn't), output size (encryption output size varies, hashing output is fixed), and purpose (confidentiality vs. integrity).

4. Discuss use cases

Give examples: encryption for secure communication (HTTPS, VPNs), hashing for password storage (with salt), data integrity checks, and digital signatures.

5. Address common misconceptions

Clarify that encryption does not provide integrity by itself, and that hashing is not encryption. Mention that hashing can be used with encryption (e.g., HMAC) for authenticated encryption.

Key Points to Mention

  • Reversibility: encryption is reversible with a key; hashing is one-way.
  • Key usage: encryption requires a key; hashing does not (though HMAC uses a key).
  • Output: encryption output size depends on input; hashing output is fixed-length.
  • Purpose: encryption ensures confidentiality; hashing ensures integrity.
  • Use cases: encryption for data at rest/in transit; hashing for password storage, checksums, digital signatures.
  • Security properties: encryption can be broken if key is compromised; hashing is vulnerable to collision attacks if algorithm is weak.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.