Cryptography, as tested on the CISSP exam, isn’t just about making secret codes; it’s about the assurance that data is what it claims to be and has remained unchanged.

Let’s see this in action with a simple example of symmetric encryption using AES in CBC mode. Imagine we have a plaintext message: This is a secret message.

from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
from Crypto.Util.Padding import pad, unpad

key = get_random_bytes(16)  # 128-bit key
iv = get_random_bytes(16)   # Initialization Vector for CBC

cipher = AES.new(key, AES.MODE_CBC, iv)
plaintext = b'This is a secret message.'
padded_plaintext = pad(plaintext, AES.block_size)
ciphertext = cipher.encrypt(padded_plaintext)

print(f"Key: {key.hex()}")
print(f"IV: {iv.hex()}")
print(f"Ciphertext: {ciphertext.hex()}")

# Decryption
cipher_decrypt = AES.new(key, AES.MODE_CBC, iv)
decrypted_padded_plaintext = cipher_decrypt.decrypt(ciphertext)
decrypted_plaintext = unpad(decrypted_padded_plaintext, AES.block_size)

print(f"Decrypted Plaintext: {decrypted_plaintext.decode()}")

The core problem cryptography solves is establishing trust in digital communications and data storage. Without it, we’d have no way to guarantee confidentiality (keeping data secret), integrity (ensuring data hasn’t been tampered with), authentication (verifying the sender’s identity), or non-repudiation (proving a sender cannot deny sending a message). CISSP Domain 3, Security and Risk Management, often frames these concepts within the context of protecting organizational assets.

At its heart, cryptography relies on mathematical algorithms and keys. Symmetric encryption uses the same key for both encryption and decryption (like AES). Asymmetric encryption uses a pair of keys: a public key for encryption and a private key for decryption (like RSA). Hashing creates a fixed-size digest of data, useful for integrity checks, and is a one-way process (you can’t get the original data back from the hash).

Consider the lifecycle of data and how crypto protects it. Data in transit (e.g., over a network) is typically protected by protocols like TLS/SSL, which employ asymmetric encryption for the initial handshake (establishing trust and exchanging symmetric keys) and then symmetric encryption for the bulk data transfer (faster). Data at rest (e.g., on a hard drive) might be protected by full-disk encryption (FDE) or file-level encryption, often using symmetric algorithms.

The choice between symmetric and asymmetric cryptography isn’t arbitrary; it’s a trade-off between speed and key management complexity. Symmetric ciphers are significantly faster, making them ideal for encrypting large amounts of data. However, securely distributing the shared secret key to all parties involved can be a logistical nightmare. Asymmetric ciphers are much slower but solve the key distribution problem. You can freely share your public key, and only you possess the corresponding private key needed for decryption. This is fundamental to how digital certificates and secure email work.

Hashing algorithms, like SHA-256, are crucial for integrity. When you compute a hash of a file and later recompute it, the hashes must match to confirm the file hasn’t changed. This is distinct from encryption because it doesn’t hide the data; it just verifies its unaltered state. A digital signature combines hashing with asymmetric cryptography: the sender hashes the message and then encrypts the hash with their private key. The recipient can then decrypt the hash using the sender’s public key and compare it to a hash they compute themselves from the received message. If they match, it proves both integrity and authentication (non-repudiation).

The most surprising aspect for many is how much of "secure" communication relies on trusted third parties for key management and verification. When your browser shows a padlock, it’s not just about the math; it’s about trusting that the Certificate Authority (CA) that issued the website’s SSL/TLS certificate has properly verified the website’s identity. The entire infrastructure of Public Key Infrastructure (PKI) is built around this trust model, with CAs acting as central authorities that vouch for the authenticity of public keys. A compromised CA could issue fraudulent certificates, undermining the entire system of trust for millions of users.

The next concept you’ll grapple with is the practical implementation and management of these cryptographic systems, including key rotation, certificate lifecycle management, and the vulnerabilities introduced by poor implementation or outdated algorithms.

Want structured learning?

Take the full Cryptography course →