Cryptography Fundamentals: Symmetric, Asymmetric and Hashing
Cryptography rests on three pillars: symmetric encryption (AES, speed), asymmetric encryption (RSA/ECC, key exchange and signatures) and hashing (SHA-256, integrity). A comparison (infographic), where each is used, common mistakes and a checklist.
Quick answer: Cryptography is the mathematics of making data unreadable to unauthorized people and tamper evident, and it rests on three pillars. Symmetric encryption (e.g. AES) uses the same single key to encrypt and decrypt; it is fast and ideal for protecting bulk data. Asymmetric encryption (e.g. RSA, ECC) uses a public and private key pair; what is encrypted with the public key can only be decrypted with the private key, enabling secure key exchange and digital signatures. Hashing (e.g. SHA-256) turns text into a fixed length, irreversible digest; it is not encryption and is used for integrity verification and password storage. Modern security uses all three together: symmetric for speed, asymmetric for secure key exchange and identity, hashing for integrity.
Cryptography is the invisible foundation of all digital security. Your HTTPS connection, your messaging app's end to end encryption, digital signatures and password storage all rest on these three building blocks. The terms look complex but the logic is clear. This guide explains, with world class clarity, the fundamentals of cryptography, where each is used and common mistakes.
The three pillars of cryptography
These three are not rivals but complements. A real secure connection uses all three: asymmetric encryption agrees on a secure symmetric key, data travels with fast symmetric encryption, and integrity is verified with hashing.
Symmetric vs asymmetric vs hashing
| Aspect | Symmetric | Asymmetric | Hashing |
|---|---|---|---|
| Key | One, secret | Public + private pair | No key |
| Purpose | Confidentiality (speed) | Key exchange, signatures | Integrity, digest |
| Reversible | Yes (with key) | Yes (with private key) | No |
| Example | AES | RSA, ECC | SHA-256 |
| Typical use | Disk, data encryption | HTTPS handshake, signing | Passwords, download verification |
Where each is used
- HTTPS / TLS. Browser and server use asymmetric encryption to agree on a symmetric session key, then carry data with fast symmetric encryption.
- End to end messaging. Symmetric session encryption over trust established with asymmetric keys.
- Digital signatures. Signed with the private key, verified with the public key; provides identity and integrity. Hash verification is its basis.
- Password storage. A password is stored never as plaintext or reversible encryption but with a slow hash; as explained in our password cracking article, salt and a slow algorithm are essential.
- Disk and file encryption. Usually symmetric (AES); the key is protected by a password or a hardware module.
Common critical mistakes
- Writing your own crypto. Cryptography needs expertise; use proven, audited libraries.
- Thinking a hash is encryption. A hash is irreversible; data that must be kept secret is encrypted, not hashed.
- Storing passwords with a fast hash. MD5/SHA1 are unsuitable for passwords; Argon2, bcrypt, scrypt are needed.
- Weak or reused keys. Key management is a more frequent cause of breakage than the algorithm.
- Old algorithms. DES, MD5, SHA1 are no longer considered secure.
Cryptography checklist
- TLS in transit, disk/file encryption at rest.
- Passwords stored with a slow, salted hash.
- Keys stored securely and rotated regularly.
- Only current, audited algorithms and libraries.
- Integrity and origin verified with digital signatures.
Frequently asked questions
Is symmetric or asymmetric more secure? Both are right for their purpose. Asymmetric solves key exchange and signing but is slow; symmetric is fast but the key must be shared securely. Modern systems use both together.
Why is a hash not encryption? A hash is one way and irreversible; its purpose is not confidentiality but integrity and digest. Encrypted data can be reopened with a key; a hash cannot.
Can AES be broken? Correctly implemented AES with a strong key is practically unbreakable. In the real world what breaks is almost always a weak key, bad implementation or key leak, not the algorithm.
Will quantum computers end encryption? Quantum threatens some asymmetric algorithms, which is why post quantum cryptography is being developed. Symmetric and hashing are more resilient. The transition is being made in a planned way.
Sources
- NIST, Cryptographic Standards and Guidelines: https://csrc.nist.gov
- OWASP, Cryptographic Storage Cheat Sheet: https://cheatsheetseries.owasp.org
- NIST Post-Quantum Cryptography: https://csrc.nist.gov/projects/post-quantum-cryptography
- ENISA, Cryptography: https://www.enisa.europa.eu
For encryption, key management and secure data storage auditing in your organization, contact DSET. From our Ankara Hacettepe Teknokent laboratory we provide cybersecurity and secure code review.
Kimliğinizi doğrulayın
Yetkilendirilmiş erişim alanı. Tüm giriş denemeleri kayıt altına alınır.