Glossary Background Image

No Bad Questions About Cybersecurity

Definition of Cryptography

What is cryptography in cybersecurity?

In cybersecurity, cryptography is the set of mathematical methods used to protect information and make it verifiable. It enables core security goals like confidentiality (keeping data secret), integrity (detecting tampering), and authentication (proving who sent or accessed something).

Why is cryptography important?

Cryptography is important because it's what turns security intent into an enforceable technical reality. Policies like "protect customer data," "restrict access," or "ensure secure payments" only work at scale when the underlying data is encrypted, identities are verifiable, and changes are detectable. Without strong, correctly implemented cryptography, many security controls remain weak or purely theoretical: data stays readable, identities are easy to spoof, and tampering can go unnoticed.

It also protects you in the most common high-risk moments:

  • Data in transit: API calls, web traffic, service-to-service communication.
  • Data at rest: databases, backups, object storage, laptops, mobile devices.
  • Software integrity: making sure updates and artifacts aren't modified on the way to production.

Just as important: cryptography is easy to "have" and surprisingly easy to misconfigure. Weak choices, poor key management, or incorrect implementation can silently remove protection while everything still looks "secure." That's why cryptography is treated as a dedicated checkpoint in cybersecurity audits: it's where hidden gaps often surface.

If you want the practical view (what to check, how to check it, and which tools are used), see our related article:

Image.

How does cryptography work?

At a high level, cryptography is a controlled exchange of trust: two sides establish who they're talking to, agree on shared secrets, and then use those secrets to protect every message that follows. The math matters, but in real systems, the outcome depends just as much on key generation, storage, rotation, and usage, because keys are what actually carry the security.

In cybersecurity, you'll most often see these crypto building blocks working together:

Encryption (confidentiality)
Transforms plaintext into ciphertext so only someone with the right key can read it. This is what protects messages, files, database records, and backups.

Hashing (integrity "fingerprints")
Creates a fixed-length digest of data. If the data changes, the hash changes. Hashing is also the foundation of safe password storage (store hashes, not passwords).

Digital signatures (authenticity + integrity)
A sender signs data with a private key; anyone can verify the signature using the public key. This is how you prove who produced a message, transaction, or software release.

In practice, these building blocks are combined in protocols like HTTPS//TLS; cryptography is layered: the connection is established securely, then fast encryption protects the data stream, while integrity checks ensure nothing was altered in transit.


What happens in a secure protocol:

  1. The client and server negotiate capabilities.
    They agree on a protocol version and a set of cryptographic options (cipher suites), so both sides know which algorithms they'll use.
  2. The server proves its identity.
    The server presents a certificate that binds its public key to a domain name. The client validates that the certificate through a trusted chain (a CA), checks it matches the hostname, and ensures it's not expired or revoked (depending on configuration).
  3. They establish a shared secret (key exchange).
    Using the server's public key and an ephemeral key exchange (commonly ECDHE), both sides derive the same session keys without sending those keys directly over the network. This step is designed to keep past traffic safe even if long-term keys are compromised later (forward secrecy).
  4. They derive session keys and start protecting traffic.
    From the shared secret, both sides derive symmetric encryption keys (fast) plus integrity/authentication parameters. From this point, the connection is encrypted and authenticated.
  5. Every message is encrypted and integrity-protected.
    Modern TLS typically uses AEAD ciphers (like AES-GCM or ChaCha20-Poly1305), which provide confidentiality and integrity together. If data is modified in transit, verification fails, and the message is rejected.
  6. Keys expire and are rotated.
    Session keys are short-lived; long-term identity keys live in certificates and must be protected and rotated. Operational security is largely about preventing key leakage and limiting blast radius when something goes wrong.

Where the "building blocks" fit:

  • Encryption protects confidentiality once session keys exist.
  • Digital signatures (via certificates) establish identity and prevent impersonation during setup.
  • Hashing supports integrity checks, key derivation, and many verification steps inside the protocol.

What is symmetric and asymmetric cryptography?

Symmetric cryptography uses one shared key for both encryption and decryption. It's fast and efficient, which makes it ideal for encrypting large amounts of data (files, database fields, network sessions).

Asymmetric cryptography (public-key cryptography) uses a pair of keys: a public key (shared widely) and a private key (kept secret). It's commonly used to establish trust and exchange session keys, which then power fast symmetric encryption in protocols like TLS, as well as for digital signatures.

It's commonly used for:

  • Secure key exchange (safely establishing a session)
  • Digital signatures (proving authenticity)
  • Certificates and trust (confirming the identity of a server/service)

Most modern protocols use both. For example, TLS uses asymmetric cryptography to establish and exchange a symmetric session key, then uses that symmetric key for efficient encryption during the session.

What is cryptography used for?

Cryptography is not limited to "secret messages" or niche security tooling. It's embedded into everyday digital operations, quietly enabling secure communication, trusted identities, and tamper-resistant systems. In practice, it shows up anywhere systems must protect data and establish trust:

  • Secure web traffic (HTTPS/TLS): protects logins, payments, API calls, and service-to-service communication
  • Data-at-rest encryption: databases, disks, object storage, backups, mobile devices
  • Authentication and identity: certificates, signed tokens, mutual TLS, secure device identity
  • Software supply chain security: signed releases, signed containers/artifacts, integrity verification
  • Password protection: storing password hashes (and salts) instead of reversible secrets
  • Payments and regulated environments: ensuring confidentiality and tamper-evidence for sensitive transactions and records
  • Key management and secrets handling: secure key generation, storage (KMS/HSM), access control, rotation, revocation, and audit logs, so encryption and signing remain trustworthy over time.

Across all these use cases, cryptography serves the same purpose: keep data confidential, make changes detectable, and prove authenticity.

Key Takeaways

  • Cryptography is the foundation that makes confidentiality, integrity, and authentication possible in modern systems, protecting data in transit, at rest, and across the software supply chain.
  • It works by combining algorithms with keys through encryption, hashing, and digital signatures, and it typically mixes symmetric and asymmetric methods in real protocols like TLS.
  • Because cryptography is both essential and easy to misconfigure, it’s a core checkpoint in cybersecurity audits, and it underpins everyday security use cases such as HTTPS, identity verification, password storage, and tamper-evident transactions.

More terms related to Cybersecurity