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



