Skip to main content

Module pkcs8

Module pkcs8 

Source

Enums§

EcPrivateKey
A supported elliptic-curve private key parsed from DER.
MlDsaPrivateKey
A supported ML-DSA private key parsed from DER.
Pkcs8Error

Constants§

OID_EC_PUBLIC_KEY
Object identifier for id-ecPublicKey (1.2.840.10045.2.1).
OID_ED25519
Object identifier for Ed25519 (1.3.101.112).
OID_ML_DSA_44
Object identifier for id-ml-dsa-44 (2.16.840.1.101.3.4.3.17).
OID_ML_DSA_65
Object identifier for id-ml-dsa-65 (2.16.840.1.101.3.4.3.18).
OID_ML_DSA_87
Object identifier for id-ml-dsa-87 (2.16.840.1.101.3.4.3.19).
OID_RSA_ENCRYPTION
Object identifier for rsaEncryption (1.2.840.113549.1.1.1).
OID_SECP256R1
Object identifier for secp256r1 / NIST P-256 (1.2.840.10045.3.1.7).
OID_SECP384R1
Object identifier for secp384r1 / NIST P-384 (1.3.132.0.34).

Functions§

decode_ec_pkcs8_der
Decodes a PKCS#8 PrivateKeyInfo DER containing a P-256 or P-384 key.
decode_ec_sec1_der
Decodes a SEC1 / RFC 5915 ECPrivateKey DER into a P-256 or P-384 key.
decode_ed25519_pkcs8_der
Decodes a PKCS#8 PrivateKeyInfo DER containing an Ed25519 key.
decode_mldsa_pkcs8_der
Decodes a PKCS#8 PrivateKeyInfo DER containing an ML-DSA private key.
decode_p256_pkcs8_der
Decodes a P-256 secret key from PKCS#8 DER in the fixed 138-byte PrivateKeyInfo template produced by encode_p256_pkcs8_der.
encode_ed25519_pkcs8_der
Encodes an Ed25519 secret key as PKCS#8 DER in the fixed 48-byte PrivateKeyInfo form defined by RFC 8410.
encode_mldsa44_pkcs8_der
Encodes an ML-DSA-44 secret key as PKCS#8 DER in the RFC 9881 seed format.
encode_mldsa65_pkcs8_der
Encodes an ML-DSA-65 secret key as PKCS#8 DER in the RFC 9881 seed format.
encode_mldsa87_pkcs8_der
Encodes an ML-DSA-87 secret key as PKCS#8 DER in the RFC 9881 seed format.
encode_p256_pkcs8_der
Encodes a P-256 secret key as PKCS#8 DER (the fixed 138-byte PrivateKeyInfo template used by OpenSSL for secp256r1).
encode_p384_pkcs8_der
Encodes a P-384 secret key as PKCS#8 DER in the fixed 185-byte PrivateKeyInfo form used by OpenSSL for secp384r1.
is_rsa_pkcs8_der
Reports whether der is a PKCS#8 PrivateKeyInfo whose AlgorithmIdentifier is rsaEncryption (1.2.840.113549.1.1.1).