Securing and signing PDF in Python
Contents
[
Hide
]
This section explains how to securely apply digital signatures to PDF documents using Python Library. While the terms electronic signature and digital signature are sometimes used interchangeably, they are not the same. A digital signature is backed by a certificate authority, providing a trusted seal that protects the document against tampering. In contrast, an electronic signature is typically used to indicate a person’s intent to sign a document, without the same level of security validation.
Aspose.PDF supports digital signatures:
- PKCS1 with RSA signature algorithm and SHA-1 digest.
- PKCS7 with RSA signature algorithm and SHA-1 digest.
- PKCS7 detached with DSA, RSA and ECDSA signature algorithms. The supported digest algorithms depend on the signature algorithm.
- Timestamp signature.
Digest algorithms for PKCS7 detached:
- DSA - SHA-1.
- RSA - SHA-1, SHA-256, SHA-384, SHA-512.
- ECDSA - SHA-256, SHA-384, SHA-512, SHA3-256, SHA3-384, SHA3-512.
It is recommended to avoid digital signatures with the SHA-1 digest algorithm due to its insecurity.