Cryptography
Cryptography is the practice and study of techniques for secure communication in the presence of adversaries. It provides the foundation for security in modern computing, protecting data at rest and in transit, verifying identities, and ensuring data integrity.
Core Concepts
Cryptography rests on three pillars:
- Confidentiality: Ensuring that only authorised parties can read the data.
- Integrity: Ensuring that data has not been tampered with.
- Authenticity: Verifying the identity of the communicating parties.
Encryption
Encryption transforms plaintext into ciphertext using a cryptographic algorithm and a key. Only someone with the correct key can decrypt the ciphertext back to readable plaintext.
See Article - Encryption for details on symmetric and asymmetric encryption, algorithms, and practical usage.
Hashing
Cryptographic hash functions take arbitrary input and produce a fixed-size output (hash digest). They are one-way functions: it should be computationally infeasible to reverse the process or find two inputs that produce the same output.
Hashing is used for:
- Password Storage: Storing password hashes instead of plaintext passwords.
- Data Integrity: Verifying that a file has not been modified.
- Digital Signatures: Providing non-repudiation and authenticity.
- Blockchain: Creating Merkle trees and proof-of-work systems.
See Article - Hashing for more on hash functions, salting, and common algorithms.
Certificates and PKI
Digital certificates bind public keys to identities (domains, organisations, individuals). They are issued by Certificate Authorities (CAs) and form the basis of Public Key Infrastructure (PKI).
Certificates are used for:
- TLS/HTTPS: Securing web traffic and verifying server identity.
- Email Encryption: S/MIME for signing and encrypting emails.
- Code Signing: Verifying software authenticity.
- VPN Authentication: Mutual TLS for client authentication.
See Article - Certification for more on certificate formats, PKI, and practical certificate management.
Cryptography in Linux
Linux provides extensive cryptographic tools:
- openssl: Toolkit for TLS/SSL and general cryptography.
- gpg: GNU Privacy Guard for encryption and signing.
- ssh-keygen: Generating SSH key pairs.
- cryptsetup: Managing encrypted block devices (LUKS).
- Kernel crypto API:
/dev/cryptoand kernel modules for hardware-accelerated cryptography.
Related Articles
- Encryption: Article - Encryption
- Hashing: Article - Hashing
- Certificates: Article - Certification