Acknowledgements
Introduction
Chapter 1: Getting Started, an Overview
- The Java Provider Architecture
- Architecture of the Bouncy Castle APIs
- The Supporting APIs
- The Bouncy Castle FIPS distribution
- Installing Bouncy Castle
- A Word About Entropy
- Bits of Security
- Summary
Chapter 2: Block and Stream Ciphers
- The Basics
- Algorithm Security Strengths
- Block Ciphers
- Block Modes
- Streaming Block Modes
- Stream Ciphers
- Cipher Based Input/Output
- Summary
Chapter 3: Message Digests, MACs, HMACs, KDFs, and XOFs
- Message Digests
- MACs
- HMACs
- Key Derivation Functions
- Expandable Output Functions
- Bouncy Castle Calculator Interfaces for Digests and MACs
- An Application of Digests: Merkle Trees
- Summary
Chapter 4: Authenticated Modes, Key Wrapping, and the SealedObject
- Setup for the Examples
- Authenticated Encryption Modes
- Key Wrapping Algorithms
- The SealedObject Class
- Summary
Chapter 5: Password Based Key Generation and Key Splitting
- Password Based Key Generation
- PKCS5 Scheme 2
- SCRYPT
- Other PBKDFs
- Key Splitting
- An Implementation of Key Splitting
- Summary
Chapter 6: Signatures
- Key Pair Generation and Import
- Digital Signatures
- Signature Security Strengths
- The Digital Signature Algorithm
- DSA with Edwards Curves (EdDSA)
- DSTU 4145
- GOST
- RSA Signature Algorithms
- SM2
- Bouncy Castle Calculator Interfaces for Signatures
- Summary
Chapter 7: Key Transport, Key Agreement, and Key Exchange
- Algorithm Security Strengths
- Key Transport
- Key Agreement and Key Exchange
- Key Confirmation
- Summary
Chapter 8: X.509 Certificates and Attribute Certificates
- The X.500 Distinguished Name
- Public Key Certificates
- Creating a Basic Public Key Certificate
- Converting an X509CertificateHolder to an X509Certificate
- The CertificateFactory Class
- Creating a CA Certificate with Extensions
- Creating End-Entity Certificates
- Attribute Certificates
- Summary
Chapter 9: Certificate Revocation and Certificate Paths
- Certificate Revocation Lists (CRLs)
- Converting an X509CRLHolder to an X509CRL
- Obtaining Revocation Information from a Certificate Issuer
- Online Certificate Status Protocol
- Certificate Path Validation
- Summary
Chapter 10: Key and Certificate Storage
- Setup for the Examples
- Early KeyStore Types: JKS, JCEKS, BKS, and UBER
- The keytool Command
- The PKCS12 KeyStore Type
- The BCFKS/BCSFKS KeyStore Type
- Summary
Chapter 11: Cryptographic Message Syntax, S/MIME, and TSP
- Cryptographic Message Syntax
- Data Content
- SignedData Content
- EnvelopedData Content
- S/MIME
- Things to Watch With JavaMail
- Time-Stamp Protocol
- An Application of Time-Stamps: CAdES-T
- Summary
Chapter 12: Certification Requests and Certificate Management
- PKCS #10 Certification Requests
- Certificate Request Message Format
- Certificate Management over CMS
- Enrolment over Secure Transport
- Certificate Management Protocol
- Summary
Chapter 13: OpenPGP
- The Basics
- Generating Armored Output
- Generating Key Rings
- Adding a Sub-Key to an Existing Key Ring
- Encapsulated Signed Messages
- Detached Signatures
- Signing Text Data
- Cleartext Signatures
- Public Key Encryption
- PBE Encryption
- Keybox Files
- Using S-expressions for Private Keys
- Summary
Chapter 14: Transport Layer Security
- Introduction
- Installation
- Conventions
- Some Preparation - a Simple Protocol
- A Basic TLS Server
- A Basic TLS Client
- Using Client-Side Authentication
- Another Look a TrustManagers
- Properties
- BC JSSE Extensions
- Using the low level (D)TLS API
- The Low-level TLS API
- DTLS
- Low-level TLS API Overrides
- Specialist Protocols: PSK and SRP
- Summary
Chapter 15: The Future
- Installing the Bouncy Castle Post-Quantum Provider
- Stateful Signature Algorithms
- Stateless Signature Algorithms
- Key Encapsulation Mechanisms
- Hybrid Encryption
- Summary
Appendix A: ASN.1 and Bouncy Castle
- Basic ASN.1 Syntax
- The Types
- Encoding Rules
- Basic Guidance
- Defining Your Own Objects
Appendix B: The Bouncy Castle Kotlin API
- A Note on Packaging
- Generating a PKCS#10 Certification Request
- Generating a Certificate