没有合适的资源?快使用搜索试试~ 我知道了~
首页PKCS#7 加密消息语法标准.doc
资源详情
资源评论
资源推荐

PKCS #7:加密消息语法标准
(Cryptographic Message
Syntax Standard)
An RSA Laboratories Technical Note
Version 1.5
Revised November 1, 1993
*
1. 范围
这一标准描述了待加密数据的一般语法,比如数字签名和数字信封。该语法允许递
归,如一个信封能够包含在另一个当中,或者一方能够对一已存在的封装数据进行
签名。它也允许专有的属性和消息的内容一起被鉴别,比如签名时间,并且提供其
他属性如伴随着签名的连属(countersignature)。该语法的一个简化版提供了发
布证书和CRL的方法。
这一标准和PEM(Privacy-Enhance Mail)兼容,体现在签名数据和签名并封装
的数据内容上,以一种PEM兼容格式构成,并能够在无需任何加密操作的情况下
转换成PEM消息。类似地,PEM消息也能转换成签名数据和签名封装数据的内容
格式。
这一标准能够支持多种基于认证的密钥管理体系结构,比如它的一个提议已收录在
PEM[RFC1422]中。一些体系结构上的决定比如何种证书颁发者才是“顶级”的,
何种实体证书颁发者应被授权,何种可辨别名能够被接受以及颁发者应该遵循怎样
的证书策略等等这些问题不在本标准讨论范围之内。
由这一标准产生的值可能是BER编码的,这意味着该值会以8位字节串(octet
string)的形式表示。众所周知,虽然许多系统能够可靠地传输专有的8位字节串,
但很多电子邮件系统并没有这么做。这一标准并不寻找编码8位字节串的机制,像
*
Supersedes June 3, 1991 version, which was also published as NIST/OSI Implementors'
Workshop document SEC-SIG-91-22. PKCS documents are available by electronic mail to
<pkcs@rsa.com>.
Copyright 1991–1993 RSA Laboratories, a division of RSA Data Security, Inc.
License to copy this document is granted provided that it is identi<ed as "RSA Data
Security, Inc. Public-Key Cryptography Standards (PKCS)" in all material
mentioning or referencing this document.
003-903022-150-000-000

1. 范围 Page 2
ASCII字符串或者 其 他 保 证 可 靠 传输的 re-encoding 8 位字节 串 技 术 。 RFC
1421 对该问题提出了可能的解决方法。
2. 参考
FIPS PUB 46–1 National Bureau of Standards. FIPS PUB 46–1: Data Encryption
Standard. January 1988.
PKCS #1 RSA Laboratories. PKCS #1: RSA Encryption Standard. Version 1.5,
November 1993.
PKCS #6 RSA Laboratories. PKCS #6: Extended-Certi"cate Syntax Standard.
Version 1.5, November 1993.
PKCS #9 RSA Laboratories. PKCS #9: Selected Attribute Types. Version 1.1,
November 1993.
RFC 1421 J. Linn. RFC 1421: Privacy Enhancement for Internet Electronic Mail:
Part I: Message Encryption and Authentication Procedures. February
1993.
RFC 1422 S. Kent. RFC 1422: Privacy Enhancement for Internet Electronic Mail:
Part II: Certi"cate-Based Key Management. February 1993.
RFC 1423 D. Balenson. RFC 1423: Privacy Enhancement for Internet Electronic
Mail: Part III: Algorithms, Modes, and Identi"ers. February 1993.
RFC 1424 B. Kaliski. RFC 1424: Privacy Enhancement for Internet Electronic
Mail: Part IV: Key Certi"cation and Related Services. February 1993.
RFC 1319 B. Kaliski. RFC 1319: The MD2 Message-Digest Algorithm. April 1992.
RFC 1321 R. Rivest. RFC 1321: The MD5 Message-Digest Algorithm. April 1992.
X.208 CCITT. Recommendation X.208: Speci"cation of Abstract Syntax
Notation One (ASN.1). 1988.
X.209 CCITT. Recommendation X.209: Speci"cation of Basic Encoding Rules
for Abstract Syntax Notation One (ASN.1). 1988.
X.500 CCITT. Recommendation X.500: The Directory—Overview of
Concepts, Models and Services. 1988.
X.501 CCITT. Recommendation X.501: The Directory—Models. 1988.
X.509 CCITT. Recommendation X.509: The Directory—Authentication
Framework. 1988.
[NIST91] NIST. Special Publication 500-202: Stable Implementation
Agreements for Open Systems Interconnection Protocols. Version 5,
Edition 1, Part 12. December 1991.

