SM2无证书及隐式证书公钥机制签名和加密过程详解(二)

前面对非显式证书公钥机制(无证书和隐式证书)的密钥生成过程进行了描述(SM2无证书及隐式证书公钥机制签名和加密过程详解(一)_sm2加密解密过程-CSDN博客),这里接着对隐式证书ASN.1模板和生成过程进行说明。

(1)隐式证书ASN.1模板

SequeceOfCertificate ::= SEQUENCE OF Certificate

Certificate ::= CertificateBase(ExplicitCertificate | Reserved)

CertificateBase ::= SEQUENCE {

version Uint8(3),

type CertificateType,

issuer IssuerIdentifier,

toBeSigned ToBeSignedCertificate,

signatre Signature OPTIONAL

}

CertificateType ::= ENUMERATED {

explicit,

reserved,

...

}

--显式证书,需具备CA签名,使用CA公钥验证

ExlipcitCertificate ::= CertificateBase (WITH COMPONENTS { ...,

type(explicit),

toBeSigned (WITH COMPONENTS { ...,

verifyKeyIndicator (WITH COMPONENTS {verificationKey})

}),

signatre PRESENT

})

--隐式证书,无需CA签名,使用声明公钥验证(即公钥还原数据)

Reserved ::= CertificateBase (WITH COMPONENTS { ...,

type(reserved),

toBeSigned(WITH COMPONENTS { ...,

verifyKeyIndicator(WITH COMPONENTS {reconstructionValue})

}),

signatre ABSENT

})

IssuerIdentifier ::= CHOICE {

sha256AndDigest HashedId8,

self SignedData ::= SEQUENCE {

hashId OBJECT IDENTIFIER,

tbsData ToBeSignedData,

signer SignerIdentifier,

signature Signature

} HashAlgorithm,

...,

sha384AndDigest HashedId8,

sm3AndDigest HashedId8

}

ToBeSignedCertificate ::= SEQUENCE {

id CertificateId,

cracaId HashedId3,

crlSeries CrlSeries,

validityPeriod ValidityPeriod,

region GeographicRegion OPTIONAL,

assuranceLevel SubjectAssurance OPTIONAL,

appPermissions SequenceOfAidSsp OPTIONAL,

cerIssuePermissions SequenceOfAidGroupPermissions OPTIONAL,

cerRequestPermissions SequenceOfAidGroupPermissions OPTIONAL,

canRequestRollover NULL OPTIONAL,

encryptionKey publicEncryptionKey OPTIONAL,

verifyKeyIndicator VerificationKeyIndicator,

...

}

(WITH COMPONENTS {..., appPermissions PRESENT} |

WITH COMPONENTS {..., cerIssuePermissions PRESENT} |

WITH COMPONENTS {..., cerRequestPermissions PRESENT})

CertificateId ::= CHOICE {

linkageData LinkageData,

name HostName,

binaryId OCTET STRING(SIZE(1..64)),

none NULL,

...

}

LinkageData ::= SEQUENCE {

iCert IValue,

linkage-value LinkageValue,

group-linkage-value GroupLinkageValue OPTIONAL

}

SequenceOfAidGroupPermissions ::= SEQUENCE OF AidGroupPermissions

AidGroupPermissions ::= SEQUENCE {

subjectPermissions SubjectPermissions,

minChainLength INTEGER DEFAULT 1,

chainLengthRange INTEGER DEFAULT 0,

eeType EndEntityType DEFAULT {app}

}

SubjectPermissions ::= CHOICE {

explicit SequenceOfAidSspRange,

all NULL,

...

}

EndEntityType ::= BIT STRING {app(0), enroll(1)}(size(8))(ALL EXCEPT{})

VerificationKeyIndicator ::= CHOICE {

verificationKey PublicVerificationKey,

reconstructionValue EccP256CurvePoint,

...

}

(2)隐式证书生成过程(简要)

1)KGC生成系统私钥ms和对应系统公钥Ppub。

2)KGC使用系统公钥Ppub向CA申请一张证书(标准证书申请流程)。

3)实体A将公钥数据UA等信息提交到KGC。

4)KGC验证隐式证书申请合法性,生成 ToBeSignedCertificate 中从id开始 encryptionKey 的部分。

5)KGC生成IDA(至少包括 ToBeSignedCertificate 中从 id 开始到 encryptionKey 之前的数据域)。

6)KGC将WA作为隐式证书中 verifyKeyIndicator 的数据,生成完整的隐式证书。

后续,将进一步介绍隐式证书COER编码机制、隐式证书实例及其使用。

相关推荐
国科安芯4 小时前
3 Ω 还是 5.5 Ω:ASL3157S 的供电电压、导通电阻与双路一致性怎么算
网络·嵌入式硬件·安全·模拟开关·抗辐射
磐链科技4 小时前
区块链交易所安全系统如何构建?解析冷热钱包隔离、多重签名与交易风险控制机制
安全·区块链
持敬chijing4 小时前
系统入侵与攻击工具-namp扫描方式与内置脚本
网络·安全·网络安全·网络攻击模型·安全威胁分析
众壹新能源科技4 小时前
逆变器半夜停机等备件48小时少发10万度电,备件安全库存怎么算
大数据·运维·安全
国科安芯5 小时前
ASP4644系列抗辐射电源模块的国产化进程、供应链安全与产业生态综述
人工智能·物联网·安全·电池·电源芯片·低轨卫星·抗辐射
Bruce_Liuxiaowei5 小时前
2026年10月第4周网络安全形势周报
安全·web安全·网络安全
愤怒火龙果5 小时前
AIGC 安全学习笔记02 后门攻击・LLM 安全靶场・提示词注入
学习·安全·aigc
安教安全员通关宝5 小时前
2026年江西安全员A证考试题库+答案+解析
安全
脏脏a6 小时前
从“远程桌面”到“设备接力”:2026年六款远控软件跨端协作与安全横评
安全
Linux运维技术栈6 小时前
CVE-2026-91403 高危漏洞预警:Java JSSE 信任链被攻破 全场景修复方案与Linux系统级彻底清理实操
java·linux·安全·jdk·信任链