home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_s_z / draft-ylonen-spki-binary-00.txt < prev    next >
Text File  |  1997-07-25  |  54KB  |  1,298 lines

  1.  
  2. Network Working Group                           Tatu Ylonen <ylo@ssh.fi>
  3. INTERNET-DRAFT                               SSH Communications Security
  4. draft-ylonen-spki-binary-00.txt                           April 23, 1997
  5. Expires in six months
  6.  
  7.  
  8.           Proposal for SPKI Certificate Formats and Semantics
  9.  
  10. Status of This memo
  11.  
  12. This document is an Internet-Draft. Internet-Drafts are working
  13. documents of the Internet Engineering Task Force (IETF), its areas,
  14. and its working groups. Note that other groups may also distribute
  15. working documents as Internet-Drafts.
  16.  
  17. Internet-Drafts are draft documents valid for a maximum of six
  18. months and may be updated, replaced, or obsoleted by other documents
  19. at any time. It is inappropriate to use Internet-Drafts as reference
  20. material or to cite them other than as ``work in progress.''
  21.  
  22. To learn the current status of any Internet-Draft, please check
  23. the ``1id-abstracts.txt'' listing contained in the Internet-Drafts
  24. Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  25. munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast),
  26. or ftp.isi.edu (US West Coast).
  27.  
  28. Abstract
  29.  
  30. This document is a proposal for certificate formats and their semantics
  31. in SPKI.  This proposal it is not based on S-expressions.
  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. Tatu Ylonen <ylo@ssh.fi>                                        [page 1]
  60.  
  61. INTERNET-DRAFT                                            April 23, 1997
  62.  
  63. Table of Contents
  64.  
  65. 1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . .  2
  66. 2.  Notation for Binary Data  . . . . . . . . . . . . . . . . . . . .  3
  67.   2.1.  Basic Data Types  . . . . . . . . . . . . . . . . . . . . . .  3
  68.     2.1.1.  byte  . . . . . . . . . . . . . . . . . . . . . . . . . .  3
  69.     2.1.2.  uint32  . . . . . . . . . . . . . . . . . . . . . . . . .  3
  70.     2.1.3.  vlint32   . . . . . . . . . . . . . . . . . . . . . . . .  3
  71.     2.1.4.  string  . . . . . . . . . . . . . . . . . . . . . . . . .  4
  72.     2.1.5.  boolean   . . . . . . . . . . . . . . . . . . . . . . . .  4
  73.     2.1.6.  mpint   . . . . . . . . . . . . . . . . . . . . . . . . .  4
  74.     2.1.7.  time  . . . . . . . . . . . . . . . . . . . . . . . . . .  5
  75.   2.2.  Advanced Data Types   . . . . . . . . . . . . . . . . . . . .  5
  76.     2.2.1.  PRESENTED: String with presentation Hints   . . . . . . .  5
  77.     2.2.2.  NAME: Internal Names  . . . . . . . . . . . . . . . . . .  5
  78.     2.2.3.  PUBLICKEY: Public Keys  . . . . . . . . . . . . . . . . .  6
  79.     2.2.4.  PRINCIPAL: Key Reference  . . . . . . . . . . . . . . . .  7
  80. 3.  Generic SPKI Binary Object Format   . . . . . . . . . . . . . . .  8
  81. 4.  Signed Objects  . . . . . . . . . . . . . . . . . . . . . . . . .  9
  82.   4.1.  Authorization Certificates  . . . . . . . . . . . . . . . . . 10
  83.   4.2.  Signed Statements   . . . . . . . . . . . . . . . . . . . . . 11
  84. 5.  Certificate Chain Verification Rules  . . . . . . . . . . . . . . 12
  85.   5.1.  Defining an Operation   . . . . . . . . . . . . . . . . . . . 12
  86.   5.2.  Defining the Problem  . . . . . . . . . . . . . . . . . . . . 13
  87.   5.3.  Certificate Semantics   . . . . . . . . . . . . . . . . . . . 13
  88.   5.4.  Authorization Verification Algorithm  . . . . . . . . . . . . 14
  89. 6.  Additional Validity Constraints   . . . . . . . . . . . . . . . . 15
  90.   6.1.  Explicit Validity Period Starting Date  . . . . . . . . . . . 15
  91.   6.2.  Weekday Based Validity  . . . . . . . . . . . . . . . . . . . 16
  92.   6.3.  Certificate Revocation Lists  . . . . . . . . . . . . . . . . 16
  93.   6.4.  Online Checking   . . . . . . . . . . . . . . . . . . . . . . 17
  94.   6.5.  Periodic Revalidation   . . . . . . . . . . . . . . . . . . . 18
  95. 7.  Authorizations  . . . . . . . . . . . . . . . . . . . . . . . . . 18
  96.   7.1.  Name Certificates   . . . . . . . . . . . . . . . . . . . . . 18
  97.   7.2.  SDSI Tags   . . . . . . . . . . . . . . . . . . . . . . . . . 19
  98.   7.3.  Delegation by Internet Domain Names   . . . . . . . . . . . . 19
  99.     7.3.1.  One Possible Organization of DNS Name Delegation  . . . . 19
  100.     7.3.2.  Host/Service Keys   . . . . . . . . . . . . . . . . . . . 20
  101.     7.3.3.  E-Mail Keys   . . . . . . . . . . . . . . . . . . . . . . 20
  102.   7.4.  Login Access  . . . . . . . . . . . . . . . . . . . . . . . . 21
  103.   7.5.  National Public Key Infrastructures   . . . . . . . . . . . . 21
  104. 8.  Ascii Representation of Binary Objects  . . . . . . . . . . . . . 21
  105.  
  106.  
  107.  
  108. 1.  Introduction
  109.  
  110. This draft is a proposal for a simple binary format and semantics for
  111. the SPKI (Simple Public Key Infrastructure) working group.
  112.  
  113. The proposal has the following features and goals.
  114.  
  115. o  SDSI-style naming with presentation hints and naming delegation
  116.  
  117.  
  118. Tatu Ylonen <ylo@ssh.fi>                                        [page 2]
  119.  
  120. INTERNET-DRAFT                                            April 23, 1997
  121.  
  122. o  SDSI/SPKI style authorizations
  123.  
  124. o  Joint delegation
  125.  
  126. o  Clear and simple semantics, ease of implementation
  127.  
  128. o  Binary format, explicit typing, minimum number of choices
  129.  
  130. o  Easy to extend without central coordination.
  131.  
  132. This proposal is heavily based on ideas from SDSI, SPKI, and
  133. PolicyMaker.  It attempts to implement equivalent or better
  134. functionality, but is much simpler and has very different
  135. representations.
  136.  
  137. 2.  Notation for Binary Data
  138.  
  139. 2.1.  Basic Data Types
  140.  
  141. This section lists the binary representations for the basic data types
  142. used in this document.  No special alignment is required for any data
  143. types.
  144.  
  145. Rationale: No explicit type tagging is used.  All types are used in a
  146. context where the type is known.  This is an explicit design choice over
  147. ASN.1-style type tags with explicit lengths.  The motivations for this
  148. choice are simplicity, conciseness, and the need to limit implementation
  149. alternatives.  The extension mechanism is explicitly defined, and type
  150. tagging would not provide much more flexibility but would leave much
  151. more room for open interpretation.  Loose semantics and too many
  152. implementation choices lead to complexity and interoperability problems.
  153.  
  154. 2.1.1.  byte
  155.  
  156. A byte represents an arbitrary 8-bit value.  Fixed length data is
  157. sometimes represented as an array of bytes, written byte[n], where n is
  158. the number of bytes in the array.
  159.  
  160. 2.1.2.  uint32
  161.  
  162. A 32-bit unsigned integer, represented as four bytes, MSB first.
  163.  
  164. For example, the value 699921578 (0x29b7f4aa) is represented as 29 b7 f4
  165. aa.
  166.  
  167. 2.1.3.  vlint32
  168.  
  169. Most integers, e.g. string lengths, are short.  The normal
  170. representation for 32-bit integers in this proposal is a variable-length
  171. format.  It is stored as one to five bytes, depending on the value being
  172. stored.
  173.  
  174. Bits 6 and 7 (the most significant bits) of the first byte determine the
  175.  
  176.  
  177. Tatu Ylonen <ylo@ssh.fi>                                        [page 3]
  178.  
  179. INTERNET-DRAFT                                            April 23, 1997
  180.  
  181. number of additional bytes that follow, and are interpreted as follows.
  182.  
  183.   Bit7  Bit6    Number of bytes that follow
  184.    0     0       0
  185.    0     1       1
  186.    1     0       2
  187.    1     1       4
  188.  
  189. Bits 0-5 of the first byte and the following bytes contain the value of
  190. the integer, MSB first.  The smallest possible number of bytes should be
  191. used.
  192.  
  193. If bits 6-7 are both one, the remaining bits in the first byte are zero
  194. (reserved for future extension).
  195.  
  196. For example, the value 7 is represented as 07, and the value 193913
  197. (0x2f579) as 82 f5 79.
  198.  
  199. Rationale: Small integers are used in many places.  There are about 20
  200. integers in each certificate.  Thus, it probably pays off to add a
  201. little bit of complexity to reduce their size.  Parsing and generating
  202. this format is still quite straightforward.
  203.  
  204. 2.1.4.  string
  205.  
  206. A string here means an arbitrary length binary string.  Strings are
  207. allowed to contain arbitrary binary data, including null characters and
  208. 8-bit characters.
  209.  
  210. A string is represented as a vlint32 containing its length, followed by
  211. zero or more bytes that are the value of the string.  No terminating
  212. null character is included in the string.
  213.  
  214. For example, the string "testing" is represented as 07 t e s t i n g.
  215.  
  216. 2.1.5.  boolean
  217.  
  218. A boolean value is represented as a single byte.  The value 0 represents
  219. FALSE, and the value 1 represents TRUE.  All non-zero values are
  220. interpreted as true, but applications should not store values other than
  221. 0 and 1.
  222.  
  223. 2.1.6.  mpint
  224.  
  225. Multiple precision integers are represented by the mpint type.
  226.  
  227.   vlint32        number of bits
  228.   byte[n]        value, MSB first, n = floor((bits + 7) / 8)
  229.  
  230. The number of bits is exact (e.g., value 5 has 3 bits).  Any unused bits
  231. are in the first value byte (MSB) and must be zero.
  232.  
  233. For example, the value 694531781388612263 (0x9a378f9b2e332a7) is
  234.  
  235.  
  236. Tatu Ylonen <ylo@ssh.fi>                                        [page 4]
  237.  
  238. INTERNET-DRAFT                                            April 23, 1997
  239.  
  240. represented as 3c 09 a3 78 f9 b2 e3 32 a7.
  241.  
  242. 2.1.7.  time
  243.  
  244. Time values are needed e.g. for expiration dates and timestamps.  In
  245. this proposal, all times are represented as seconds from January 1,
  246. 1970, 00:00.  All times are in UTC (GMT).
  247.  
  248.   byte          0  (reserved)
  249.   uint32        seconds since 1/1/1970
  250.  
  251. This format allows operation until year 2106.  However, space is
  252. reserved for an extra byte that will allow operation until 36812 if
  253. taken into use in future.  For now, all implementations are required to
  254. store a zero in that byte, and to reject any certificates with a non-
  255. zero value in the reserved byte.
  256.  
  257.  Rationale: Using 32-bit binary values allows easy processing and
  258. comparison on existing 32-bit machines.  This makes implementation
  259. easier and reduces errors.  Standard functions for processing times in
  260. this format are available at least in C, C++, Java, and Perl, which are
  261. the most important anticipated implementation languages in near future.
  262. This format is much easier to parse, process, and is more compact than
  263. ascii representations.
  264.  
  265. 2.2.  Advanced Data Types
  266.  
  267. This section lists data types that are special to certificate-like data.
  268. These can be thought of as macros; they are composed of the basic types.
  269.  
  270. 2.2.1.  PRESENTED: String with presentation Hints
  271.  
  272. The definition allows giving presentation hints for strings that are
  273. used to name things or that are otherwise likely to be displayed to the
  274. user.  The representation is as follows:
  275.  
  276.   string        presentation hint
  277.   string        value
  278.  
  279. The presentation hint is a MIME type.  It may be empty, in which case
  280. "text/plain; charset=iso-8859-1" is assumed.  It is only a hint;
  281. applications are allowed to ignore it when displaying data.  However,
  282. the presentation hint takes part in comparisons, and case is significant
  283. for comparison purposes.  The presentation hint should be written in all
  284. lowercase, unless otherwise mandated by the MIME specification.
  285.  
  286. The value is the data to be presented, as binary data (MIME Content-
  287. Transfer-Encoding: binary).  It may be a textual, directly printable
  288. string, or something else.  However, it may also be arbitrary 8-bit
  289. binary data.
  290.  
  291. 2.2.2.  NAME: Internal Names
  292.  
  293.  
  294.  
  295. Tatu Ylonen <ylo@ssh.fi>                                        [page 5]
  296.  
  297. INTERNET-DRAFT                                            April 23, 1997
  298.  
  299. Names of algorithms, certificate types, etc. are used in several places
  300. in this specification.  There is often need for experimenting with new
  301. algorithms, or for adding custom algorithms for certain customers.
  302.  
  303. A basic name consists of alphanumeric characters a-z, A-Z, 0-9, and
  304. hyphens ('-').  Only standards bodies can define new basic names.
  305.  
  306. Extended names consist of a basic name suffixed by "@domainname", where
  307. domainname is a valid registered internet domain name of the
  308. individual/organization defining the new name.  For example,
  309. "myhash@ssh.fi" would be a valid extended name.  The domain name should
  310. be in all lowercase.
  311.  
  312. When a name is used in this specification, it can be of either of these
  313. formats.  Names are case-sensitive.  They are represented as a string.
  314.  
  315. Rationale: This allows short standard names for commonly used things,
  316. and allows for easy extension without need for central registration or
  317. fear of conflicts.
  318.  
  319. 2.2.3.  PUBLICKEY: Public Keys
  320.  
  321. Public keys are represented as follows:
  322.  
  323.   NAME          key type
  324.   string        type-specific key data
  325.   string        location (URI)
  326.  
  327. Format of public keys depends on the algorithm used.  The level of
  328. abstraction for key types is that the operation takes in an arbitrary-
  329. length document (possibly in parts), and produces a binary blob that is
  330. the signature.  In other words, it combines a hash, signature algorithm,
  331. padding, and encoding.
  332.  
  333. The location is optional, and specifies the location of the appropriate
  334. key server(s) if present.
  335.  
  336. The rsa-md5-pkcs1 key type specifies RSA encryption, MD5 hashing of the
  337. document, PKCS-1 padding and encoding for the data on which the
  338. public/private key operation is performed, and PKCS-1 encoding for the
  339. resulting signature.
  340.  
  341. The type-specific data is as follows.
  342.  
  343.   mpint         modulus
  344.   mpint         exponent
  345.  
  346. An 1024-bit RSA key with exponent 33 and modulus 0x34...37 and empty URI
  347. would be represented as a total of 149 bytes (line breaks and
  348. indentation included only for clarity):
  349.  
  350.   0d r s a - m d 5 - p k c s 1
  351.   40 84
  352.  
  353.  
  354. Tatu Ylonen <ylo@ssh.fi>                                        [page 6]
  355.  
  356. INTERNET-DRAFT                                            April 23, 1997
  357.  
  358.     06 21
  359.     44 00 34 ... 37
  360.   00.
  361.  
  362. The dss-sha key type specifies DSA with SHA, with padding in accordance
  363. to the DSS (Digital Signature Standard). XXX check the encoding; do we
  364. need to refer to PKCS-1 or something else?
  365.  
  366. The ecp-elgamal-sha-p1363 key type specifies ECP-Elgamal with SHA and
  367. P1363-conformant padding.  XXX Check encoding.  I'm not sure if P1363
  368. specifies padding.
  369.  
  370. 2.2.4.  PRINCIPAL: Key Reference
  371.  
  372. A principal is something that can be reduced to a key.  It always
  373. specifies an explicit key, and may additionally specify a list of names
  374. to follow to get the desired key.  The representation is as follows:
  375.  
  376.   PUBLICKEY      base key
  377.   vlint32        name count (may be zero)
  378.     PRESENTED      name  (repeat name count times)
  379.  
  380. This type is used to express SDSI-like name references of the form
  381. "(<key> n1 n2 ... nk)".  Names are stored in the same order as they
  382. appear in the SDSI S-expression (that is, n1 is the first name stored,
  383. and refers to base key's namespace).
  384.  
  385. The names should be interpreted as constraints rather than functions:
  386. each name may refer to multiple principals.  If something is asserted
  387. about a principal using a name, it should be interpreted as asserting
  388. about all principal with the given name (path).  Thus, if something is
  389. delegated to a group, all members of the group receive that
  390. authorization.  Delegating something to e.g. "(<key> group name)" would
  391. have the semantics of delegating it to any principals for which any
  392. member of the group has created the appropriate certificate for "name".
  393.  
  394. Rationale: SDSI defines the reference to refer to a single key, possibly
  395. the newest.  However, this can cause problems.  Consider, for example,
  396. the case that a user changes his/her key.  The old certificates will
  397. linger around for some time, but the user starts making new certificates
  398. with his new key.  Suppose someone has a name for the user; it should
  399. now refer to both of the user's keys, as there may be valid certificates
  400. around using both.  If it referred arbitrarily to either of them, some
  401. certificates would mysteriously not work.  Most annoyingly, new
  402. certificates issued by the user might not be considered valid even if
  403. the user supplied the appropriate name certificates for the new key.
  404.  
  405. Bitwise comparison is used for names.  The presentation hint is
  406. considered part of the name, and takes part in comparison.  However, if
  407. the presentation hint is the empty string, it is expanded to the default
  408. presentation type before comparison.
  409.  
  410. Rationale: Confusion and ambiguities are possible if the presentation
  411.  
  412.  
  413. Tatu Ylonen <ylo@ssh.fi>                                        [page 7]
  414.  
  415. INTERNET-DRAFT                                            April 23, 1997
  416.  
  417. hint is not part of the comparison.  Suppose a CA assigns both names and
  418. images using name certificates.  An image could have the same binary
  419. representation as another principal's name, which would risk
  420. accidentally delegating privileges to that other principal.  For similar
  421. reasons (and tricky locality issues) names are also case-sensitive.
  422. Implementations may do smart tricks in user interfaces; however,
  423. certificate validation must use the strict rules.
  424.  
  425. SDSI has the concept of global names that are common to everyone.
  426. However, when one starts considering key changes, compromises,
  427. revocations, joint delegation, etc., there is no way to maintain the
  428. mapping from everyone's local namespace to some global names.  What one
  429. can do instead is to (possibly jointly) delegate naming to a centrally
  430. managed key, and have it define names like DNS!!, and then consider all
  431. global names relative to the principal's own key.
  432.  
  433. For example, assuming KEY is the key from the previous example, (KEY
  434. DNS!! fi [text/plain; charset=us-ascii] ssh) would be represented as
  435.  
  436.   0d r s a - m d 5 - p k c s 1
  437.   40 84
  438.     06 21
  439.     44 00 34 ... 37
  440.   00
  441.   03
  442.     00
  443.     05 D N S ! !
  444.     00
  445.     02 f i
  446.     1c t e x t / p l a i n ; 20 c h a r s e t = u s - a s c i i
  447.     03 s s h.
  448.  
  449. 3.  Generic SPKI Binary Object Format
  450.  
  451. All SPKI objects follow the same generic pattern.  When passing keys and
  452. certificates around, multiple such objects may be concatenated together,
  453. and sent as a single unit.
  454.  
  455. Every SPKI object is of the following format:
  456.  
  457.   byte[4]       the characters "SPKI"
  458.   NAME          object type
  459.   string        object data
  460.  
  461. There is no maximum length for the object.  All implementations are
  462. required to be able to process objects of at least 16384 bytes
  463. (including magic number, object type, and object data).  Objects longer
  464. than this may prevent communications with some implementations.
  465.  
  466. Rationale: Typically, the sender will send a number of certificates,
  467. keys, and possibly other data to a receiver.  The receiver may not
  468. understand all of these.  Because lengths are explicit, the receiver can
  469. reliably walk through all received objects, and ignore those that it
  470.  
  471.  
  472. Tatu Ylonen <ylo@ssh.fi>                                        [page 8]
  473.  
  474. INTERNET-DRAFT                                            April 23, 1997
  475.  
  476. does not understand.  New object types can also be added easily, without
  477. need for central coordination.
  478.  
  479. SPKI objects may be keys, certificates, or some other types of data.
  480. New object types may be added at any time.  Implementations are required
  481. to ignore any objects they do not recognize.  This is the primary
  482. extension mechanism in this proposal.  If new fields need to be added, a
  483. new object type is defined.
  484.  
  485. Currently, the following object types have been specified:
  486.  
  487.   cert-1      Name/authorization delegation certificate
  488.   sig-1       Signed statement on non-key
  489.   crl-1       Certificate revocation list
  490.  
  491. Rationale: There is no separate type field within certificates or a
  492. generic public key object type.  The motivation is simplicity: having
  493. more type names, more options, more alternatives adds to implementation
  494. complexity.  Implementations of the different object types will still
  495. share code.  The main limitation due to this is that a user interface
  496. cannot reliably say about an unknown object "it is an unknown
  497. certificate of type foo@ssh.fi by N.N"; instead it can only say "it is
  498. an unknown object of type foo@ssh.fi".
  499.  
  500. 4.  Signed Objects
  501.  
  502. A certificate in SPKI terminology is any signed statement.  It can be a
  503. signature on a document, a name certificate specifying naming or group
  504. membership, or an authorization or some other statement about a key.
  505.  
  506. All signed objects begin with the data common to all objects, continue
  507. with a shared part that is common to all certificate types, and
  508. typically also contain type-specific data.  The common part has the
  509. following format:
  510.  
  511.   PUBLICKEY     issuer
  512.   time          time when issued
  513.   time          expiration time
  514.   string        additional validity data
  515.   string        type-specific data
  516.   string        comment
  517.   string        signature
  518.  
  519. Rationale: Issuer key is stored directly in the certificate.  Another
  520. alternative would be to store it indirectly, e.g. by hash.  However, a
  521. typical certification path only includes each key twice (once as an
  522. issuer and once as a subject).  An RSA key is about 150 bytes, and a
  523. hash reference about 30 bytes (plus the key separately).  Thus, this is
  524. about 210 bytes vs. 300 bytes in favor of hashes for 1024 bit RSA.  For
  525. 200-bit ECP-elgamal this would be more like 80 vs. 100 in favor of
  526. direct storage.  More importantly, indirect storage adds substantial
  527. complications to the logic for creating, maintaining, and verifying
  528. certification paths.  Since the space overhead is not prohibitive, I've
  529.  
  530.  
  531. Tatu Ylonen <ylo@ssh.fi>                                        [page 9]
  532.  
  533. INTERNET-DRAFT                                            April 23, 1997
  534.  
  535. chosen simplicity over minor space savings.  When certificates need to
  536. be stored in limited space, standard compression algorithms can be used
  537. to remove redundant keys from the certificates much more effectively
  538. than hash references.
  539.  
  540. The comment field is not used for any automatic purpose.  However, it
  541. may be displayed when specifically requested by a user interface.
  542.  
  543. The signature is computed over the concatenation of the object type
  544. represented as a string (i.e., vlint32-coded length is included) and all
  545. object data preceding the signature field.  The characters "SPKI" and
  546. the length of the object data are not included in the signature.  No
  547. additional data is allowed after the signature; any such certificates
  548. should be rejected.
  549.  
  550. The meaning of other fields is defined in Sections ``Certificate
  551. Semantics'' and ``Additional Validity Constraints''.
  552.  
  553. 4.1.  Authorization Certificates
  554.  
  555. Authorization certificates are used to delegate names and authorizations
  556. from one principal to another.  Delegation may be to a directly
  557. specified key, or to a key specified indirectly by a name.
  558.  
  559. Delegation certificates have object type "cert-1" and the following
  560. type-specific data:
  561.  
  562.   vlint32       number of alternative subjects
  563.     PRINCIPAL     subject  (repeats as specified above)
  564.   vlint32       number of subjects required
  565.   boolean       may be delegated
  566.   vlint32       number of authorizations
  567.     NAME          domain of interpretation  ) repeated
  568.     string        authorization             )
  569.  
  570. Rationale: The only form of certificate supported is a joint delegation
  571. certificate.  A normal certificate has only one alternative subject.
  572. This case has a two-byte overhead over a simple certificate without the
  573. counts.  However, joint delegation is important for avoiding single
  574. points of trust.  Having the basic certificate be the joint delegation
  575. certificate forces every implementation to support joint delegation from
  576. the beginning.  This adds some complication to code, but not very much
  577. (see Section ``''.  Also, this way there is only one certificate format
  578. to support.
  579.  
  580. In the simple case of only one subject, the specified authorizations are
  581. delegated to the subject key.  In the case of N subjects of which M are
  582. required, the authority is delegated to all subjects in such a manner
  583. that M of them need to confirm an operation for it to be authorized.
  584. This is explained in more detail in Section ``Authorization
  585. Verification''.
  586.  
  587. The number of alternative subjects should be between 1 and 100,
  588.  
  589.  
  590. Tatu Ylonen <ylo@ssh.fi>                                       [page 10]
  591.  
  592. INTERNET-DRAFT                                            April 23, 1997
  593.  
  594. inclusive; the number of subjects required must be between 1 and the
  595. number of alternative subjects, inclusive.
  596.  
  597. The "may be delegated" flag indicates whether the subject(s) may further
  598. delegate the authorization.
  599.  
  600. Number of authorizations specifies how many times the domain of
  601. interpretation and authorization fields are repeated (they are repeated
  602. in pairs, first both fields once, then both fields another time etc).
  603. The semantics of multiple authorizations in a single certificate are
  604. equivalent to that of multiple certificates with a single authorization
  605. in each.
  606.  
  607. Rationale: Multiple authorizations are allowed in a single certificate,
  608. because it is common to have a name certificate together with some
  609. authorization for that name.  For example, within DNS, one might have a
  610. name certificate for a subdomain's key together with delegation of host
  611. key and email key authorizations to that key.  The overhead is one byte
  612. for certificates that have only one authorization.
  613.  
  614. The domain of interpretation specifies the ruleset according to which
  615. authorization is interpreted.  The authorization can be arbirary binary
  616. data, and is given meaning only by the domain.  See Section
  617. ``Authorizations'' for more information.
  618.  
  619. Rationale: There is no separate name certificate.  Name certificates are
  620. normal certificates with domain "name" and specially formatted
  621. authorization.
  622.  
  623. A sample certificate object might look like the following:
  624.  
  625.   S P K I
  626.   06 c e r t - 1
  627.   xx1               ; len of object data
  628.     <public key for issuer>
  629.     00 2D 20 C9 80  ; time of issue
  630.     00 37 12 34 56  ; expiration time
  631.     00              ; additional validity
  632.     xx2             ; len of type-spec data
  633.       01            ; number of subjects
  634.       <public key for subject> ; subj1 base key
  635.       00            ; subj1 number of names
  636.       01            ; number of subjects required
  637.       01            ; may be delegated
  638.       01            ; number of authorizations
  639.       04 n a m e    ; domain of interpretation
  640.       0d            ; authorization len
  641.         00          ; presentation hint len
  642.         0b J o h n 20 M . 20 D o e
  643.     00              ; comment
  644.     10 <16 bytes for MD5 hash>.
  645.  
  646.  
  647.  
  648.  
  649. Tatu Ylonen <ylo@ssh.fi>                                       [page 11]
  650.  
  651. INTERNET-DRAFT                                            April 23, 1997
  652.  
  653. 4.2.  Signed Statements
  654.  
  655. A signed statement may refer to an object, or may be used for some other
  656. purpose.  Signed statements have the object type "sig-1" and the
  657. following type-specific data:
  658.  
  659.   NAME        domain of interpretation
  660.   PRESENTED   statement
  661.  
  662. The domain of interpretation identifies the ruleset according to which
  663. the statement is to be interpreted.  Currently, the following domains
  664. have been defined:
  665.  
  666.   natural        human-readable natural language
  667.   sha1           detached SHA-1 hash of object
  668.   md5            detached MD5 hash of object
  669.  
  670. The natural domain specifies that the statement is intended to be
  671. processed by humans, and is written in some human-readable language.  No
  672. automatic processing is attempted.
  673.  
  674. The sha1 and md5 domains specify that the statement is the respective
  675. hash of some detached object.  The actual object reference should be by
  676. some external means (such as by being attached in the same e-mail
  677. message).  The presentation hint should be empty, and value should
  678. contain the hash of the object in binary (16 bytes for MD5, 20 bytes for
  679. SHA-1).
  680.  
  681. 5.  Certificate Chain Verification Rules
  682.  
  683. The source of all authorization is the entity performing
  684. certificate/authorization verification.  Typically, this is a computer
  685. program, and it is locally configured to delegate authorization to some
  686. key or keys.
  687.  
  688. The concept of certificate chain verification is somewhat misleading in
  689. authorization-based key infrastrucures.  The real issue is determining
  690. whether a principal is authorized to do something (e.g., read a web
  691. page, use a bank account, connect to a computer, sign a specific
  692. purchase order).  This translates to "have I delegated to this principal
  693. the authorization to do this?"
  694.  
  695. 5.1.  Defining an Operation
  696.  
  697. When we talk about authorization, we need to specify what we are
  698. authorizing.  We say that we authorize some operation.  There are
  699. several issues related to authorizing an operation:
  700.  
  701. o  There is some entity requesting the operation.  Only some entities
  702.    are allowed to do certain things.  We assume that the entity has a
  703.    key representing it, and include the entity's key CLIENTKEY in the
  704.    definition of the operation.
  705.  
  706.  
  707.  
  708. Tatu Ylonen <ylo@ssh.fi>                                       [page 12]
  709.  
  710. INTERNET-DRAFT                                            April 23, 1997
  711.  
  712. o  The operation is a request to some entity to do something (a
  713.    computation or a physical operation).  The same request might be sent
  714.    to different entities, and they would perform the operation on
  715.    different objects.  Thus, both the entity and the request are part of
  716.    the specification of the operation.  We assume that the entity has a
  717.    key representing it.  We represent this by including the entity's key
  718.    SERVERKEY and the request REQUEST in the definition of the operation.
  719.  
  720. o  Authorization relates to a particular instance of an operation.  This
  721.    implies that authorization is bound to time, but time alone is not a
  722.    sufficient.  With online checking, only one of two simultaneous
  723.    identical operations might be approved.  We include time TIME and
  724.    instance INSTANCE in the specification of an operation.  (Time is
  725.    included separately because it is usually sufficient to determine
  726.    authorization.  INSTANCE is a unique random identifier.)
  727.  
  728. An operation OPERATION is represented by the tuple (CLIENTKEY,
  729. SERVERKEY, REQUEST, TIME, INSTANCE).  This answers the questions "Who
  730. does, what does, and when does?".  It is assumed that the entity
  731. requesting the operation proves it identity (i.e., possession of
  732. CLIENTKEY) using some suitable mechanism.
  733.  
  734. CLIENTKEY might actually also be a set of keys that are jointly
  735. performing some operation.  This may make sense with joint delegation.
  736. This does not substantially change the algorithms.
  737.  
  738. 5.2.  Defining the Problem
  739.  
  740. The authorization problem is "Does SERVERKEY authorize OPERATION?",
  741. where SERVERKEY represents the entity on which the operation is
  742. performed.
  743.  
  744. For some operations this definition may seem superficial.  For example,
  745. consider the naming problem: "does (BASE n1 n2 ... nk) refer to KEY?"
  746. Here, the act is being a representative of a name, and the question
  747. becomes "Does BASE authorize KEY to be called (BASE n1 n2 ... nk)".
  748. Dressed as an operation, this is the same as "Does BASE authorize (KEY,
  749. BASE, "name: n1 n2 ... nk", TIME, INSTANCE)".
  750.  
  751. 5.3.  Certificate Semantics
  752.  
  753. A certificate contains a set of authorizations.  The semantics of having
  754. multiple authorizations in a single certificate are the same as having
  755. multiple otherwise identical certificates, each containing one
  756. authorization from the set.  To simplify the notation, we consider all
  757. certificates to have only a single authorization AUTH.
  758.  
  759. A certificate CERT can be represented as (ISSUER, Tissue, Texpire,
  760. VALIDITY, SUBJECTS, DELEGATE, AUTH)".
  761.  
  762. A certificate is valid at time TIME for instance INSTANCE if it has a
  763. correct signature by ISSUER, Tissue <= TIME <= Texpire, and VALIDITY is
  764. fully understood and indicates the certificate is valid at time TIME for
  765.  
  766.  
  767. Tatu Ylonen <ylo@ssh.fi>                                       [page 13]
  768.  
  769. INTERNET-DRAFT                                            April 23, 1997
  770.  
  771. instance INSTANCE.
  772.  
  773. SUBJECTS is a tuple ({(K, NAMES)}, M), where K is a key and NAMES is a
  774. (possibly empty) sequence of names.  Normally, there is only one subject
  775. in the set, and M = 1.  However, with joint delegation there may be
  776. multiple subjects, and in this case delegation is to at least M of the
  777. subjects jointly.
  778.  
  779. AUTH is a constraint on the possible requests that the subject may
  780. perform.  It is a tuple (DOI, AUTHDATA).
  781.  
  782. A valid certificate means: ISSUER allows SUBJECTS to perform requests
  783. permitted by AUTH on ISSUER.  Furthermore, if DELEGATE is TRUE, ISSUER
  784. also allows allows those allowed by SUBJECTS to perform f(AUTH, REQUEST)
  785. on themselves, to perform operations permitted by AUTH on ISSUER.  The
  786. function f(AUTH, REQUEST) is a transformation to be performed on REQUEST
  787. at every delegation step; for names, it strips the first name component
  788. from REQUEST.
  789.  
  790. Rationale: The semantics of joint delegation is that M of the subjects
  791. need to allow the operation.  Different subjects can delegate the
  792. authorization via different paths.
  793.  
  794. Rationale: The function f must have knowledge about all authorizations
  795. processed in the application.  Also, a function is needed to determine
  796. whether REQUEST is permitted by AUTH.  No other understanding of AUTH or
  797. REQUEST is needed by the logic for verifying authorizations or names.
  798. In most cases, both of these functions are very simple.  The function
  799. can be defined separately for each domain of interpretation.
  800.  
  801. Authorizations in different domains are completely independent.
  802. Authorizations and requests must be in the same domain to be relevant
  803. for each other.
  804.  
  805. 5.4.  Authorization Verification Algorithm
  806.  
  807. Let us now consider the authorization question "Does a set of
  808. certificates CERTS state that SERVERKEY authorizes OPERATION?", where
  809. OPERATION = (CLIENTKEY, SERVERKEY, REQUEST, TIME, INSTANCE).
  810.  
  811. 1. If CLIENTKEY and SERVERKEY are the same key, the operation is
  812.    trivially allowed.
  813.  
  814. 2. Otherwise, the operation is allowed if there is a certificate CERT in
  815.    CERTS such that:
  816.  
  817. o  CERT is valid at time TIME for INSTANCE.
  818.  
  819. o  CERT.ISSUER and SERVERKEY are the same key.
  820.  
  821. o  REQUEST is permitted by CERT.AUTH.
  822.  
  823. o  There are at least M tuples (K, NAMES) in CERT.SUBJECTS for which all
  824.  
  825.  
  826. Tatu Ylonen <ylo@ssh.fi>                                       [page 14]
  827.  
  828. INTERNET-DRAFT                                            April 23, 1997
  829.  
  830.    of the following hold:
  831.  
  832. o  There is a key SUB for which CERTS state that K authorizes (SUB, K,
  833.    "name: NAMES", TIME, INSTANCE).  (This verifies that SUB is a valid
  834.    representative for the given name.  Some additional syntax may be
  835.    needed in reality to make a valid request from NAMES.  When NAMES is
  836.    empty, SUB equals K.)
  837.  
  838. o  Either SUB equals CLIENTKEY (is in CLIENTKEY if CLIENTKEY is allowed
  839.    to be a set), or DELEGATE is TRUE and CERTS state that SUB authorizes
  840.    (CLIENTKEY, SUB, f(AUTH, REQUEST), TIME, INSTANCE).
  841.  
  842. Rationale: Joint certificates, name certificates, and all other
  843. certificates are handled by the same algorithm.  The algorithm is
  844. reasonably simple.
  845.  
  846. Revalidation and CRLs are handled as part of the "is valid" phrase.
  847. They might involve recursive calls to the same algorithm.
  848.  
  849. This definition has one interesting consequence for names: if something
  850. is delegated to the name (BASE n1 n2 ... nk), it is delegated to all of
  851. the keys BASE, (BASE n1), ..., (BASE n1 ... nk).
  852.  
  853. Rationale: At first sight this might seem very wrong; however, BASE can
  854. anyway create a new key and name certificate for n1, n2, etc., and can
  855. thus effectively make the delegation go to any key desired.  This is a
  856. fundamental property of trusting someone's name space.  It is better to
  857. acknowledge the trust relationship openly than to claim that no
  858. authorization was delegated to the naming keys.  Besides, the resulting
  859. verification algorithm is simpler.  The alternative would be to define a
  860. third domain-dependent function to process authorizations that hold only
  861. for the terminal node.
  862.  
  863. 6.  Additional Validity Constraints
  864.  
  865. The additional validity data in signed objects can be used to specify
  866. additional validity conditions in addition to requiring the time to be
  867. between the issue date and the expiration date.
  868.  
  869. The additional validity data consists of string pairs, and has the
  870. following format:
  871.  
  872.   NAME      condition name
  873.   string    data
  874. (Above repeats as many times as needed)
  875.  
  876. A certificate should be rejected if it contains a validity condition
  877. that is not understood.
  878.  
  879. 6.1.  Explicit Validity Period Starting Date
  880.  
  881. An explicit validity period starting time may be provided.  The
  882. condition name is "not-before", and data contains
  883.  
  884.  
  885. Tatu Ylonen <ylo@ssh.fi>                                       [page 15]
  886.  
  887. INTERNET-DRAFT                                            April 23, 1997
  888.  
  889.   time      validity period start
  890.  
  891. This specifies that certificate is not valid until the validity period
  892. starts, regardless of the time of issue.
  893.  
  894. 6.2.  Weekday Based Validity
  895.  
  896. Some certificates may be valid at only certain times of the week.  This
  897. is represented by the condition name "weekday", and data containing
  898.  
  899.   string     validity times
  900.  
  901. Validity times is an ascii string containing semicolon-separated time
  902. specifications, each of the format "weekday@start-end", where weekday is
  903. a comma-separated list of day numbers 0-6 (0 = Sunday), and start and
  904. end are times of the format "hour:minute".
  905.  
  906. For example, "1,2,3,4,5@9:00-17:00;6@9:00-14:00" would specify that the
  907. certificate is valid Mon-Fri 9 am to 5 pm, and Saturdays 9 am to 2 pm.
  908.  
  909. 6.3.  Certificate Revocation Lists
  910.  
  911. Many applications require certificates to be verified against a
  912. periodically published certificate revocation list (CRL).  This is
  913. indicated by a condition name "crl", and the following data:
  914.  
  915.   PUBLICKEY     CRL signer key
  916.   string        location of CRL (URI)
  917.  
  918. The certificate is to be accepted only if the verifier has a valid CRL
  919. available from the given signer, and the certificate is not listed in
  920. the CRL.
  921.  
  922. The CRL is an SPKI object of type "crl-1", and has the following object
  923. data:
  924.  
  925.   PUBLICKEY     CRL signer key
  926.   time          time when issued
  927.   time          recheck time
  928.   time          expiration date
  929.   string        location of next crl (URI)
  930.   boolean       is delta crl
  931.   time          issue time of base crl
  932.   NAME          revocation format
  933.   vlint32       number of revocations
  934.   <variable number revocation entries>
  935.   string        signature
  936.  
  937. If no CRL is available, one can be requested using the location
  938. specified in the original certificate.  If a CRL is already available,
  939. the next one should be requested using the location in the previous CRL.
  940. The location there may contain information about the time of the
  941. previous CRL, and may return a delta to the previous CRL.
  942.  
  943.  
  944. Tatu Ylonen <ylo@ssh.fi>                                       [page 16]
  945.  
  946. INTERNET-DRAFT                                            April 23, 1997
  947.  
  948. The signature is computed over the object type (including length) and
  949. all data of the CRL preceding the signature.  The CRL should be ignored
  950. if it does not have a valid signature.
  951.  
  952. The "time when issued" field identifies the CRL.  The "recheck time"
  953. indicates the time after which the verifier should attempt to fetch a
  954. new CRL.  However, the CRL remains valid after this time.  "Expiration
  955. time" specifies the time after which the CRL expires; it is no longer
  956. valid after this time.
  957. The "is delta crl" field is TRUE if this is a delta to some previous
  958. CRL.  The "issue time of base crl" contains the timestamp of that CRL;
  959. if that does not match the issue time of the previous CRL that the
  960. verifier has, it should request a completely new CRL using the location
  961. in the original certificate.  The "issue time of base crl" field is
  962. ignored if the CRL is not a delta.  A full CRL should also be requested
  963. if "revocation format" changes.
  964.  
  965. Delta CRLs should be merged into the previous CRL.  Revocations listed
  966. in the delta with the "rm" reason should be removed.  Other revocations
  967. should be merged into the old CRL.  The new issue time and location
  968. should be taken from the delta.
  969.  
  970. The format of each revocation entry depends on the revocation format
  971. field.  The values "sha1" and "md5" are defined, and have the following
  972. encoding for each revocation, with the respective hash used.
  973.  
  974.   string        hash of the entire certificate object
  975.   time          revocation time
  976.   NAME          reason
  977.  
  978. The reason indicates why the certificate was revoked.  It may be empty
  979. if no reason is specified.  The following values are defined; other
  980. values are possible and should be interpreted as cancelling the
  981. certificate.
  982.  
  983.   keyc            subject key was compromised
  984.   affc            affiliation changed
  985.   sup             superseded by a new certificate
  986.   cessation       cessation of operation
  987.   call            on hold; call certificate issuer
  988.   rm              remove from crl
  989.  
  990. The reason "call" instructs that the verifier should either reject the
  991. certificate or call the issuer to verify its status.  The code "rm" is
  992. only used in delta CRLs, and is used to list keys that were on the
  993. preceding crl, but are no longer on the latest delta.  All other reasons
  994. simply cause the matching certificate to be rejected.
  995.  
  996. XXX should we have delegatable authorization "crl" that would permit the
  997. CRL key to delegate the authority to make CRLs?
  998.  
  999. 6.4.  Online Checking
  1000.  
  1001.  
  1002.  
  1003. Tatu Ylonen <ylo@ssh.fi>                                       [page 17]
  1004.  
  1005. INTERNET-DRAFT                                            April 23, 1997
  1006.  
  1007. Online checking is specified by a condition name "online".  XXX specify
  1008. contents and protocol later.
  1009.  
  1010. 6.5.  Periodic Revalidation
  1011.  
  1012. XXX specify later.  New authorization "revalidate", with certificate
  1013. hash included in authorization.  Recursive call to verification logic.
  1014. One practical advantage of revalidation as opposed to CRLs is that the
  1015. client can retrieve the revalidation certificate, whereas CRLs need to
  1016. be retrieved by servers.  This brings extra overhead and complication to
  1017. servers.
  1018.  
  1019. 7.  Authorizations
  1020.  
  1021. This section lists some sample authorizations.  Except for name
  1022. certificates, the definitions are still quite preliminary.
  1023.  
  1024. 7.1.  Name Certificates
  1025.  
  1026. Name certificates are used to specify names and group membership.  These
  1027. concepts are identical; one may give the same name to multiple
  1028. principals or have groups of one member if one likes.  It is normal for
  1029. people to have two keys for short periods of time while they are in the
  1030. process of changing keys.
  1031.  
  1032. Each named thing has a key.  The name certificate alone does not
  1033. delegate any rights to the key.  It only specifies a name.
  1034.  
  1035. Name certificates have domain of interpretation "name".  Authorization
  1036. is binary data, formatted as follows:
  1037.  
  1038.   PRESENTED     name
  1039.  
  1040. Rationale: Name certificates are just ordinary certificates to simplify
  1041. verification logic.  Keys are cheap, so there is no real need for groups
  1042. without keys.  Also, name certificates do not imply delegation; thus,
  1043. there is no need for constraining what is delegated to a name.  If
  1044. delegation to the name is desired, it must be done explicitly with a
  1045. separate authorization (possibly in the same certificate).  The client
  1046. typically supplies the needed certificates, so there is normally no need
  1047. for fetching extra certs because of this naming scheme.  Also, if both
  1048. name and delegation are put in the same certificate, signature checking
  1049. overhead is reduced.
  1050.  
  1051. There is also no distinction between different types of information,
  1052. such as nicknames, full names, social security numbers, customer
  1053. numbers, pictures, etc.  One can define multiple certificates to support
  1054. these.  The type of the name can implied by the presentation hint (e.g.,
  1055. "image/jpeg" or "text/x-fi-socid").
  1056.  
  1057. Name certificates where both representation and value are empty strings
  1058. have special meaning.  They indicate that the subject's name space is
  1059. merged into the issuer's name space.  Essentially it delegates all
  1060.  
  1061.  
  1062. Tatu Ylonen <ylo@ssh.fi>                                       [page 18]
  1063.  
  1064. INTERNET-DRAFT                                            April 23, 1997
  1065.  
  1066. naming authority for the issuer to the subject.  They do not
  1067. automatically delegate anything else than naming.
  1068.  
  1069. Rationale: merging namespaces is useful.  For example, an organization
  1070. might centrally define certain standard names, such as DNS!!, and have
  1071. all end-user and host keys merge the name space from that key into their
  1072. keys.  That way, changes in the appropriate root keys can be managed
  1073. centrally.  Also, in a traditional naming-based CA hierarchy one only
  1074. wants to configure the root key into clients, and may want to merge the
  1075. namespaces of the subordinate CAs into the namespace of the root CA.
  1076.  
  1077. The function f(AUTH, REQUEST) for name certificates is defined as
  1078. stripping the first name component from REQUEST.  The resulting new
  1079. request is returned.  However, in the case that AUTH has both
  1080. presentation and value as empty strings, this returns the original
  1081. request instead.
  1082.  
  1083. For name certificates, AUTH permits REQUEST if the presentation hint and
  1084. value are bitwise equal to those in the first name component of REQUEST
  1085. (after filling in the default presentation).  However, in the case that
  1086. auth has both presentation and value as empty strings, AUTH always
  1087. permits REQUEST.
  1088.  
  1089. 7.2.  SDSI Tags
  1090.  
  1091. SDSI-style S-expression tags may be used as authorizations.  They are
  1092. represented by domain of interpretation "sdsi", and the authorization is
  1093. the tag S-expression in SDSI format.
  1094.  
  1095. 7.3.  Delegation by Internet Domain Names
  1096.  
  1097. Many applications (e.g., host keys, e-mail) need keys where naming and
  1098. authorization is delegated hierarchially.  However, one does not want to
  1099. trust the root keys in the hands of any single organization.  One
  1100. possible solution for such infrastructures is presented here, with
  1101. examples of particular types of keys at the end.
  1102.  
  1103. 7.3.1.  One Possible Organization of DNS Name Delegation
  1104.  
  1105. There is no single key for the domain name hierarchy.  Instead, there
  1106. are four keys, three of which are required to sign each top-level
  1107. domain.  The keys are each held by a trusted organization in the US, in
  1108. EU, in Japan, and by some other suitable organization.
  1109.  
  1110. The public keys of the root keys are widely published.  Each
  1111. organization configures its machines and applications to jointly trust
  1112. three out of four of these central servers.  (If some organization
  1113. wishes to have a different trust model, it has the opportunity to do
  1114. this.)  The configuration can most conveniently by done by delegating
  1115. trust within the orgnization to a central key (or jointly to a few keys)
  1116. from each machine, and delegating it jointly to the root keys from this
  1117. key (or from each of these keys).
  1118.  
  1119.  
  1120.  
  1121. Tatu Ylonen <ylo@ssh.fi>                                       [page 19]
  1122.  
  1123. INTERNET-DRAFT                                            April 23, 1997
  1124.  
  1125. Each top-level domain may decide for itself whether it wants to have a
  1126. single key that can delegate to subdomains, or whether it prefers to use
  1127. joint delegation.  If single key delegation is used, all root keys
  1128. delegate to this key.  If joint delegation is preferred, all root keys
  1129. delegate jointly to these keys.
  1130.  
  1131. Each top-level domain key gets the right to delegate host keys for that
  1132. domain.  For example, ".fi" domain key could delegate host and e-mail
  1133. keys for "*.fi".  These would be separate delegations (but might both be
  1134. created automatically by the same application).
  1135.  
  1136. Each organization again has a key for its domain name.  For most
  1137. organizations, a single key is suitable to reduce administrative burden.
  1138. For multinational corporations and other very large or security-
  1139. conscious organizations, using joint delegation may again be warranted.
  1140.  
  1141. An additional complication for organizations is that they may have
  1142. machines with the name of the organization directly.  For example, the
  1143. key for "ssh.fi" should be authorized to delegate both "ssh.fi" and
  1144. "*.ssh.fi".
  1145.  
  1146. XXX An alternative approach to host keys is to suggest that every
  1147. principal has name DNS!! pointing to the DNS root key, and have the name
  1148. at each level be just one component of the name.  Which is better?
  1149.  
  1150. 7.3.2.  Host/Service Keys
  1151.  
  1152. One common application for a public key infrastructure is hierarchial
  1153. delegation of host key/user key certification.  In many lightweight
  1154. applications, wide deployment requires that certification can be taken
  1155. very far down in the organization.  One needs to delegate certification
  1156. by internet domain names, and possibly even within domains.  One may
  1157. want to have different keys for different services to prevent an
  1158. untrusted service from having access to the host key used by some
  1159. critical service.  Services are identified by TCP/IP port numbers.
  1160.  
  1161. For host/service keys, description is of the format "domain.name:port-
  1162. number", where '*' and '?' may be used as wildcards in any position to
  1163. match an arbirary number of characters or any single character,
  1164. respectively.  However, they do not match the colon (':').
  1165.  
  1166. For example, "*.niksula.hut.fi:*" would delegate the subject the
  1167. authority to certify host keys for any service on machines whose name
  1168. matches "*.niksula.hut.fi".  A host master key might have e.g.
  1169. "joker.niksula.hut.fi:*" as the description.  A per-service key might
  1170. have the description "joker.cs.hut.fi:80".
  1171.  
  1172. 7.3.3.  E-Mail Keys
  1173.  
  1174. E-mail key delegation is similar to host key delegation.  However, the
  1175. description has slightly different format:
  1176. "user@domain.name:algorithms", with the same wildcard conventions as for
  1177. host keys (except that the '@' and ':' signs cannot be matched by
  1178.  
  1179.  
  1180. Tatu Ylonen <ylo@ssh.fi>                                       [page 20]
  1181.  
  1182. INTERNET-DRAFT                                            April 23, 1997
  1183.  
  1184. wildcards).  For example, "*@*.hut.fi:*" would give the key the
  1185. authority to assign keys to any e-mail addresses within the hut.fi
  1186. domain.
  1187.  
  1188. The algorithms field is used to specify the encryption algorithms and
  1189. other options that the recipient supports.  It is a comma-separated
  1190. list, where each element begins with an algorithm/option name as
  1191. specified earlier, optionally followed by a space and printable other
  1192. than comma.  No valid names have been specified at this time, but
  1193. examples could include e.g. "smime-rsa1024-3des", "smime-rsa512-rc4-40".
  1194. The idea of the algorithms field is to allow the sender to know which
  1195. algorithms the recipient supports, so that it can choose the best
  1196. algorithms supported by both parties.  Note that in practice this might
  1197. be implemented so that delegation is allowed by the end user's e-mail
  1198. key (e.g., with the form "ylo@ssh.fi:*"), and the user (or user's e-mail
  1199. application, to be accurate) would then delegate the right to either the
  1200. same key or another key that is to be used, and specify the algorithms
  1201. it is willing to receive.
  1202.  
  1203. 7.4.  Login Access
  1204.  
  1205. These certificates would probably contain the name of the user, the host
  1206. to access, and possibly some additional flags e.g. regarding privileges.
  1207. No delegation hierarchy is needed.
  1208.  
  1209. 7.5.  National Public Key Infrastructures
  1210.  
  1211. National public key infrastructure work has traditionally been based on
  1212. X.509.  X.509 is fairly well suited for this kind of applications, as it
  1213. provides a well-understood rigid hierarchy.  Certification is delegated
  1214. by to a number of hierarchial certification authorities.  There may be a
  1215. single root CA, or root CAs may cross-sign each other's keys.
  1216.  
  1217. Each root CA may have a different policy about the semantics of its
  1218. certificates and the form of authentication they require.  For example,
  1219. one CA might give certificates that mean "the key of this
  1220. person/organization is NNN", and might have the policy of requiring two
  1221. independent forms of identification before they issue a certificate.
  1222.  
  1223. There is typically no way to constrain which entities each CA can create
  1224. certificates for (though there might be policy constraints, but these
  1225. are not enforced technically).  The root CA delegates to all subordinate
  1226. CAs the right to create any key-name mappings.
  1227. The verifier normally does not want to care about names on the path from
  1228. the root to the final CA.  Thus, the intermediate name delegations
  1229. should probably use an empty name, so that all naming is delegated to
  1230. the subordinate CA.
  1231.  
  1232. If authorization delegation is also desired, the CA can create both a
  1233. name certificate and a delegation certificate delegating the appropriate
  1234. rights to the end user key.
  1235.  
  1236.  
  1237.  
  1238.  
  1239. Tatu Ylonen <ylo@ssh.fi>                                       [page 21]
  1240.  
  1241. INTERNET-DRAFT                                            April 23, 1997
  1242.  
  1243. 8.  Ascii Representation of Binary Objects
  1244.  
  1245. A standard ASCII representation is needed for SPKI objects.
  1246.  
  1247. An object sequence containing only certificates is represented as
  1248.  
  1249. ***** SPKI CERTIFICATE DATA ************
  1250. <base64 encoding of SPKI objects, specified in RFC1521>
  1251. ***** END OF SPKI CERTIFICATE DATA *****
  1252.  
  1253. An object sequence containing only certificates and signatures is
  1254. represented as
  1255.  
  1256. ***** SPKI SIGNATURE DATA ************
  1257. <base64 encoding of SPKI objects, specified in RFC1521>
  1258. ***** END OF SPKI SIGNATURE DATA *****
  1259.  
  1260. All other object sequences are represented as follows.  This
  1261. representation is always allowed, even when the above alternatives
  1262. apply.  However, implementations are encouraged to use the appropriate
  1263. headers to help users understand what kind of data it is.
  1264.  
  1265. ***** SPKI DATA **********************
  1266. <base64 encoding of SPKI objects, specified in RFC1521>
  1267. ***** END OF SPKI DATA ***************
  1268.  
  1269. Furthermore, the following format is used to specify both a textual
  1270. document that is to be hashed and SPKI data that contains a signature
  1271. (and possibly certificates) for that document.
  1272.  
  1273. ***** SPKI SIGNED DOCUMENT ***********
  1274. <document in cleartext>
  1275. ***** SPKI SIGNATURE DATA ************
  1276. <base64 encoding of SPKI objects, specified in RFC1521>
  1277. ***** END OF SPKI SIGNATURE DATA *****
  1278.  
  1279. For hashing purposes, the document in cleartext is considered to have
  1280. all newlines replaced by a single newline, and to have all trailing
  1281. spaces and tabs at ends of lines removed.  Before wrapping the document
  1282. into this format, all lines starting with "***** SPKI " are changed to
  1283. start with "* ***** SPKI ".  Hashing is done without this
  1284. transformation.  XXX what other transformations or provisions need to be
  1285. made for reliable e-mail transmission?
  1286.  
  1287. Rationale: When passing objects around in e-mail or other similar media,
  1288. it is convenient to roughly specify the type of the object to help the
  1289. user understand what it contains.  The special format for signed
  1290. documents is included to define a readable way to sign documents, e.g.
  1291. for transmission in e-mail.  Experience from PGP suggests that '-' is a
  1292. bad character for starting lines, as it is quoted by very many
  1293. applications, and '=' is a bad character in base-64 encoding as it is
  1294. clobbered by some MIME implementations.
  1295.  
  1296.  
  1297. Tatu Ylonen <ylo@ssh.fi>                                       [page 22]
  1298.