Certificate formats-X.509, der and PEMPart: 1 2 3Certificate standard and File encodings seem to be confusing. I wrote down some notes about:
What is X.509 certificate standard?
PEM (privacy enhanced mail) Encoding
Der
Those related to certificates (SSL,X.509,PEM,DER,CRT,CER,KEY,CSR,P12, etc.) [ZZ]Reprinted 2015-06-09 20:21:04From:http://www.cnblogs.com/guogangj/p/4118605.htmlThese concepts related to certificates are really tricky because they haven't been
The original moved, even from here to turn the bar:
ZZ from:http://blog.csdn.net/lazyclough/article/details/7646696
command to generate OpenSSL RSA key:
OpenSSL genrsa-out Private.key 1024OpenSSL rsa-in private.key-pubout-out public.key BIO * key =
Format
Name
Description
PKCS #7
Cryptographic Message Syntax Standard
A PKCS #7 file can be used to store certificates, which is a signeddata structure without data (just). The file name extension is usually. p7b,. p7c
1. Der-encoded key pair
Let's talk about DER encoding because JCE supports DER encoding key pair parsing. For details, see pkcs8encodedkeyspec and x509encodedkeyspec.
DER encoding is a subset of the ASN.1 encoding rules. We do not know how to
package mainimport ("Crypto/tls" "FMT") func main () {//loadx509keypair reads and parses a public/private key pair from a pair of files. The file must contain PEM-encoded data. _, err := tls. Loadx509keypair ("./cert_dist.pem", "./key_dist2.pem")
This is a creation in
Article, where the information may have evolved or changed.
package mainimport ("Crypto/tls" "FMT") func main () {//loadx509keypair reads and parses a public/private key pair from a pair of files. The file must contain
When making various third-party payments, the downloaded certificate is a. Pem suffix, curious what the hell it is, so ... An extremely brutal learning process began ...First of all, the PEM, originally to enhance the security of the message, the
encoding (also for extension) . Der = Extension der is used for binary DER-encoded certificates. These certificates can also be extended with a CER or CRT. The more appropriate term is "I have a DER-encoded certificate" instead of "I have a der
1. First step using OpenSSL to convert Pem key to der key//e:\01doc\bin>openssl.exe rsa-in rsakeydec.pem-outform der-out pri.der2, call the following program directly read der converted to C # required XML key, and then ciphertext decryption3.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.