7 Network Working Group T. Howes
8 Request for Comments: 1778 University of Michigan
9 Obsoletes: 1488 S. Kille
10 Category: Standards Track ISODE Consortium
12 Performance Systems International
18 The String Representation of Standard Attribute Syntaxes
22 This document specifies an Internet standards track protocol for the
23 Internet community, and requests discussion and suggestions for
24 improvements. Please refer to the current edition of the "Internet
25 Official Protocol Standards" (STD 1) for the standardization state
26 and status of this protocol. Distribution of this memo is unlimited.
30 The Lightweight Directory Access Protocol (LDAP) [9] requires that
31 the contents of AttributeValue fields in protocol elements be octet
32 strings. This document defines the requirements that must be
33 satisfied by encoding rules used to render X.500 Directory attribute
34 syntaxes into a form suitable for use in the LDAP, then goes on to
35 define the encoding rules for the standard set of attribute syntaxes
36 defined in [1,2] and [3].
38 1. Attribute Syntax Encoding Requirements.
40 This section defines general requirements for lightweight directory
41 protocol attribute syntax encodings. All documents defining attribute
42 syntax encodings for use by the lightweight directory protocols are
43 expected to conform to these requirements.
45 The encoding rules defined for a given attribute syntax must produce
46 octet strings. To the greatest extent possible, encoded octet
47 strings should be usable in their native encoded form for display
48 purposes. In particular, encoding rules for attribute syntaxes
49 defining non-binary values should produce strings that can be
50 displayed with little or no translation by clients implementing the
51 lightweight directory protocols.
58 Howes, Kille, Yeong & Robbins [Page 1]
60 RFC 1778 Syntax Encoding March 1995
63 2. Standard Attribute Syntax Encodings
65 For the purposes of defining the encoding rules for the standard
66 attribute syntaxes, the following auxiliary BNF definitions will be
69 <a> ::= 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' |
70 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' |
71 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | 'A' |
72 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' |
73 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' |
74 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z'
76 <d> ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
78 <hex-digit> ::= <d> | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' |
79 'A' | 'B' | 'C' | 'D' | 'E' | 'F'
81 <k> ::= <a> | <d> | '-'
83 <p> ::= <a> | <d> | ''' | '(' | ')' | '+' | ',' | '-' | '.' |
86 <CRLF> ::= The ASCII newline character with hexadecimal value 0x0A
88 <letterstring> ::= <a> | <a> <letterstring>
90 <numericstring> ::= <d> | <d> <numericstring>
92 <keystring> ::= <a> | <a> <anhstring>
94 <anhstring> ::= <k> | <k> <anhstring>
96 <printablestring> ::= <p> | <p> <printablestring>
98 <space> ::= ' ' | ' ' <space>
102 Values of type Undefined are encoded as if they were values of type
103 Octet String, with the string value being the BER-encoded version of
106 2.2. Case Ignore String
108 A string of type caseIgnoreStringSyntax is encoded as the string
114 Howes, Kille, Yeong & Robbins [Page 2]
116 RFC 1778 Syntax Encoding March 1995
119 2.3. Case Exact String
121 The encoding of a string of type caseExactStringSyntax is the string
124 2.4. Printable String
126 The encoding of a string of type printableStringSyntax is the string
131 The encoding of a string of type numericStringSyntax is the string
136 The encoding of a string of type octetStringSyntax is the string
139 2.7. Case Ignore IA5 String
141 The encoding of a string of type caseIgnoreIA5String is the string
146 The encoding of a string of type iA5StringSyntax is the string value
151 The encoding of a string of type t61StringSyntax is the string value
154 2.10. Case Ignore List
156 Values of type caseIgnoreListSyntax are encoded according to the
159 <caseignorelist> ::= <caseignorestring> |
160 <caseignorestring> '$' <caseignorelist>
162 <caseignorestring> ::= a string encoded according to the rules for Case
163 Ignore String as above.
170 Howes, Kille, Yeong & Robbins [Page 3]
172 RFC 1778 Syntax Encoding March 1995
175 2.11. Case Exact List
177 Values of type caseExactListSyntax are encoded according to the
180 <caseexactlist> ::= <caseexactstring> |
181 <caseexactstring> '$' <caseexactlist>
183 <caseexactstring> ::= a string encoded according to the rules for Case
184 Exact String as above.
186 2.12. Distinguished Name
188 Values of type distinguishedNameSyntax are encoded to have the
189 representation defined in [5].
193 Values of type booleanSyntax are encoded according to the following
196 <boolean> ::= "TRUE" | "FALSE"
198 Boolean values have an encoding of "TRUE" if they are logically true,
199 and have an encoding of "FALSE" otherwise.
203 Values of type integerSyntax are encoded as the decimal
204 representation of their values, with each decimal digit represented
205 by the its character equivalent. So the digit 1 is represented by the
208 2.15. Object Identifier
210 Values of type objectIdentifierSyntax are encoded according to the
213 <oid> ::= <descr> | <descr> '.' <numericoid> | <numericoid>
215 <descr> ::= <keystring>
217 <numericoid> ::= <numericstring> | <numericstring> '.' <numericoid>
219 In the above BNF, <descr> is the syntactic representation of an
220 object descriptor. When encoding values of type
221 objectIdentifierSyntax, the first encoding option should be used in
222 preference to the second, which should be used in preference to the
226 Howes, Kille, Yeong & Robbins [Page 4]
228 RFC 1778 Syntax Encoding March 1995
231 third wherever possible. That is, in encoding object identifiers,
232 object descriptors (where assigned and known by the implementation)
233 should be used in preference to numeric oids to the greatest extent
234 possible. For example, in encoding the object identifier representing
235 an organizationName, the descriptor "organizationName" is preferable
236 to "ds.4.10", which is in turn preferable to the string "2.5.4.10".
238 2.16. Telephone Number
240 Values of type telephoneNumberSyntax are encoded as if they were
241 Printable String types.
245 Values of type telexNumberSyntax are encoded according to the
248 <telex-number> ::= <actual-number> '$' <country> '$' <answerback>
250 <actual-number> ::= <printablestring>
252 <country> ::= <printablestring>
254 <answerback> ::= <printablestring>
256 In the above, <actual-number> is the syntactic representation of the
257 number portion of the TELEX number being encoded, <country> is the
258 TELEX country code, and <answerback> is the answerback code of a
261 2.18. Teletex Terminal Identifier
263 Values of type teletexTerminalIdentifier are encoded according to the
266 <teletex-id> ::= <printablestring> 0*('$' <ttx-parm>)
268 <ttx-param> ::= <ttx-key> ':' <ttx-value>
270 <ttx-key> ::= 'graphic' | 'control' | 'misc' | 'page' | 'private'
272 <ttx-value> ::= <octetstring>
274 In the above, the first <printablestring> is the encoding of the
275 first portion of the teletex terminal identifier to be encoded, and
276 the subsequent 0 or more <printablestrings> are subsequent portions
277 of the teletex terminal identifier.
282 Howes, Kille, Yeong & Robbins [Page 5]
284 RFC 1778 Syntax Encoding March 1995
287 2.19. Facsimile Telephone Number
289 Values of type FacsimileTelephoneNumber are encoded according to the
292 <fax-number> ::= <printablestring> [ '$' <faxparameters> ]
294 <faxparameters> ::= <faxparm> | <faxparm> '$' <faxparameters>
296 <faxparm> ::= 'twoDimensional' | 'fineResolution' | 'unlimitedLength' |
297 'b4Length' | 'a3Width' | 'b4Width' | 'uncompressed'
299 In the above, the first <printablestring> is the actual fax number,
300 and the <faxparm> tokens represent fax parameters.
302 2.20. Presentation Address
304 Values of type PresentationAddress are encoded to have the
305 representation described in [6].
309 Values of type uTCTimeSyntax are encoded as if they were Printable
310 Strings with the strings containing a UTCTime value.
312 2.22. Guide (search guide)
314 Values of type Guide, such as values of the searchGuide attribute,
315 are encoded according to the following BNF:
317 <guide-value> ::= [ <object-class> '#' ] <criteria>
319 <object-class> ::= an encoded value of type objectIdentifierSyntax
321 <criteria> ::= <criteria-item> | <criteria-set> | '!' <criteria>
323 <criteria-set> ::= [ '(' ] <criteria> '&' <criteria-set> [ ')' ] |
324 [ '(' ] <criteria> '|' <criteria-set> [ ')' ]
326 <criteria-item> ::= [ '(' ] <attributetype> '$' <match-type> [ ')' ]
328 <match-type> ::= "EQ" | "SUBSTR" | "GE" | "LE" | "APPROX"
338 Howes, Kille, Yeong & Robbins [Page 6]
340 RFC 1778 Syntax Encoding March 1995
345 Values of type PostalAddress are encoded according to the following
348 <postal-address> ::= <t61string> | <t61string> '$' <postal-address>
350 In the above, each <t61string> component of a postal address value is
351 encoded as a value of type t61StringSyntax.
355 Values of type userPasswordSyntax are encoded as if they were of type
358 2.25. User Certificate
360 Values of type userCertificate are encoded according to the following
363 <certificate> ::= <version> '#' <serial> '#' <signature-algorithm-id>
364 '#' <issuer> '#' <validity> '#' <subject>
365 '#' <public-key-info> '#' <encrypted-sign-value>
367 <version> ::= <integervalue>
369 <serial> ::= <integervalue>
371 <signature-algorithm-id> ::= <algorithm-id>
373 <issuer> ::= an encoded Distinguished Name
375 <validity> ::= <not-before-time> '#' <not-after-time>
377 <not-before-time> ::= <utc-time>
379 <not-after-time> ::= <utc-time>
381 <algorithm-parameters> ::= <null> | <integervalue> |
384 <subject> ::= an encoded Distinguished Name
386 <public-key-info> ::= <algorithm-id> '#' <encrypted-sign-value>
388 <encrypted-sign-value> ::= <hex-string> | <hex-string> '-' <d>
390 <algorithm-id> ::= <oid> '#' <algorithm-parameters>
394 Howes, Kille, Yeong & Robbins [Page 7]
396 RFC 1778 Syntax Encoding March 1995
399 <utc-time> ::= an encoded UTCTime value
401 <hex-string> ::= <hex-digit> | <hex-digit> <hex-string>
405 Values of type cACertificate are encoded as if the values were of
406 type userCertificate.
408 2.27. Authority Revocation List
410 Values of type authorityRevocationList are encoded according to the
413 <certificate-list> ::= <signature-algorithm-id> '#' <issuer> '#' <utc-time>
414 [ '#' <revoked-certificates> ]
415 '#' <signature-algorithm-id>
416 '#' <encrypted-sign-value>
418 <revoked-certificates> ::= 1*( '#' <revoked-certificate> )
419 <signature-algorithm-id> '#' <encrypted-sign-value>
421 <revoked-certificate> ::= <signature-algorithm-id> '#' <issuer> '#'
422 <serial> '#' <utc-time>
424 The syntactic components <signature-algorithm-id>, <issuer>,
425 <encrypted-sign-value>, <utc-time>, <subject> and <serial> have the
426 same definitions as in the BNF for the userCertificate attribute
429 2.28. Certificate Revocation List
431 Values of type certificateRevocationList are encoded as if the values
432 were of type authorityRevocationList.
434 2.29. Cross Certificate Pair
436 Values of type crossCertificatePair are encoded according to the
439 <certificate-pair> ::= <forward> '#' <reverse>
443 <forward> ::= 'forward:' <certificate>
445 <reverse> ::= 'reverse:' <certificate>
450 Howes, Kille, Yeong & Robbins [Page 8]
452 RFC 1778 Syntax Encoding March 1995
455 The syntactic component <certificate> has the same definition as in
456 the BNF for the userCertificate attribute syntax.
458 2.30. Delivery Method
460 Values of type deliveryMethod are encoded according to the following
463 <delivery-value> ::= <pdm> | <pdm> '$' <delivery-value>
465 <pdm> ::= 'any' | 'mhs' | 'physical' | 'telex' | 'teletex' |
466 'g3fax' | 'g4fax' | 'ia5' | 'videotex' | 'telephone'
470 Values of the type otherMailboxSyntax are encoded according to the
473 <otherMailbox> ::= <mailbox-type> '$' <mailbox>
475 <mailbox-type> ::= an encoded Printable String
477 <mailbox> ::= an encoded IA5 String
479 In the above, <mailbox-type> represents the type of mail system in
480 which the mailbox resides, for example "Internet" or "MCIMail"; and
481 <mailbox> is the actual mailbox in the mail system defined by
484 2.32. Mail Preference
486 Values of type mailPreferenceOption are encoded according to the
489 <mail-preference> ::= "NO-LISTS" | "ANY-LIST" | "PROFESSIONAL-LISTS"
493 Values of type MHS OR Address are encoded as strings, according to
494 the format defined in [10].
506 Howes, Kille, Yeong & Robbins [Page 9]
508 RFC 1778 Syntax Encoding March 1995
511 2.34. Distribution List Submit Permission
513 Values of type DLSubmitPermission are encoded as strings, according
514 to the following BNF:
516 <dlsubmit-perm> ::= <dlgroup_label> ':' <dlgroup-value>
517 | <dl-label> ':' <dl-value>
519 <dlgroup-label> ::= 'group_member'
521 <dlgroup-value> ::= <name>
523 <name> ::= an encoded Distinguished Name
525 <dl-label> ::= 'individual' | 'dl_member' | 'pattern'
527 <dl-value> ::= <orname>
529 <orname> ::= <address> '#' <dn>
532 <address> ::= <add-label> ':' <oraddress>
534 <dn> ::= <dn-label> ':' <name>
540 where <oraddress> is as defined in RFC 1327.
544 Values of type Photo are encoded as if they were octet strings
545 containing JPEG images in the JPEG File Interchange Format (JFIF), as
550 Values of type Fax are encoded as if they were octet strings
551 containing Group 3 Fax images as defined in [7].
562 Howes, Kille, Yeong & Robbins [Page 10]
564 RFC 1778 Syntax Encoding March 1995
567 3. Security Considerations
569 Security issues are not discussed in this memo.
573 Many of the attribute syntax encodings defined in this document are
574 adapted from those used in the QUIPU X.500 implementation. The
575 contributions of the authors of the QUIPU implementation in the
576 specification of the QUIPU syntaxes [4] are gratefully acknowledged.
580 [1] The Directory: Selected Attribute Syntaxes. CCITT,
581 Recommendation X.520.
583 [2] Information Processing Systems -- Open Systems Interconnection --
584 The Directory: Selected Attribute Syntaxes.
586 [3] Barker, P., and S. Kille, "The COSINE and Internet X.500 Schema",
587 RFC 1274, University College London, November 1991.
589 [4] The ISO Development Environment: User's Manual -- Volume 5:
590 QUIPU. Colin Robbins, Stephen E. Kille.
592 [5] Kille, S., "A String Representation of Distinguished Names", RFC
593 1779, ISODE Consortium, March 1995.
595 [6] Kille, S., "A String Representation for Presentation Addresses",
596 RFC 1278, University College London, November 1991.
598 [7] Terminal Equipment and Protocols for Telematic Services -
599 Standardization of Group 3 facsimile apparatus for document
600 transmission. CCITT, Recommendation T.4.
602 [8] JPEG File Interchange Format (Version 1.02). Eric Hamilton, C-
603 Cube Microsystems, Milpitas, CA, September 1, 1992.
605 [9] Yeong, W., Howes, T., and S. Kille, "Lightweight Directory Access
606 Protocol", RFC 1777, Performance Systems International,
607 University of Michigan, ISODE Consortium, March 1995.
609 [10] Alvestrand, H., Kille, S., Miles, R., Rose, M., and S. Thompson,
610 "Mapping between X.400 and RFC-822 Message Bodies", RFC 1495,
611 SINTEF DELAB, ISODE Consortium, Soft*Switch, Inc., Dover Beach
612 Consulting, Inc., Soft*Switch, Inc., August 1993.
618 Howes, Kille, Yeong & Robbins [Page 11]
620 RFC 1778 Syntax Encoding March 1995
623 6. Authors' Addresses
626 University of Michigan
629 Ann Arbor, MI 48103-4943
632 Phone: +1 313 747-4454
643 Phone: +44-71-223-4062
644 EMail: S.Kille@isode.com
649 510 Huntmar Park Drive
653 Phone: +1 703-450-8001
654 EMail: yeongw@psilink.com
674 Howes, Kille, Yeong & Robbins [Page 12]