Explain the difference between hashing, encryption and encoding.
What the interviewer wants to hear
- Encoding changes format for compatibility and is not security
- Encryption protects confidentiality and is reversible with a key
- Hashing is one-way and used for integrity and password storage
- Gives examples such as Base64, AES and SHA-256
Model answer
Encoding changes data into another format so systems can handle it, like Base64 or URL encoding. Anyone can decode it, so it gives no security, although attackers often use it to hide commands, such as encoded PowerShell. Encryption protects confidentiality. It is reversible, but only with the right key. Symmetric algorithms like AES use one shared key, while asymmetric ones like RSA use a public and private key pair. Hashing is a one-way function that produces a fixed-length digest, such as SHA-256. You cannot get the original data back, so it is used to check integrity and identify files, for example matching a malware hash. For passwords we use slow, salted hashing algorithms such as Argon2 or bcrypt rather than plain SHA-256.
Can you answer it under time pressure?
Take a timed easy round and get scored on every answer.
More easy Cybersecurity Analyst questions
- Explain the CIA triad and give a real example of an attack on each part.
- A user reports a suspicious email. How would you analyse it?
- What is the difference between a firewall, an IDS and an IPS?
- What is a SIEM and how does a SOC analyst use it?
- What is defence in depth, and how would you explain it with a real example?
- What is MFA, and why are some MFA methods stronger than others?
- Explain false positives and false negatives in a SOC. Which is worse, and how do you balance them?
- What is the difference between a vulnerability scan and a penetration test?
- What is the principle of least privilege, and how would you apply it in an organisation?