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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
|
Network Working Group P. Gutmann
Request for Comments: 3274 University of Auckland
Category: Standards Track June 2002
Compressed Data Content Type for
Cryptographic Message Syntax (CMS)
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2002). All Rights Reserved.
Abstract
This document defines a format for using compressed data as a
Cryptographic Message Syntax (CMS) content type. Compressing data
before transmission provides a number of advantages, including the
elimination of data redundancy which could help an attacker, speeding
up processing by reducing the amount of data to be processed by later
steps (such as signing or encryption), and reducing overall message
size. Although there have been proposals for adding compression at
other levels (for example at the MIME or SSL level), these don't
address the problem of compression of CMS content unless the
compression is supplied by an external means (for example by
intermixing MIME and CMS).
1. Introduction
This document describes a compressed data content type for CMS. This
is implemented as a new ContentInfo type and is an extension to the
types currently defined in CMS [RFC2630]. CMS implementations SHOULD
include support for the CompressedData content type.
The format of the messages are described in ASN.1 [ASN1].
Gutmann Standards Track [Page 1]
^L
RFC 3274 Compressed Data Content Type for CMS June 2002
The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT",
"RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
interpreted as described in [RFC2119].
1.1 Compressed Data Content Type
The compressed-data content type consists of content of any type,
compressed using a specified algorithm. The following object
identifier identifies the compressed-data content type:
id-ct-compressedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) ct(1) 9 }
The compressed-data content type shall have ASN.1 type
CompressedData:
CompressedData ::= SEQUENCE {
version CMSVersion,
compressionAlgorithm CompressionAlgorithmIdentifier,
encapContentInfo EncapsulatedContentInfo
}
The fields of type CompressedData have the following meanings:
version is the syntax version number. It MUST be 0. Details of
the CMSVersion type are discussed in CMS [RFC2630], section
10.2.5.
compressionAlgorithm is a compression algorithm identifier, as
defined in section 2.
encapContentInfo is the content which is compressed. Details of
the EncapsulatedContentInfo type are discussed in CMS [RFC2630],
section 5.2.
Implementations SHOULD use the SMIMECapabilities attribute to
indicate their ability to process compressed content types. Details
of SMIMECapabilities are discussed in MSG [RFC2633], section 2.5.2.
A compression SMIMECapability consists of the AlgorithmIdentifier for
the supported compression algorithm. In the case of the algorithm
specified in this document, this is id-alg-zlibCompression, as
specified in section 2. Alternatively, the use of compression may be
handled by prior arrangement (for example as part of an
interoperability profile).
Gutmann Standards Track [Page 2]
^L
RFC 3274 Compressed Data Content Type for CMS June 2002
The SMIMECapability SEQUENCE representing the ability to process
content compressed with the algorithm identified by id-alg-
zlibCompression MUST be DER-encoded as the following hexadecimal
string:
30 0D 06 0B 2A 86 48 86 F7 0D 01 09 10 03 08
(but see also the implementation note in section 2.1).
2. Compression Types
CMS implementations that support the CompressedData content type MUST
include support for the ZLIB compression algorithm [RFC1950]
[RFC1951], which has a freely-available, portable and efficient
reference implementation. The following object identifier identifies
ZLIB:
id-alg-zlibCompress OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 8 }
This algorithm has no parameters. The parameters field SHOULD be
encoded as omitted, but MAY be encoded as NULL (see the
implementation note in section 2.1).
2.1. Implementation notes
ZLIB allows for a number of compression levels ranging from good but
slow compression, to less good but fast compression. The compression
level is always compatible with the decompression algorithm, so there
is no need to specify the compression level as an algorithm
parameter.
There are two possible encodings for the ZLIB null parameters field
which arise from the fact that when the 1988 syntax for
AlgorithmIdentifier was translated into the 1997 syntax, the OPTIONAL
associated with the AlgorithmIdentifier parameters got lost. Later
it was recovered via a defect report, but by then, everyone thought
that algorithm parameters were mandatory. Because of this, some
implementations will encode null parameters as an ASN.1 NULL element
and some will omit them entirely (see for example section 12 of CMS
[RFC2630]). Although the correct encoding is to omit the parameters
field, implementations may encounter encodings which use an ASN.1
NULL element for the parameters.
Gutmann Standards Track [Page 3]
^L
RFC 3274 Compressed Data Content Type for CMS June 2002
3. Security Considerations
This RFC is not concerned with security, except for the fact that
compressing data before encryption can enhance the security provided
by other processing steps by reducing the quantity of known plaintext
available to an attacker. However, implementations should be aware
of possible security threats of combining security sensitive material
with possibly untrusted data before the compression and encryption.
This is because information about the sensitive data may be inferred
from knowing the untrusted data and the compression ratio.
4. IANA Considerations
The CompressedData content type and compression algorithms are
identified by object identifiers (OIDs). OIDs were assigned from an
arc contributed to the S/MIME Working Group by RSA Security. Should
additional compression algorithms be introduced, the advocates for
such algorithms are expected to assign the necessary OIDs from their
own arcs. No action by the IANA is necessary for this document or
any anticipated updates.
References
[ASN1] CCITT Recommendation X.208: Specification of Abstract
Syntax Notation One (ASN.1), 1988.
[RFC2119] Bradner, S., "Key Words for Use in RFC's to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC1950] Deutsch, P. and J-L Gailly, "ZLIB Compressed Data Format
Specification version 3.3", RFC 1950, May 1996.
[RFC1951] Deutsch, P., "DEFLATE Compressed Data Format Specification
version 1.3", RFC 1951, May 1996.
[RFC2630] Housley, R., "Cryptographic Message Syntax", RFC 2630, June
1999.
[RFC2633] Rmasdell, B., "S/MIME Version 3 Message Specification", RFC
2633, June 1999.
Gutmann Standards Track [Page 4]
^L
RFC 3274 Compressed Data Content Type for CMS June 2002
Appendix A: ASN.1 Module
CompressedDataContent
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
smime(16) modules(0) compress(11) }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
IMPORTS
CMSVersion, EncapsulatedContentInfo FROM CryptographicMessageSyntax
{ iso(1) member-body(2) us(840) rsadsi(113549)
pkcs(1) pkcs-9(9) smime(16) modules(0) cms(1) }
AlgorithmIdentifier FROM AuthenticationFramework
{ joint-iso-itu-t ds(5) module(1) authenticationFramework(7) 3 };
CompressedData ::= SEQUENCE {
version CMSVersion, -- Always set to 0
compressionAlgorithm CompressionAlgorithmIdentifier,
encapContentInfo EncapsulatedContentInfo
}
CompressionAlgorithmIdentifier ::= AlgorithmIdentifier
-- Algorithm Identifiers
id-alg-zlibCompress OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 8 }
-- Content Type Object Identifiers
id-ct-compressedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) ct(1) 9 }
END
Author Address
Peter Gutmann
University of Auckland
Private Bag 92019
Auckland, New Zealand
EMail: pgut001@cs.auckland.ac.nz
Gutmann Standards Track [Page 5]
^L
RFC 3274 Compressed Data Content Type for CMS June 2002
Full Copyright Statement
Copyright (C) The Internet Society (2002). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Gutmann Standards Track [Page 6]
^L
|