gmssl私钥文件格式
外层为pem,内层为pkcs#8的EncryptedPrivateKeyInfo,encryptionAlgorithm的OID为pkcs5PBES2,所以还套了一层pkcs#5。
openssl也支持这种格式,但不是默认格式,你需要使用“openssl pkcs8”命令才能将私钥存储为pkcs#8格式。
另附pkcs#5/8的标准文档:RFC 8018: PKCS #5: Password-Based Cryptography Specification Version 2.1 (rfc-editor.org)
RFC 5208: Public-Key Cryptography Standards (PKCS) #8: Private-Key Information Syntax Specification Version 1.2 (rfc-editor.org)