X509证书中的Subject Public Key Info

SubjectPublicKeyInfo在TBSCertificate的第七项:

X509证书中的Subject Public Key Info_第1张图片

 

对于ECC

id-ecPublicKey OBJECT IDENTIFIER ::= {
iso(1) member-body(2) us(840) ansi-X9-62(10045) keyType(2) 1 }

id-ecPublicKey 是必须的


ECParameters ::= CHOICE {
namedCurve OBJECT IDENTIFIER
-- implicitCurve NULL
-- specifiedCurve SpecifiedECDomain
}

ECParameters中的 namedCurve根据曲线的不同而不同

The ECC public key MUST be encoded as an ECC Point. The uncompressed format SHOULD be used.  ( 04 xxxxxx)
ECPoint ::= OCTET STRING
The namedCurve field in ECParameters of the Subject Public Key Info depends on the ECC curve.
 

示例:

SM2 P256 为例:

the namedCurve field MUST contain the OID defined in GM/T 0006-2012
Cryptographic Application Identifier Criterion Specification [20]:


SM2EllipticCurveCryptography OBJECT IDENTIFIER ::= {
iso(1) member-body(2) cn(156) ccstc(10197) cryptographic-algorithm (1) 301 }
 

X509证书中的Subject Public Key Info_第2张图片

X509证书中的Subject Public Key Info_第3张图片

ECC 为例:

ECC P384 密钥类型

OID 1.3.132.0.34 ansip384r1

X509证书中的Subject Public Key Info_第4张图片

 

X509证书中的Subject Public Key Info_第5张图片

 

 ECC P256 密钥类型

OID 1.2.840.10045.3.1.7 prime256v1

X509证书中的Subject Public Key Info_第6张图片

 X509证书中的Subject Public Key Info_第7张图片

 

 

RSA 为例:

The AlgorithmIdentifier parameters field MUST be the ASN.1 type NULL.
 

rsaEncryption OBJECT IDENTIFIER ::= {
iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-1(1) 1 }
The RSA public key MUST be encoded using the ASN.1 type RSAPublicKey as defined in RFC 3279
RSAPublicKey ::= SEQUENCE {

modulus INTEGER,
publicExponent INTEGER }
-- n
-- e

}

X509证书中的Subject Public Key Info_第8张图片

 NULL 是 0500

你可能感兴趣的:(x509证书,安全,https,密码学,可信计算技术)