2. 参考 Page 3
[RSA78] R.L. Rivest, A. Shamir, and L. Adleman. A method for obtaining digital
signatures and public-key cryptosystems. Communications of the
ACM, 21(2):120–126, February 1978.
3. 定义
For the purposes of this standard, the following de<nitions apply.
AlgorithmIdentifier: A type that identi<es an algorithm (by object
identi<er) and associated parameters. This type is de<ned in X.509.
ASN.1: Abstract Syntax Notation One, as de<ned in X.208.
Attribute: A type that contains an attribute type (speci<ed by object
identi<er) and one or more attribute values. This type is de<ned in
X.501.
BER: Basic Encoding Rules, as de<ned in X.209.
Certificate: A type that binds an entity's distinguished name to a
public key with a digital signature. This type is de<ned in X.509. This
type also contains the distinguished name of the certi<cate issuer (the
signer), an issuer-speci<c serial number, the issuer's signature
algorithm identi<er, and a validity period.
CertificateSerialNumber: A type that uniquely identi<es a
certi<cate (and thereby an entity and a public key) among those
signed by a particular certi<cate issuer. This type is de<ned in X.509.
CertificateRevocationList: A type that contains information about
certi<cates whose validity an issuer has prematurely revoked. The
information consists of an issuer name, the time of issue, the next
scheduled time of issue, and a list of certi<cate serial numbers and
their associated revocation times. The CRL is signed by the issuer.
The type intended by this standard is the one de<ned RFC 1422.
DER: Distinguished Encoding Rules for ASN.1, as de<ned in X.509,
Section 8.7.
DES: Data Encryption Standard, as de<ned in FIPS PUB 46-1.
desCBC: The object identi<er for DES in cipher-block chaining (CBC)
mode, as de<ned in [NIST91].
ExtendedCertificate: A type that consists of an X.509 public-key
certi<cate and a set of attributes, collectively signed by the issuer of
the X.509 public-key certi<cate. This type is de<ned in PKCS #6.

3. 定义 Page 4
MD2: RSA Data Security, Inc.'s MD2 message-digest algorithm, as
de<ned in RFC 1319.
md2: The object identi<er for MD2, as de<ned in RFC 1319.
MD5: RSA Data Security, Inc.'s MD5 message-digest algorithm, as
de<ned in RFC 1321.
md5: The object identi<er for MD5, as de<ned in RFC 1321.
Name: A type that uniquely identi<es or "distinguishes" objects in an
X.500 directory. This type is de<ned in X.501. In an X.509 certi<cate,
the type identi<es the certi<cate issuer and the entity whose public
key is certi<ed.
PEM: Internet Privacy-Enhanced Mail, as de<ned in RFCs 1421–1424.
RSA: The RSA public-key cryptosystem, as de<ned in [RSA78].
rsaEncryption: The object identi<er for RSA encryption, as de<ned in
PKCS #1.
4. 符号和缩略语
No symbols or abbreviations are de<ned in this standard.
5. 概述
下面的9节指定了有用的类型,通用的语法,六种内容类型和对象标识符。
语法通常足够支持多种不同的内容类型。这一标准定义了六个:数据,签名数据,
封装数据,签名封装数据,摘要数据和加密数据。其他内容类型可在未来再加入。
可以使用此标准之外定义的内容类型,但是只限于双方对交换内容达成一致的情况。
这一标准输出一种类型、ContentInfo以及各种对象标志符。
有两种内容类型:基本的和增强的。基本的内容类型仅包含数据,没有进行加密。
目前有一种内容类型是属于这一类的,即数据内容类型。增强的内容类型包含一些
类型(如加密),并有其他一些密码方面的提高。比如,封装数据内容能包含(将
其加密)签名数据内容,签名数据内容又能够包含数据内容。四种非数据内容类型
属于增强的类别。增强的内容类型使用封装,引发了术语“外部”内容(包含增强特
性的)和“内部”内容(得到增强的)。

5. 概述 Page 5
这一标准的设计使用不定长BER编码来使增强内容类型能够在一个single-pass中
准备好,并用任意BER编码在一个single-pass中处理。如果内容是存储在磁带上
或是从其他进程“管道”传递而来,则single-pass操作特别有用。single-pass的一
个缺点就是在single-pass的过程中难以输出一个DER编码,因为它的不同组件的
长度不能预先知道。由于签名数据、签名封装数据和摘要数据的内容类型都需要
DER编码,当一个非数据内容类型是那些内容类型中的一个内部内容时,就需要
一个额外的传递。
6. 有用的类型
这一节定义了在标准中至少两个地方有用的类型
6.1 CerticateRevocationLists
CertificateRevocationLists 类型给定一个证书撤销列表的集合。它表示集
合中包含足够的信息来决定集合中的证书是否是”hot listed”的,但是可能有多于
必要的证书撤销列表,也可能少于必要的。
CertificateRevocationLists ::=
SET OF CertificateRevocationList
6.2 ContentEncryptionAlgorithmIdentier
ContentEncryptionAlgorithmIdentifier类型确定一个内容加密算法比如
DES。一个内容加密算法支持加密和解密操作。加密操作用一个内容加密密钥把一
个8位字节串(消息)映射为另一个8位字节串(密文)。解密操作和加密操作相
反。由上下文确定使用哪 个操作。
ContentEncryptionAlgorithmIdentifier ::=
AlgorithmIdentifier
6.3 DigestAlgorithmIdentier
DigestAlgorithmIdentifier 类 型 确 定 一 个 消 息 摘 要 算 法 。 例 如 MD2 和
MD5。一个消息摘要算法把一个8位字节串(消息)映射位另一个8位字节串(消
息摘要)。
DigestAlgorithmIdentifier ::= AlgorithmIdentifier
6.4 DigestEncryptionAlgorithmIdentier
DigestEncryptionAlgorithmIdentifier类型确定一个摘要加密算法(可用
来加密消息摘要)。 一个例子就是PKCS #1的rsaEncryption。一个摘要加密
剩余24页未读,继续阅读















安全验证
文档复制为VIP权益,开通VIP直接复制

评论12