Signatures can be in two formats, CAdES and XAdES.CAdES is ASN.1 encoded binary format and the XAdES is XML encoded text format.
Signature type determines which components of the signature are included in the signed document. Timestamp, reference information to validation data, or the validation data itself are some of those components.
Signature | Type |
---|---|
ES_BES | Basic Electronic Signature |
ES_T | Electronic Signature with Timestamp |
ES_C | Includes reference to validation data |
ES_X_Type1 | Includes both validation references and timestamp |
ES_X_Type2 | Includes validation references and validation references are timestamped |
ES_XL | Includes validation data |
ES_XL_Type1 | Includes validation data and timestamp |
ES_XL_Type2 | Includes validation data and validatio data is timestamped |
ES_A | Archive format (very long-term protection) |
Signatures are called as detached or attached according to the inclusion of signature values in the signed document. Besides, in XML signature format, there is also enveloped signature which is not supported by common api since it can not be represented by the common interface. For enveloped signature, see the section XML Signature.
A single signature is represnted by the interface Signature
whereas one or more signatures can be contained by the interface SignatureContainer
. SignatureFactory
is used to create proper SignatureContainer
instance according to the given signature format.
Signature is created as ES-BES and can be converted to more complex types by using the method Signature#upgrade
.