美文网首页
ASN1数字信封格式

ASN1数字信封格式

作者: 无云清晨 | 来源:发表于2017-11-07 11:34 被阅读0次
   EnvelopedData::= SEQUENCE {
    version Version,                 //版本号
    recipientInfos RecipientInfos,   //接受者信息
    encryptedContentInfo EncryptedContentInfo  //加密后的内容信息
}
接受者集合:
RecipientInfos::= SET OF RecipientInfo
RecipientInfo::= SEQUENCE {
    version Version,   //版本号
    issuerAndSerialNumber     IssuerAndSerialNumber,
    keyEncryptionAlgorithm    KeyEncryptionAlgorithmIdentifier,
    encryptedKey     EncryptedKey 
}
issuerAndSerialNumber指定由颁发者可辨别名和颁发序列号确定的接收者证书。
KeyEncryptionAlgorithmIdentifier
指定用接收者公钥加密内容加密密钥的密钥加密算法和相应的参数。
encryptedKey是内容加密密钥被接收者公钥加密后的结果。

加密后的内容
   EncryptedContentInfo::= SEQUENCE {
    contentType ContentType,  //内容类型
    contentEncryptionAlgorithm  ContentEncryptionAlgorithmIdentifier, 
    encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL
}

ContentEncryptionAlgorithmIdentifier加密内容的加密算法标识。
EncryptedContent::= OCTET STRING
加密后的内容,是可选的。如果该域不存在,应该在其他地方来提供。

内容来自:http://hbaojun.github.io/2014/02/19/PKCS7%E7%BB%93%E6%9E%84%E5%88%86%E6%9E%90%E4%B9%8B%E6%95%B0%E5%AD%97%E4%BF%A1%E5%B0%81/

相关文章

网友评论

      本文标题:ASN1数字信封格式

      本文链接:https://www.haomeiwen.com/subject/jdgdmxtx.html