-
Notifications
You must be signed in to change notification settings - Fork 4
/
78.txt
141 lines (103 loc) · 6.4 KB
/
78.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
[7] [DFN[[[CMS]]]] / [DFN[[[PKCS #7]]]] は、[[暗号化]]や[[署名]]が行われたデータを表現する構文
(の[[仕様書]]) です。
* 仕様書
[REFS[
- [21] [CITE@en[RFC 5652 - Cryptographic Message Syntax (CMS)]] ([TIME[2015-03-25 06:18:53 +09:00]] 版) <https://tools.ietf.org/html/rfc5652>
- [24] [CITE@en-US[NSS Certificate Download Specification - Mozilla | MDN]] ([TIME[2014-05-07 16:41:21 +09:00]] 版) <https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Certificate_Download_Specification>
]REFS]
* 文脈
[19] [[PKCS #7]] で規定されるデータ構造は次の場面で使われています。
[FIG(short list)[
- [[PKCS #7証明書鎖]] (>>8)
- [[PKCS #12]]
- [[Netscape Certificate Sequence]]
- [CODE(MIME)@en[[[application/x-x509-ca-ra-cert]]]]
- [CODE(MIME)@en[[[application/x-x509-next-ca-cert]]]]
]FIG]
* PKCS #7 証明書鎖
[8] [DFN[[RUBYB[PKCS #7 証明書鎖][PKCS#7 certificate chain]]]] [SRC[>>24]] や
「[[PKCS #7]] 形式」、[[拡張子]] [CODE[[[.p7b]]]] で表されるデータ形式は、
[[証明書]]群や [[CRL]] をまとめたものです。
[25] [[NSS]] や [[Windows]] などで使われています。
[22] [[Windows]] では「Cryptographic Message Syntax Standard - PKCS #7 証明書」
と呼ばれています。
;; [12] [[Windows]] には標準で [CODE[.p7b]] ファイルの内容を表示できるビューアーが入っているようです。
;; [14] [[拡張子]]は他に [CODE[[[.spc]]]], [CODE[[[.p7a]]]], [CODE[[[.p7c]]]] [SRC[>>13]] や
[CODE[[[.p7]]]] が使われることがあるようです。いずれも実質的に同じデータ形式を指しているらしいです。
[9] これは [[PKCS #7]] の [CODE[[[SignedData]]]] データ構造のみを用いて、
1つ以上の[[証明書]]を含めたものです [SRC[>>24]]。
[CODE[[[version]]]], [CODE[[[digestAlgorithms]]]],
[CODE[[[contentInfo]]]], [CODE[[[crls]]]], [CODE[[[signerInfos]]]]
は無視されます [SRC[>>24]]。
;; [28] しかし [[CRL]] を含めることもあるようです [SRC[>>27]]。
[20] [[ASN.1]] 仕様上[[証明書]]の順番は保持できないようです [SRC[>>5]] が、
[[証明書ダウンロード]]仕様としては順序が意味を持ちます。実際にどう扱われているのかは不明です。
[10] [[certification path]] 上の[[証明書]]をまとめて1つのファイルとして扱う時などに使われます。
[11] 本形式は [[BER]] によって符号化された[[バイナリーファイル]]といわれます。
[29] しかし [[DER]] が使われることもあるようです [SRC[>>23, >>27]]。
[26] 更に [CODE[[[.pem]]]] 形式で符号化されて[[証明書ダウンロード]]に用いられることがあります。
(そのままで[[証明書ダウンロード]]に用いられることもあります。)
* 歴史
[FIG(quote)[
[FIGCAPTION[
[1] [CITE[RSA Laboratories - PKCS #7: Cryptographic Message Syntax Standard]]
([TIME[2015-04-07 12:20:24 +09:00]] 版)
<http://www.emc.com/emc-plus/rsa-labs/standards-initiatives/pkcs-7-cryptographic-message-syntax-standar.htm>
]FIGCAPTION]
> This standard describes general syntax for data that may have cryptography applied to it, such as digital signatures and digital envelopes.
> In support of the SET protocol for secure electronic transactions, RSA Laboratories has produced a bulletin detailing changes to be made to PKCS #7 version 1.5 to update it to version 1.6 (which has not yet been published). Version 1.5 is still recommended for general use, and is the basis for the S/MIME specification.
]FIG]
[3] [CITE@ja[PKCS #7 ファイル内の証明書を表示する]]
([TIME[2015-04-07 12:37:49 +09:00]] 版)
<https://msdn.microsoft.com/ja-jp/library/cc758042(v=ws.10).aspx>
[4] [CITE@ja[PKCS#7 から PKCS#12 への変換 - あきそふと開発日記]]
([TIME[2015-04-07 12:38:29 +09:00]] 版)
<http://akisoftware.com/cgi-bin/blom.exe?akisoft+sl+2df3bf285450ec962202070ee9f87c3591c3d74f>
[5] [CITE[tls - What's the difference between X.509 and PKCS#7 Certificate? - Information Security Stack Exchange]]
([TIME[2015-04-07 12:38:40 +09:00]] 版)
<http://security.stackexchange.com/questions/73156/whats-the-difference-between-x-509-and-pkcs7-certificate>
[6] [CITE[荐惹�吾��<ゃ�就綣��ゃ�]]
([TIME[2009-05-14 20:39:44 +09:00]] �)
<http://moca.wide.ad.jp/moca_guide/about_fileformat.html>
[FIG(quote)[
[FIGCAPTION[
[13] [CITE[Certificates]]
([TIME[2008-09-01 17:55:10 +09:00]] 版)
<http://supportline.microfocus.com/documentation/books/nx51ws01/cjcert.htm>
]FIGCAPTION]
> As well as the original PKCS #7, there are three revisions: a, b, and c. The standard extensions for these four versions are .spc, .p7a, .p7b and .p7c respectively.
]FIG]
[REFS[
- [16] [CITE@en[RFC 2311 - S/MIME Version 2 Message Specification]]
([TIME[2015-02-08 22:38:58 +09:00]] 版)
<https://tools.ietf.org/html/rfc2311#section-3.2>
- [2] [CITE@en[RFC 2315 - PKCS #7: Cryptographic Message Syntax Version 1.5]]
([TIME[2015-01-18 22:47:06 +09:00]] 版)
<https://tools.ietf.org/html/rfc2315>
- [15] [CITE@en[RFC 5751 - Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 3.2 Message Specification]]
([TIME[2015-02-18 20:19:43 +09:00]] 版)
<https://tools.ietf.org/html/rfc5751#section-3.2>
]REFS]
[FIG(quote)[
[FIGCAPTION[
[17] [CITE@en[RFC 2311 - S/MIME Version 2 Message Specification]]
([TIME[2015-02-08 22:38:58 +09:00]] 版)
<https://tools.ietf.org/html/rfc2311#appendix-C.1>
]FIGCAPTION]
> Some early implementations of S/MIME agents used the following MIME
> types:
> application/x-pkcs7-mime
> application/x-pkcs7-signature
]FIG]
[18] [CITE@en[243833 – Attachments of Content-Type: application/pkcs7-mime that contain non-standard contents fail to decode and are not shown]]
([TIME[2015-04-07 23:32:42 +09:00]] 版)
<https://bugzilla.mozilla.org/show_bug.cgi?id=243833>
[23] [CITE[pkcs7 - PKCS#7 utility]]
([TIME[2015-04-11 00:07:01 +09:00]] 版)
<https://www.openssl.org/docs/apps/pkcs7.html>
[27] [CITE[crl2pkcs7 - Create a PKCS#7 structure from a CRL and certificates.]]
([TIME[2015-04-12 12:52:55 +09:00]] 版)
<https://www.openssl.org/docs/apps/crl2pkcs7.html>
[30] [CITE@en[RFC 3335 - MIME-based Secure Peer-to-Peer Business Data Interchange over the Internet]]
([TIME[2015-03-08 18:20:36 +09:00]] 版)
<http://tools.ietf.org/html/rfc3335#section-5.2>