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.

Jun 23, 2025 - 11:08
Updated: 
102k

Ethical Hacking in Cybersecurity & Ethical Hacking · Interview preparation

Cybersecurity Foundations

Cryptography for Ethical Hacking: Concepts, Tools, Interview Questions

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?

ConceptExamplesProvides
Symmetric encryptionAES-GCM, ChaCha20-Poly1305Confidentiality with one shared key
Asymmetric encryptionRSA, ECCKey exchange and encryption with key pairs
HashingSHA-256, SHA-3Integrity; one-way fingerprint
Password hashingArgon2id, bcrypt, scryptSlow, salted storage of passwords
Digital signaturesRSA-PSS, ECDSA, Ed25519Authenticity and non-repudiation
PKI and certificatesX.509, certificate authoritiesTrust in public keys
TLSTLS 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?

QuestionShort 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

They need it to spot weak protection of data, such as outdated TLS or poor password storage, and to recommend correct, practical fixes to clients.

Encryption is reversible with the right key and protects confidentiality, while hashing is one-way and is used to check integrity or store passwords.

OWASP recommends slow, salted algorithms such as Argon2id, with scrypt or bcrypt as alternatives, never plain SHA-256 or MD5 on their own.

TLS 1.2 with strong cipher suites is still widely accepted, but TLS 1.3 is preferred, and TLS 1.0 and 1.1 should be disabled.

A digital signature uses a private key to sign data so anyone with the public key can verify who signed it and that it was not changed.

It is cryptography designed to resist attacks from future quantum computers. NIST published its first such standards, FIPS 203, 204 and 205, in August 2024.

Public key infrastructure is the system of certificate authorities, certificates and policies that lets people trust that a public key belongs to a specific owner.

Checking your own systems is fine, but testing third-party systems needs written permission, as unauthorised testing can break India’s IT Act 2000.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.