.pem 文件是否同时包含私钥和公钥? [英] Does .pem file contain both private and public keys?

查看:31
本文介绍了.pem 文件是否同时包含私钥和公钥?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道 PEM 文件是否同时包含私钥和公钥?PEM"代表什么?

I am wondering if PEM-files contain both private and public keys? What does "PEM" stand for?

推荐答案

PEM 文件可能包含任何内容,包括公钥、私钥或两者,因为 PEM 文件不是标准文件.实际上 PEM 只是意味着文件包含一个 base64 编码的数据位.它被称为 PEM 文件,因为它暗指了作为邮件安全标准的 S/MIME 之前的旧隐私增强邮件标准.这些标准以特定的 base64 格式指定了各种密钥和消息的格式.例如,请参阅 RFC 1421.

A PEM file may contain just about anything including a public key, a private key, or both, because a PEM file is not a standard. In effect PEM just means the file contains a base64-encoded bit of data. It is called a PEM file by allusion to the old Privacy-Enhanced Mail standards which preceded S/MIME as a mail security standard. These standards specified the format of various keys and messages in a particular base64 format. See RFC 1421 for example.

通常,PEM 文件包含 base64 编码的密钥或证书,其页眉和页脚行的形式为 -----BEGIN <whatever>----------END <whatever>----.随着时间的推移, 出现了许多可能性,包括私钥、公钥、X509 证书、PKCS7 数据、包含多个证书的文件、包含私钥和 X509 证书的文件、PKCS#10 证书签名请求,...

Typically a PEM file contains a base64 encoded key or certificate with header and footer lines of the form -----BEGIN <whatever>----- and -----END <whatever>----. Over time there have evolved many possibilities for <whatever>, including private keys, public keys, X509 certificates, PKCS7 data, files containing multiple certificates, files containing both the private key and the X509 certificate, PKCS#10 certificate signing requests, ...

RFC 7468 来记录这种事实上的格式.

RFC 7468 has been written to document this de facto format.

这篇关于.pem 文件是否同时包含私钥和公钥?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