liveBook · Manning

Encryption

As explained in Software Security for Developers

Encryption is the transformation of readable data into an encoded form intended to prevent unauthorized access.

Encryption transforms readable data into an encoded form that unauthorized people cannot usefully read. It matters whenever data crosses an untrusted network, enters cloud services, or contains personal information governed by confidentiality requirements. section 5.0 section 10.2.1

Without encryption, intercepted traffic remains plain text: an attacker positioned between a device and server can read passwords and other messages. TLS encrypts the connection and also helps detect tampering and verify the server’s identity. section 10.2.1 section 10.5

Common encryption choices serve different boundaries and responsibilities:

  • AES protects data confidentiality and, with Galois/Counter Mode, can provide confidentiality, integrity, and authenticity. section 5.0
  • RSA uses a public key for encryption and a private key for decryption; the private key can also sign data for public-key verification. section 6.4
  • ECC can implement public-key encryption and decryption with a selected curve; the Java example uses the Bouncy Castle provider. section 7.2.1
  • TLS applies encryption to communication between endpoints, commonly terminating at an ingress layer or, in special cases, inside the application. section 10.4

Encrypting a service-to-service refund file

A warehouse service encrypts refunds.json with the recipient’s RSA public key and writes refunds.json.rsa. The payments service uses the matching private key to decrypt it. The sender can additionally sign the data with its private key, allowing the recipient to verify the signature before decryption. section 6.4

Figure 10.10 With TLS enabled, intercepted messages are encrypted and unreadable by attackers. Even if someone tries to alter the message, the recipient will detect the tampering because the digital signature won’t match the sender’s certificate. This is how TLS ensures both confidentiality and integrity.
figure

Use the diagram to see how TLS makes intercepted messages unreadable and exposes alteration through signature verification. section 10.2.1

How Software Security for Developers covers it

How deep it goes
Explains practical AES, RSA, ECC, and TLS usage through Java examples while deferring mathematical foundations and exhaustive protocol internals.
Examples
Uses AES modes, encrypted refunds.json files, warehouse and payments services, RSA signatures, ECC key pairs, and intercepted TLS traffic.
What it assumes
Assumes application-development familiarity but teaches encryption concepts and practical cryptographic use without requiring mathematical cryptography.
What you can do after
Apply encryption with Java cryptographic APIs and configure TLS while recognizing eavesdropping, tampering, and impersonation risks.
How it connects
Connects encryption with AES, RSA, ECC, digital signatures, TLS, confidentiality, integrity, authenticity, and man-in-the-middle attacks.

Also explained in

Compare how 17 books explain encryption →

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.