crypto — Generic cryptographic module¶
pyca/cryptography is likely a better choice than using this module.
It contains a complete set of cryptographic primitives as well as a significantly better and more powerful X509 API.
If necessary you can convert to and from cryptography objects using the
from_cryptography methods on
Serialization and deserialization¶
The following serialization functions take one of these constants to determine the format.
FILETYPE_PEM serializes data to a Base64-encoded encoded representation of the underlying ASN.1 data structure. This representation includes delimiters that define what data structure is contained within the Base64-encoded block: for example, for a certificate, the delimiters are
-----BEGIN CERTIFICATE----- and
Certificate signing requests¶
Certificate revocation lists¶
Signing and verifying signatures¶
PKCS7 objects have the following methods:
Several of the functions and methods in this module take a digest name.
These must be strings describing a digest algorithm supported by OpenSSL (by
More information and a list of these digest names can be found in the
EVP_DigestInit(3) man page of your OpenSSL installation.
This page can be found online for the latest version of OpenSSL: