Java Cryptography: Tools and Techniques
Java Cryptography: Tools and Techniques
Minimum price
Suggested price
Java Cryptography: Tools and Techniques

Last updated on 2018-09-30

About the Book

Cryptography is about the security of communications. It provides mechanisms for hiding messages from outside observers, accurately identifying the originators of messages, determining that messages have been delivered safely without tampering, and making it possible to accurately identify both the entities receiving and sending messages when messages are being delivered between different parties.

Over time, in our increasingly connected world, issues related to cryptography and security have increasingly become common in the development of applications and even other APIs. In this environment, Java still maintains its popularity as a language for the development and implementation of Internet applications. While Java has an established API for basic cryptography defined as part of the regular Java runtime, many things that developers generally need to do, such as producing and managing certificates, client credentials, time stamps, and secure messaging are not provided. The Legion of the Bouncy Castle Cryptography APIs were developed to fill a large part of this gap. That said, there is an awful lot to know, and many developers do not get the time to take a sabbatical to brush up on the right security API to use when a security related application arrives on their desk. While falling into fear and panic is always an option, we felt it might be better to provide a book, drawing on our experience, that goes beyond what is commonly available in API documentation. A book that provides some basic real world examples of how to use the APIs and address the questions developers most commonly ask and the issues developers most commonly have trouble with. One with a warm friendly cover, designed to avoid panic, and to help keep the reader focused on the idea of getting a job done. It is our aim that "Java Cryptography: Tools and Techniques" is that book.

Table of Contents

  • 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, and KDFs
    • Message Digests
    • MACs
    • HMACs
    • Key Derivation Functions
    • Bouncy Castle Calculator Interfaces for Digests and MACs
    • 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 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
  • Chapter 15: The Future
    • Installing the Bouncy Castle Post-Quantum Provider
    • Stateful Signature Algorithms
    • Stateless Signature Algorithms
    • The rest of the Chapter
  • Appendix A: ASN.1 and Bouncy Castle
    • Basic ASN.1 Syntax
    • The Types
    • Encoding Rules
    • Basic Guidance
    • Defining Your Own Objects
  • Appendix B: Algorithms provided by the Bouncy Castle Providers
  • Acronyms and Definitions
  • Bibliography and Further Reading
  • Notes

About the Authors

David Hook
David Hook

David Hook is an active developer and co-founder of the Bouncy Castle cryptography project, now in its 18th year, and has been working with the Java Cryptography APIs since their original publication in the late 1990s. In addition to his development work with Bouncy Castle, David has also given presentations and tutorials on the Java Cryptography framework and on the use of the Bouncy Castle APIs, as well as writing several articles, a previous book "Beginning Cryptography with Java" and the mini-ebook "BC FIPS in 100 Examples". He currently works as a consultant supporting the use and development of the Bouncy Castle APIs and has recently lead the "charge" which resulted in a version of the APIs being certified for FIPS 140-2. He is a member of the Association of Computing Machinery and the IEEE.

Jonathan Eaves
Jon Eaves

Jon has more than 25 years of experience constructing software, he has built software in a wide range of domains, from controlling hardware to payroll systems and the standard consumer centric web applications. Jon is particularly interested in software design and how to influence teams in building good software, the latter which takes up more and more of his time. 

On most days you will find Jon riding one of his bikes, drinking coffee at the local cafe and being heckled by colleagues as he wistfully remembers the time he spent all day, every day writing code. 

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors and publishers use Leanpub to publish amazing in-progress and completed ebooks, just like this one. You can use Leanpub to write, publish and sell your book as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub