liveBook · Manning

Cryptography

As explained in Software Security for Developers

Cryptography is the study and practice of securing information and communications through mathematical techniques such as encryption and digital signatures.

Cryptography secures information and communications with mathematical rules. It can detect changes, authenticate senders, hide data, establish shared secrets, and support nonrepudiation. These capabilities protect browser requests, service-to-service calls, stored data, and payment transactions. section 4.0 section 4.1

A payment request across trust boundaries

A customer places an order through ACME’s web application, which calls a payment provider’s credit-card API. Cryptography helps ensure that requests are not altered, that each party is genuine, that private data remains unreadable, and that the sender cannot deny the transaction. section 4.1

Cryptography addresses four fundamental security goals:

  • Integrity detects tampering or accidental corruption during transmission and storage. section 4.1
  • Authentication lets a recipient determine who sent a message; here, it means message authentication rather than user login. section 4.1
  • Confidentiality prevents unauthorized parties from reading protected data. section 4.1
  • Nonrepudiation supports evidence that a sender cannot deny sending a message or transaction. section 4.1
Table 4.1 Cryptography goals and algorithm types
Goal
Foundational algorithm required
Standards covered in the book
Integrity
Cryptographic hash function
SHA-2, SHA-3 (this chapter)
Authentication
Cryptographic hash function
HMAC using SHA-2 or SHA-3 (this chapter)
Confidentiality
Symmetric or public-key encryption
AES, RSA, ECC, JWE, Diffie-Hellman, TLS
Nonrepudiation
Public-key encryption
RSA, ECC, X.509, JWS, PKI

Compare each cryptographic goal with its foundational algorithm type and related standards, including hashes, HMAC, encryption, signatures, and key exchange. section 4.1

A practical understanding starts with hashes and HMAC before connecting them to standards and protocols such as TLS, OAuth, OIDC, JWT, JWS, and JWE. Working Java examples build intuition without requiring mathematical proofs. section 1.4 section 4.0

How Software Security for Developers covers it

How deep it goes
Explains goals, algorithm categories, and relationships among standards while stopping short of mathematical proofs.
Examples
Uses an e-commerce payment architecture, browser and API messages, hashes, HMAC, and working Java examples.
What it assumes
Assumes standard object-oriented programming instructions while teaching cryptography foundations from the beginning.
What you can do after
Apply cryptographic basics and published standards through Java libraries to make safer application-security design choices.
How it connects
Connects cryptography with hashing, HMAC, encryption, digital signatures, key exchange, TLS, OAuth, OIDC, JWT, JWS, and JWE.

Also explained in

Compare how 4 books explain cryptography →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Software Security for Developers. The section links point to the parts of the book it draws on.