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 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389
|
<pre>Network Working Group R. Housley
Request for Comments: 4049 Vigil Security
Category: Experimental April 2005
<span class="h1">BinaryTime:</span>
<span class="h1">An Alternate Format for Representing Date and Time in ASN.1</span>
Status of This Memo
This memo defines an Experimental Protocol for the Internet
community. It does not specify an Internet standard of any kind.
Discussion and suggestions for improvement are requested.
Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2005).
Abstract
This document specifies a new ASN.1 type for representing time:
BinaryTime. This document also specifies an alternate to the
signing-time attribute for use with the Cryptographic Message Syntax
(CMS) SignedData and AuthenticatedData content types; the binary-
signing-time attribute uses BinaryTime. CMS and the signing-time
attribute are defined in <a href="./rfc3852">RFC 3852</a>.
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
This document specifies a new ASN.1 [<a href="#ref-ASN1">ASN1</a>] type for representing
time: BinaryTime. This ASN.1 type can be used to represent date and
time values.
This document also specifies an alternative to the signing-time
attribute used with the Cryptographic Message Syntax (CMS) [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>]
SignedData and AuthenticatedData content types, allowing the
BinaryTime type to be used instead of the traditional UTCTime and
GeneralizedTime types.
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. BinaryTime</span>
Many operating systems represent date and time as an integer. This
document specifies an ASN.1 type for representing date and time in a
manner that is also an integer. Although some conversion may be
necessary due to the selection of a different epoch or a different
granularity, an integer representation has several advantages over
the UTCTime and GeneralizedTime types.
<span class="grey">Housley Experimental [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc4049">RFC 4049</a> BinaryTime April 2005</span>
First, a BinaryTime value is smaller than either a UTCTime or a
GeneralizedTime value.
Second, in some operating systems, the value can be used with little
or no conversion. Conversion, when it is needed, requires only
straightforward computation. If the endian ordering is different
from the ASN.1 representation of an INTEGER, then straightforward
manipulation is needed to obtain an equivalent integer value. If the
epoch is different than the one chosen for BinaryTime, addition or
subtraction is needed to compensate. If the granularity is something
other than seconds, then multiplication or division is needed to
compensate. Also, padding may be needed to convert the variable-
length ASN.1 encoding of INTEGER to a fixed-length value used in the
operating system.
Third, date comparison is very easy with BinaryTime. Integer
comparison is easy, even when multi-precision integers are involved.
Date comparison with UTCTime or GeneralizedTime can be complex when
the two values to be compared are provided in different time zones.
This is a rare instance which both memory and processor cycles can be
saved.
<span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a>. Binary Signing Time Attribute</span>
The signing-time attribute is defined in [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>]. The alternative
binary-signing-time attribute is defined in this document in order to
obtain the benefits of the BinaryTime type.
<span class="h3"><a class="selflink" id="section-1.3" href="#section-1.3">1.3</a>. Terminology</span>
In this document, the key words MUST, MUST NOT, REQUIRED, SHOULD,
SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL are to be interpreted as
described in [<a href="#ref-STDWORDS" title=""Key words for use in RFCs to Indicate Requirement Levels"">STDWORDS</a>].
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. BinaryTime Definition</span>
The BinaryTime ASN.1 type is used to represent an absolute time and
date. A positive integer value is used to represent time values
based on coordinated universal time (UTC), which is also called
Greenwich Mean Time (GMT) and ZULU clock time.
The syntax for BinaryTime is:
BinaryTime ::= INTEGER (0..MAX)
<span class="grey">Housley Experimental [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc4049">RFC 4049</a> BinaryTime April 2005</span>
The integer value is the number of seconds, excluding leap seconds,
after midnight UTC, January 1, 1970. This time format cannot
represent time values prior to January 1, 1970. The latest UTC time
value that can be represented by a four-octet integer value is
03:14:07 on January 19, 2038, which is represented by the hexadecimal
value 7FFFFFFF. Time values beyond 03:14:07 on January 19, 2038, are
represented by integer values that are longer than four octets, and a
five-octet integer value is sufficient to represent dates covering
the next seventeen millennia.
This specification uses a variable-length encoding of INTEGER. This
permits any time value after midnight UTC, January 1, 1970, to be
represented.
When encoding an integer value that consists of more than one octet,
which includes almost all the time values of interest, the bits of
the first octet and bit 8 of the second octet MUST NOT all be ones or
all zeros. This rule ensures that an integer value is always encoded
in the smallest possible number of octets. However, it means that
implementations cannot assume a fixed length for the integer value.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Binary Signing Time Attribute Definition</span>
The binary-signing-time attribute type specifies the time at which
the signer (purportedly) performed the signing process. The binary-
signing-time attribute type is intended for use in the CMS SignedData
content type; however, the attribute can also be used with the
AuthenticatedData content type.
The binary-signing-time attribute MUST be a signed attribute or an
authenticated attribute; it MUST NOT be an unsigned attribute,
unauthenticated attribute, or unprotected attribute.
The following object identifier identifies the binary-signing-time
attribute:
id-aa-binarySigningTime OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) aa(2) 46 }
The binary-signing-time attribute values have ASN.1 type
BinarySigningTime:
BinarySigningTime ::= BinaryTime
<span class="grey">Housley Experimental [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc4049">RFC 4049</a> BinaryTime April 2005</span>
In [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>], the SignedAttributes syntax and the AuthAttributes syntax
are each defined as a SET OF Attributes. However, the binary-
signing-time attribute MUST have a single attribute value, even
though the syntax is defined as a SET OF AttributeValue. There MUST
NOT be zero or multiple instances of AttributeValue present.
The SignedAttributes contained in the signerInfo structure within
SignedData MUST NOT include multiple instances of the binary-
signing-time attribute. Similarly, the AuthAttributes in an
AuthenticatedData MUST NOT include multiple instances of the binary-
signing-time attribute.
No requirement is imposed concerning the correctness of the signing
time itself, and acceptance of a purported signing time is a matter
of a recipient's discretion. It is expected, however, that some
signers, such as time-stamp servers, will be trusted implicitly.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. References</span>
This section provides normative and informative references.
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Normative References</span>
[<a id="ref-ASN1">ASN1</a>] CCITT. Recommendation X.208: Specification of Abstract
Syntax Notation One (ASN.1). 1988.
[<a id="ref-CMS">CMS</a>] Housley, R., "Cryptographic Message Syntax (CMS)", <a href="./rfc3852">RFC</a>
<a href="./rfc3852">3852</a>, July 2004.
[<a id="ref-STDWORDS">STDWORDS</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. Informative References</span>
[<a id="ref-TSP">TSP</a>] Adams, C., Cain, P., Pinkas, D., and R. Zuccherato,
"Internet X.509 Public Key Infrastructure Time-Stamp
Protocol (TSP)", <a href="./rfc3161">RFC 3161</a>, August 2001.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Security Considerations</span>
Use of the binary-signing-time attribute does not necessarily provide
confidence in the time when the signature value was produced.
Therefore, acceptance of a purported signing time is a matter of a
recipient's discretion. <a href="./rfc3161">RFC 3161</a> [<a href="#ref-TSP" title=""Internet X.509 Public Key Infrastructure Time-Stamp Protocol (TSP)"">TSP</a>] specifies a protocol for
obtaining time stamps from a trusted entity.
<span class="grey">Housley Experimental [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc4049">RFC 4049</a> BinaryTime April 2005</span>
The original signing-time attribute defined in [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>] has the same
semantics as the binary-signing-time attribute specified in this
document. Therefore, only one of these attributes SHOULD be present
in the signedAttrs of a SignerInfo object or in the authAttrs of an
AuthenticatedData object. However, if both of these attributes are
present, they MUST provide the same date and time.
<span class="grey">Housley Experimental [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc4049">RFC 4049</a> BinaryTime April 2005</span>
Appendix A: ASN.1 Module
The ASN.1 module contained in this appendix defines the structures
that are needed to implement this specification. It is expected to
be used in conjunction with the ASN.1 modules in [<a href="#ref-CMS" title=""Cryptographic Message Syntax (CMS)"">CMS</a>].
BinarySigningTimeModule
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
pkcs-9(9) smime(16) modules(0) 27 }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
-- BinaryTime Definition
BinaryTime ::= INTEGER (0..MAX)
-- Signing Binary Time Attribute
id-aa-binarySigningTime OBJECT IDENTIFIER ::= { iso(1)
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
smime(16) aa(2) 46 }
BinarySigningTime ::= BinaryTime
END
Author's Address
Russell Housley
Vigil Security, LLC
918 Spring Knoll Drive
Herndon, VA 20170
USA
EMail: housley@vigilsec.com
<span class="grey">Housley Experimental [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc4049">RFC 4049</a> BinaryTime April 2005</span>
Full Copyright Statement
Copyright (C) The Internet Society (2005).
This document is subject to the rights, licenses and restrictions
contained in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a>, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM 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.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and <a href="https://www.rfc-editor.org/bcp/bcp79">BCP 79</a>.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
<a href="http://www.ietf.org/ipr">http://www.ietf.org/ipr</a>.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at ietf-
ipr@ietf.org.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Housley Experimental [Page 7]
</pre>
|