Cryptography for Ethical Hacking: Concepts, Tools, Interview Questions
Ethical hackers need cryptography to recognise when data protection is weak and to explain fixes. The core concepts are symmetric encryption such as AES, asymmetric encryption such as RSA and elliptic curve cryptography, hashing such as SHA-256, digital signatures, public key infrastructure and TLS.
Topic: Ethical Hacking in Cybersecurity & Ethical Hacking · Interview preparation
Also covers: Cybersecurity Foundations
Quick answer: Ethical hackers need cryptography to recognise when data protection is weak and to explain fixes. The core concepts are symmetric encryption such as AES, asymmetric encryption such as RSA and elliptic curve cryptography, hashing such as SHA-256, digital signatures, public key infrastructure and TLS. In authorised assessments, testers most often report cryptographic failures: outdated TLS versions, weak ciphers, expired or self-signed certificates, hard-coded keys, and passwords stored with fast hashes instead of Argon2 or bcrypt. Defensive tools such as testssl.sh, OpenSSL and Nmap's TLS scripts help check configurations. Interviews usually test these basics plus newer topics such as post-quantum cryptography.
Key takeaways
- Know the difference between encryption, hashing and encoding.
- Most real-world issues are misconfiguration, not broken maths.
- Passwords need slow, salted hashing such as Argon2id or bcrypt.
- TLS 1.2 or 1.3 with strong ciphers is the current baseline.
- NIST published its first post-quantum standards in August 2024.
Table of Contents
- Which Cryptography Concepts Must Ethical Hackers Know?
- What Cryptographic Failures Do Security Testers Find?
- Which Tools Help Check Cryptography Defensively?
- Why Does Post-Quantum Cryptography Matter?
- What Cryptography Interview Questions Are Common?
- References
Which Cryptography Concepts Must Ethical Hackers Know?
| Concept | Examples | Provides |
|---|---|---|
| Symmetric encryption | AES-GCM, ChaCha20-Poly1305 | Confidentiality with one shared key |
| Asymmetric encryption | RSA, ECC | Key exchange and encryption with key pairs |
| Hashing | SHA-256, SHA-3 | Integrity; one-way fingerprint |
| Password hashing | Argon2id, bcrypt, scrypt | Slow, salted storage of passwords |
| Digital signatures | RSA-PSS, ECDSA, Ed25519 | Authenticity and non-repudiation |
| PKI and certificates | X.509, certificate authorities | Trust in public keys |
| TLS | TLS 1.3 (RFC 8446) | Secure channels for web traffic |
AES is defined in FIPS 197 and TLS 1.3 in RFC 8446. Key handling guidance is in NIST SP 800-57. For broader background, see our guide to cryptography algorithms, types and tools.
What Cryptographic Failures Do Security Testers Find?
OWASP Top 10 A02 covers this category. Common findings include:
- SSL 3.0, TLS 1.0 or TLS 1.1 still enabled.
- Weak algorithms such as MD5, SHA-1, DES or RC4, described in CWE-327.
- Passwords stored in plain text or with unsalted fast hashes.
- Hard-coded keys or secrets in source code and mobile apps.
- Expired, mismatched or self-signed certificates on public services.
- Sensitive data sent over HTTP instead of HTTPS.
Fixes come from the OWASP Cryptographic Storage and Password Storage cheat sheets.
Which Tools Help Check Cryptography Defensively?
These commands check your own or authorised servers' TLS configuration and do not attack anything:
openssl s_client -connect example.com:443 -tls1_3
testssl.sh https://example.com
nmap --script ssl-enum-ciphers -p 443 example.com
sha256sum downloaded-file.iso
The last command verifies a file download against the publisher's checksum. Run scans only with permission; unauthorised testing can breach Sections 43 and 66 of India's IT Act 2000.
Why Does Post-Quantum Cryptography Matter?
Large quantum computers could break RSA and ECC. In August 2024 NIST published FIPS 203, 204 and 205 (ML-KEM, ML-DSA and SLH-DSA). Organisations are starting to inventory their cryptography and plan migration. Read more in our post on post-quantum cryptography.
What Cryptography Interview Questions Are Common?
| Question | Short answer |
|---|---|
| Encryption vs hashing vs encoding? | Reversible with a key; one-way; reversible with no key |
| Why salt a password hash? | Makes identical passwords hash differently and defeats precomputed tables |
| What happens in a TLS handshake? | Agree versions and ciphers, verify the certificate, derive session keys |
| Symmetric vs asymmetric? | One shared key and fast; key pair and slower, used for key exchange |
| What is perfect forward secrecy? | Ephemeral keys so a stolen server key cannot decrypt past sessions |
| Why is ECB mode weak? | Identical plaintext blocks produce identical ciphertext blocks |
Interviewers also value clear reasoning. When you describe a finding, explain the risk in business terms, name the exact setting or code that causes it and suggest a specific fix, such as disabling an old protocol or moving password storage to Argon2id with a unique salt per user.
Prepare with guided labs in our ethical hacking training.
References
Frequently Asked Questions
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0