Digital Signature Algorithm and Sample Program
This chapter provides tutorial notes and example codes on digital signature. Topics include algorithm and steps of signing a document; algorithm and steps of verifying a signature; digital signature generation and verification sample programs; sample signatures of SHA1withRSA and SHA1withDSA algorithms.
These sections are omitted from this Web preview version. To view the full content,
see information on how to obtain the full version this book.
What Is Digital Signature?
The Signing Process and the Verification Process
java.security.Signature - The Data Signing Class
JcaSignatureTest.java - Signature Test Program
Signature Test Program Result
JcaSign.java - Signature Generation Sample Program
JcaVerify.java - Signature Verification Sample Program
- Generating and verification digital signatures are done by encrypting and decrypting
the message digest of the input data with private keys and public keys.
- JDK provides several digital signature algorithms: SHA1withDSA, SHA1withRSA,
MD2withDSA, and MD2withRSA.
- Of course, you must choose a digital signature algorithm that is compatible with
the type of the private key.
- Keys are stored in files in encoded formats. The default encoding for private key is
PKCS#8, and the default encoding for public key is X.509.
Read my other book "Cryptography Tutorials - Herong's Tutorial Examples"
for more cryptography tutorials at
Table of Contents
About This JDK Tutorial Book
JDK (Java Development Kit)
Java Date-Time API
Date, Time and Calendar Classes
Date and Time Object and String Conversion
Number Object and Numeric String Conversion
Locales, Localization Methods and Resource Bundles
Calling and Importing Classes Defined in Unnamed Packages
HashSet, Vector, HashMap and Collection Classes
Character Set Encoding Classes and Methods
Character Set Encoding Maps
Encoding Conversion Programs for Encoded Text Files
Socket Network Communication
Datagram Network Communication
DOM (Document Object Model) - API for XML Files
SAX (Simple API for XML)
DTD (Document Type Definition) - XML Validation
XSD (XML Schema Definition) - XML Validation
XSL (Extensible Stylesheet Language)
Message Digest Algorithm Implementations in JDK
Private key and Public Key Pair Generation
PKCS#8/X.509 Private/Public Encoding Standards
►Digital Signature Algorithm and Sample Program
"keytool" Commands and "keystore" Files
KeyStore and Certificate Classes
Secret Key Generation and Management
Cipher - Encryption and Decryption
The SSL (Secure Socket Layer) Protocol
SSL Socket Communication Testing Programs
SSL Client Authentication
HTTPS (Hypertext Transfer Protocol Secure)
Full Version in PDF/EPUB