跳到主要内容

3.2. 签名证书时间戳的结构

3.2. 签名证书时间戳的结构

    enum { certificate_timestamp(0), tree_hash(1), (255) }
SignatureType;

enum { v1(0), (255) }
Version;

struct {
opaque key_id[32];
} LogID;

opaque TBSCertificate<1..2^24-1>;

struct {
opaque issuer_key_hash[32];
TBSCertificate tbs_certificate;
} PreCert;

opaque CtExtensions<0..2^16-1>;

"key_id"是日志公钥的SHA-256哈希,通过表示为SubjectPublicKeyInfo的密钥的DER编码计算。

"issuer_key_hash"是证书颁发者公钥的SHA-256哈希,通过表示为SubjectPublicKeyInfo的密钥的DER编码计算。这是将颁发者绑定到最终证书所必需的。

"tbs_certificate"是预证书的DER编码TBSCertificate(见[RFC5280])组件——即没有签名和毒扩展。如果预证书不是用将颁发最终证书的CA证书签名的,则TBSCertificate的颁发者也更改为将颁发最终证书的CA的颁发者。请注意,也可以通过从最终证书中提取TBSCertificate并删除SCT扩展来从最终证书重建此TBSCertificate。还要注意,由于TBSCertificate包含必须与预证书签名算法和最终证书签名算法都匹配的AlgorithmIdentifier,因此它们必须使用相同的算法和参数进行签名。如果使用预证书签名证书颁发预证书,并且TBSCertificate中存在Authority Key Identifier扩展,则相应的扩展也必须存在于预证书签名证书中——在这种情况下,TBSCertificate的Authority Key Identifier也会更改以匹配最终颁发者。

    struct {
Version sct_version;
LogID id;
uint64 timestamp;
CtExtensions extensions;
digitally-signed struct {
Version sct_version;
SignatureType signature_type = certificate_timestamp;
uint64 timestamp;
LogEntryType entry_type;
select(entry_type) {
case x509_entry: ASN.1Cert;
case precert_entry: PreCert;
} signed_entry;
CtExtensions extensions;
};
} SignedCertificateTimestamp;

digitally-signed元素的编码在[RFC5246]中定义。

"sct_version"是SCT符合的协议版本。此版本是v1。

"timestamp"是当前NTP时间[RFC5905],从纪元(1970年1月1日00:00)开始测量,忽略闰秒,以毫秒为单位。

"entry_type"可能从呈现SCT的上下文中隐式得出。

"signed_entry"是"leaf_certificate"(对于X509ChainEntry)或PreCert(对于PrecertChainEntry),如上所述。

"extensions"是此协议版本(v1)的未来扩展。目前,没有指定扩展。