Signature Algorithm在X509中的结构
分别在整个证书结构中Certificate的第二项和 TBSCertificate结构中的第三项:
对于ECC和国密算法
The AlgorithmIdentifier parameters field MUST be absent.
各种签名算法的OID:
ECC的:
ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840)ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 }
ecdsa-with-SHA384 OBJECT IDENTIFIER ::= {
iso(1) member-body(2) us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 }
ecdsa-with-SHA512 OBJECT IDENTIFIER ::= {
iso(1) member-body(2) us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 }
国密的:
SM3WithSM2Encryption OBJECT IDENTIFIER ::= { iso(1) member-body(2) cn(156)
ccstc(10197) cryptographic-algorithm (1) 501 }
以 ecdsa-with-SHA384 自签根证书为例:
二级ECC 证书为例(和上面的ECC ROOT证书一样的):
以自签国密证书为例 (二级国密证书也一样的):
对于RSA:The AlgorithmIdentifier parameters field MUST be the ASN.1 type NULL
以自签的RSA 2048 签名算法为 sha256WithRSAEncryption的为例: