idnits 2.17.1 draft-ietf-syslog-sign-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing document type: Expected "INTERNET-DRAFT" in the upper left hand corner of the first page Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Authors' Addresses Section. ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. Miscellaneous warnings: ---------------------------------------------------------------------------- == Unrecognized Status in 'Category: INTERNET-DRAFT', assuming Proposed Standard (Expected one of 'Standards Track', 'Full Standard', 'Draft Standard', 'Proposed Standard', 'Best Current Practice', 'Informational', 'Experimental', 'Informational', 'Historic'.) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'MENEZES' is defined on line 718, but no explicit reference was found in the text == Unused Reference: 'RFC1983' is defined on line 726, but no explicit reference was found in the text == Unused Reference: 'RFC2085' is defined on line 729, but no explicit reference was found in the text == Unused Reference: 'RFC2104' is defined on line 732, but no explicit reference was found in the text == Unused Reference: 'RFC2119' is defined on line 736, but no explicit reference was found in the text == Unused Reference: 'RFC2434' is defined on line 739, but no explicit reference was found in the text == Unused Reference: 'SCHNEIER' is defined on line 750, but no explicit reference was found in the text == Unused Reference: 'SYSLOG-REL' is defined on line 753, but no explicit reference was found in the text -- Possible downref: Non-RFC (?) normative reference: ref. 'DSA94' -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS-180-1' -- Possible downref: Non-RFC (?) normative reference: ref. 'MENEZES' ** Obsolete normative reference: RFC 1750 (Obsoleted by RFC 4086) ** Downref: Normative reference to an Informational RFC: RFC 1983 ** Downref: Normative reference to an Informational RFC: RFC 2104 ** Obsolete normative reference: RFC 2434 (Obsoleted by RFC 5226) ** Obsolete normative reference: RFC 2440 (Obsoleted by RFC 4880) ** Obsolete normative reference: RFC 3164 (Obsoleted by RFC 5424) -- Possible downref: Non-RFC (?) normative reference: ref. 'SCHNEIER' -- Possible downref: Non-RFC (?) normative reference: ref. 'SYSLOG-REL' Summary: 10 errors (**), 0 flaws (~~), 9 warnings (==), 7 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group John Kelsey 2 Category: INTERNET-DRAFT Certicom 3 draft-ietf-syslog-sign-02.txt 4 Expires Mar 2002 Jon Callas 5 September 2001 Wave Systems Corporation 7 Syslog-Sign Protocol 8 draft-ietf-syslog-sign-02.txt 10 Copyright Notice 12 Copyright 2001 by The Internet Society. All Rights Reserved. 14 Status of this Memo 16 This document is an Internet-Draft and is in full conformance with 17 all provisions of Section 10 of RFC2026. 19 Internet-Drafts are working documents of the Internet Engineering 20 Task Force (IETF), its areas, and its working groups. Note that 21 other groups may also distribute working documents as 22 Internet-Drafts. 24 Internet-Drafts are draft documents valid for a maximum of six 25 months and may be updated, replaced, or obsoleted by other documents 26 at any time. It is inappropriate to use Internet-Drafts as 27 reference material or to cite them other than as "work in progress." 29 The list of current Internet-Drafts can be accessed at 30 http://www.ietf.org/ietf/1id-abstracts.txt 32 The list of Internet-Draft Shadow Directories can be accessed at 33 http://www.ietf.org/shadow.html. 35 This work is a product of the IETF syslog Working Group. More 36 information about this effort may be found at 37 http://www.ietf.org/html.charters/syslog-charter.html 39 Comments about this draft should be directed to the syslog working 40 group at the mailing list of syslog-sec@employees.org. 42 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 43 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 44 document are to be interpreted as described in RFC 2119. 46 Abstract 48 This document describes syslog-sign, a mechanism adding origin 49 authentication, message integrity, replay-resistance, message 50 sequencing, and detection of missing messages to syslog. 51 Syslog-sign provides these security features in a way that has 52 minimal requirements and minimal impact on existing syslog 53 implementations. It is possible to support syslog-sign and gain 54 some of its security attributes by only changing the behavior of the 55 devices generating syslog messages. Some additional processing of 56 the received syslog messages and the syslog-sign messages on the 57 relays and collectors may realize additional security benefits. 59 Table of Contents 61 Copyright Notice 1 62 Status of this Memo 1 63 Abstract 1 64 Table of Contents 3 65 1. Introduction 4 66 2. Signature Block Format and Fields 4 67 2.1. syslog Packets Containing a Signature Block 4 68 2.2. Priority 5 69 2.3. Cookie 6 70 2.4. Version 6 71 2.5. Reboot Session ID 6 72 2.6. Signature Group 6 73 2.7. Global Block Counter 6 74 2.8. First Message Number 6 75 2.9. Count 6 76 2.10. Hash Block 7 77 2.11. Signature 7 78 3. Signature Groups 7 79 4. Payload and Certificate Blocks 8 80 4.1. Preliminaries: Key Management and Distribution Issues 8 81 4.2. Building the Payload Block 9 82 4.3. Building the Certificate Block 10 83 5. Redundancy and Flexibility 10 84 5.1. Redundancy 11 85 5.1.1. Certificate Blocks 11 86 5.1.2. Signature Blocks 11 87 5.2. Flexibility 11 88 6. Efficient Verification of Logs 12 89 6.1. Offline Review of Logs 12 90 6.2. Online Review of Logs 13 91 7. Security Considerations 14 92 8. IANA Considerations 15 93 9. Authors and Working Group Chair 15 94 10. Acknowledgements 15 95 11. References 15 96 12. Full Copyright Statement 16 98 1. Introduction 100 Syslog-sign is an enhancement to syslog [RFC3164] that adds origin 101 authentication, message integrity, replay resistance, message 102 sequencing, and detection of missing messages to syslog. This 103 mechanism makes no changes to the syslog packet format but does 104 require strict adherence to that format. A syslog-sign message 105 contains a signature block as the CONTEXT field in the MSG part as 106 defined in Section 4.2.2 of [RFC3164]. This signature block 107 contains a separate digital signature for each of a group of 108 previously sent syslog messages. The overall message is also signed 109 as the last value in this message. 111 Each signature block contains, in effect, a detached signature on 112 some number of previously sent messages. While most implementations 113 of syslog involve only a single device as the generator of each 114 message and a single receiver as the collector of each message, 115 provisions need to be made to cover messages being sent to multiple 116 receivers. This is generally performed based upon the Priority 117 value of the individual messages. For example, messages from any 118 Facility with a Severity value of 3, 2, 1 or 0 may be sent to one 119 collector while all messages of Facilities 4, 10, 13, and 14 may be 120 sent to another collector. Appropriate syslog-sign messages must be 121 kept with their proper syslog messages. To address this, 122 syslog-sign utilizes a signature-group. A signature group 123 identifies a group of messages that are all kept together for 124 signing purposes by the device. A signature block always belongs to 125 exactly one signature group and it always signs messages belonging 126 only to that signature group. 128 The receiver of the previous messages may verify that the digital 129 signature of each received message matches the signature contained 130 in the signature block. A collector may process these signature 131 blocks as they arrive, building an authenticated log file. 132 Alternatively, it may store all the log messages in the order they 133 were received. This allows a network operator to authenticate the 134 log file at the time the logs are reviewed. 136 2. Signature Block Format and Fields 138 Since the device generating the signature block message signs the 139 entire syslog message, it is imperative that the message MUST NOT be 140 changed in transit. In adherence with Section 4.1 of [RFC3164], a 141 fully formed syslog message containing a PRI part and a MSG part 142 containing TIMESTAMP and HOSTNAME fields MUST NOT be changed or 143 modified by any relay. 145 2.1. syslog Packets Containing a Signature Block 147 Signature block messages MUST be completely formed syslog messages. 148 Signature block messages have a PRI part and a MSG part as described 149 in Sections 4.1.1 and 4.1.3 of [RFC3164]. The PRI part MUST have a 150 valid Priority value bounded by angled brackets. The MSG part MUST 151 have a valid TIMESTAMP field as well as a HOSTNAME field. It SHOULD 152 also contain a valid TAG field. It is RECOMMENDED that the TAG 153 field have the value of "syslog " (without the double quotes) to 154 signify that this message was generated by the syslog process. The 155 CONTEXT field of the syslog signature block messages have the 156 following fields. 158 The signature block is composed of the following fields. Recall 159 that every field must be printable ASCII, and any binary values are 160 base-64 encoded. 162 a. PRI (3) 164 b. Cookie (8) 166 c. Version (4) 168 d. Reboot Session ID (8) 170 e. Signature Group (3) 172 f. Global Block Counter (8) 174 g. First Message Number (8) 176 h. Count (2) 178 i. Hash Block (variable, size of hash) 180 j. Signature (variable) 182 These fields are described below. 184 2.2. Priority 186 The signature group priority field is set depending on the settings 187 described in Section 3 below. This field is 1, 2, or 3 characters 188 in length and is terminated with a space character. The value in 189 this field specifies the version of the syslog-sign protocol and is 190 terminated with a space character. This is extensible to allow for 191 different hash algorithms and signature schemes to be used in the 192 future. The value of this field is calculated by determining the 193 base64 encoding of the protocol version, the hash algorithm and the 194 signature scheme. 196 Protocol Version - 2 bytes with the first version being the ABNF 197 value of %b0000000000000001 to denote Version 1. 199 Hash Algorithm - 1 byte with the definition that %b00000001 200 denotes SHA1. [FIPS-180-1] 201 Signature Scheme - 1 byte with the definition that %b00000001 202 denotes OpenPGP DSA [RFC2440], [DSA94]. 204 As such, the version, hash algorithm and signature scheme may be 205 represented as %h00010101. The priority field will be the base64 206 encoding of that value with a space character appended. 208 2.3. Cookie 210 The cookie is a nine-byte sequence to signal that this is a 211 signature block. This sequence is "@#sigSIG " (without the double 212 quotes). 214 2.4. Version 216 The version is 2 bytes with the first version being the ABNF value 217 of %b0000000000000001 to denote Version 1. 219 2.5. Reboot Session ID 221 The reboot session ID is a 48-bit quantity encoded in base 64 as 222 eight bytes, which is required to never repeat or decrease in the 223 lifetime of the device. 225 2.6. Signature Group 227 This is the SIG identifier, described above. It may take on any 228 value from 0-191 inclusive, and is encoded as two bytes in base 64. 230 2.7. Global Block Counter 232 The global block counter is a 48-bit quantity encoded in base 64 as 233 eight bytes, which is the number of signature blocks sent out by 234 syslog-sign before this one, in this reboot session. Note that this 235 counter crosses signature groups; it allows us to roughly 236 synchronize when two messages were sent, even though they went to 237 different collectors. 239 2.8. First Message Number 241 This is a 48-bit quantity encoded in base 64 as eight bytes, which 242 is the unique message number within this signature group of the 243 first message whose hash appears in this block. (That is, if this 244 signature group has processed 1000 messages so far, and the 1001st 245 message from this signature group is the first one whose hash 246 appears in this signature block, then this field is 1001.) 248 2.9. Count 250 The count is a 6-bit quantity encoded in base 64 as one byte, which 251 is the number of message hashes to follow. 253 2.10. Hash Block 255 The hash block is a block of hashes, each separately encoded in 256 base-64. The hashing algorithm used effectively specified by the 257 Version field determines the size of each hash, but the size MUST 258 NOT be shorter than 160 bits. 260 2.11. Signature 262 This is a digital signature, encoded in base-64. The Version field 263 effectively specifies the original encoding of the signature. 265 3. Signature Groups 267 Recall that syslog-sign doesn't alter messages. That means that the 268 signature group of a message doesn't appear anywhere in the message 269 itself. Instead, the device and any intermediate relays use 270 something inside the message to decide where to route it; the device 271 needs to use the same information to decide which signature group a 272 message belongs to. 274 Syslog-sign provides four options for handling signature groups, 275 linking them with PRI values. In all cases, no more than 192 276 signature groups (0-191) are permitted. In this list, SIG is the 277 signature group, and PRI is the PRI value of the signature and 278 certificate blocks in that signature group. 280 a. '0' -- Only one signature group, SIG = 0, PRI = XXX. The same 281 signature group is used for all certificate and signature 282 blocks, and for all messages. 284 b. '1' -- Each PRI value has its own signature group. Signature 285 and certificate blocks for a given signature group have SIG = 286 PRI for that signature group. 288 c. '2' -- Each signature group contains a range of PRI values. 289 Signature groups are assigned sequentially. A certificate or 290 signature block for a given signature group have its SIG value, 291 and the highest PRI value in that signature group. (That is, if 292 signature group 2 has PRI values in the range 100-191, then all 293 signature group 2's signature and certificate blocks will have 294 PRI=191, and SIG=2. 296 d. '3' -- Signature groups are not assigned with any simple 297 relationship to PRI values. A certificate or signature block in 298 a given signature group will have that group's SIG value, and 299 PRI = XXX. 301 Note that options (a) and (b) make the SIG value redundant. 302 However, in installations where log messages are forwarded to 303 different collectors based on some complicated criteria (e.g., 304 whether the message text matches some regular expression), the SIG 305 value gives an easy way for relays to decide where to route 306 signature and certificate blocks. This is necessary, since these 307 blocks almost certainly won't match the regular expressions. 309 Options (a) and (d) set the PRI value to XXX for all signature and 310 certificate blocks. This is intended to make it easier to process 311 these syslog messages separately from others handled by a relay. 312 One reasonable way to configure some installations is to have only 313 one signature group, send messages to many collectors, but send a 314 copy of each signature and certificate block to each collector. 315 This won't allow any collector to detect gaps in the messages, but 316 it will allow all messages that arrive at each collector to be put 317 into the right order, and to be verified. 319 4. Payload and Certificate Blocks 321 Certificate blocks and payload blocks provide key management in 322 syslog-sign. 324 4.1. Preliminaries: Key Management and Distribution Issues 326 The purpose of certificate blocks is to support key management using 327 public key cryptosystems. All devices send at least one certificate 328 block at the beginning of a new reboot session, carrying useful 329 information about the reboot session. 331 There are three key points to understand about certificate blocks: 333 a. They handle a variable-sized payload, fragmenting it if 334 necessary and transmitting the fragments as legal syslog 335 messages. This payload is built (as described below) at the 336 beginning of a reboot session and is transmitted in pieces with 337 each certificate block carrying a piece. Note that there is 338 exactly one payload block per reboot session. 340 b. The certificate blocks are digitally signed. The device does 341 not sign the payload block, but the signatures on the 342 certificate blocks ensure its authenticity. Note that it may 343 not even be possible to verify the signature on the certificate 344 blocks without the information in the payload block; in this 345 case the payload block is reconstructed, the key is extracted, 346 and then the certificate blocks are verified. (This is 347 necessary even when the payload block carries a certificate, 348 since some other fields of the payload block aren't otherwise 349 verified.) In practice, I expect that most installations will 350 keep the same public key over long periods of time, so that most 351 of the time, it's easy to verify the signatures on the 352 certificate blocks, and use the payload block to provide other 353 useful per-session information. 355 c. The kind of payload block that is expected is determined by what 356 kind of key material is on the collector that receives it. The 357 device and collector (or offline log viewer) has both some key 358 material (such as a root public key, or predistributed public 359 key), and an acceptable value for the Key Blob Type in the 360 payload block, below. The collector or offline log viewer MUST 361 NOT accept a payload block of the wrong type. 363 4.2. Building the Payload Block 365 The payload block is built when a new reboot session is started. 366 There is a one-to-one correspondence of reboot sessions to payload 367 blocks. That is, each reboot session has only one payload block, 368 regardless of how many signature groups it may support. 370 The payload block consists of the following: 372 a. Unique identifier of sender; by default, the sender's 128-bit IP 373 address encoded in base-64. 375 b. Full local timestamp for the device, including year if 376 available, at time reboot session started. 378 c. Signature Group Descriptor. This consists of a one-character 379 field specifying how signature groups are assigned. The 380 possibilities are: 382 (i) '0' -- Only one signature group supported. For all 383 signature blocks and certificate blocks, sig == pri == XXX. 385 (ii) '1' -- Each pri value gets its own signature group. For 386 each signature/certificate block, sig == pri. 388 (iii) '2' -- Signature groups are assigned in some way with no 389 simple relationship to pri values; for all 390 signature/certificate blocks, pri = XXX. 392 (iv) '3' -- Signature groups are assigned to ranges of pri 393 values. For each signature/certificate block, pri = largest 394 pri contained within that signature group. 396 d. Highest SIG Value -- a two-byte field base 64 encoded, must be a 397 number between 0 and 191, inclusive. 399 e. Key Blob Type, a one-byte field which holds one of four values: 401 (i) 'C' -- a PKIX certificate. 403 (ii) 'P' -- an OpenPGP certificate. 405 (iii) 'K' -- the public key whose corresponding private key is 406 being used to sign these messages. 408 (iv) 'N' -- no key information sent; key is predistributed. 410 (v) 'U' -- installation-specific key exchange information 412 f. The key blob, consisting of the raw key data, if any, base-64 413 encoded. 415 4.3. Building the Certificate Block 417 The certificate block must get the payload block to the collector. 418 Since certificates can legitimately be much longer than 1024 bytes, 419 each certificate block carries a piece of the payload block. Note 420 that the device MAY make the certificate blocks of any legal length 421 (that is, any length less than 1024 bytes) which will hold all the 422 required fields. Software that processes certificate blocks MUST 423 deal correctly with blocks of any legal length. 425 The certificate block is built as follows: 427 a. A pri value; this value is chosen to ensure that every signature 428 group will get a full set of certificate blocks. 430 b. Cookie -- an eight byte string, "@#sigCer". 432 c. Version -- a 12-bit field encoded in base-64 as two bytes. 434 d. Reboot Session ID -- as above. 436 e. Signature Group -- a 12-bit field encoded in base-64 as two 437 bytes. 439 f. Total Payload Length -- a 32-bit field encoded in base-64 as six 440 bytes. 442 g. Index into Payload -- a 32-bit field encoded in base-64 as six 443 bytes. 445 h. Fragment Length -- a 12-bit field encoded in base-64 as two 446 bytes. 448 i. Payload Fragment -- a fragment of the payload, as specified by 449 the above fields. 451 j. Signature -- a digital signature on fields a-i. 453 5. Redundancy and Flexibility 455 There is a general rule that determines how redundancy works and 456 what level of flexibility the device and collector have in message 457 formats: in general, the device is allowed to send signature and 458 certificate blocks multiple times, to send signature and certificate 459 blocks of any legal length, to include fewer hashes in hash blocks, 460 etc. 462 5.1. Redundancy 464 Syslog messages are sent over unreliable transport, which means that 465 they can be lost in transit. However, the collector must receive 466 signature and certificate blocks or many messages may not be able to 467 be verified. Sending signature and certificate blocks multiple times 468 provides redundancy; since the collector MUST ignore 469 signature/certificate blocks it has already received and 470 authenticated, the device can in principle change its redundancy 471 level for any reason, without communicating this fact to the 472 collector. 474 Although the device isn't constrained in how it decides to send 475 redundant signature and certificate blocks, or even in whether it 476 decides to send along mutliple copies of normal syslog messages, 477 here I define some redundancy parameters below which may be useful 478 in controlling redundant transmission from the device to the 479 collector. 481 5.1.1. Certificate Blocks 483 certInitialRepeat = number of times each certificate block should be 484 sent before the first message is sent. 486 certResendDelay = maximum time delay in seconds to delay before 487 next redundant sending. 489 certResendCount = maximum number of sent messages to delay before 490 next redundant sending. 492 5.1.2. Signature Blocks 494 sigNumberResends = number of times a signature block is resent. 496 sigResendDelay = maximum time delay in seconds from original 497 sending to next redundant sending. 499 sigResendCount = maximum number of sent messages to delay before 500 next redundant sending. 502 5.2. Flexibility 504 The device may change many things about the makeup of signature and 505 certificate blocks in a given reboot session. The things it cannot 506 change are: 508 * The version 510 * The number or arrangements of signature groups 512 It is legitimate for a device to send our short signature blocks, in 513 order to keep the collector able to verify messages quickly. In 514 general, unless something verified by the payload block or 515 certificate blocks is changed within the reboot session ID, any 516 change is allowed to the signature or certificate blocks during the 517 session. The device may send shorter signature and certificate 518 blocks for 520 6. Efficient Verification of Logs 522 The logs secured with syslog-sign may either be reviewed online or 523 offline. Online review is somewhat more complicated and 524 computationally expensive, but not prohibitively so. 526 6.1. Offline Review of Logs 528 When the collector stores logs and reviewed later, they can be 529 authenticated offline just before they are reviewed. Reviewing 530 these logs offline is simple and relatively cheap in terms of 531 resources used, so long as there is enough space available on the 532 reviewing machine. Here, we will consider that the stored log files 533 have already been separated by sender, reboot session ID, and 534 signature group. This can be done very easily with a script file. 535 We then do the following: 537 a. First, we go through the raw log file, and split its contents 538 into three files. Each message in the raw log file is 539 classified as a normal message, a signature block, or a 540 certificate block. Certificate blocks and signature blocks are 541 stored in their own files. Normal messages are stored in a 542 keyed file, indexed on their hash values. 544 b. We sort the certificate block file by index value, and check to 545 see if we have a set of certificate blocks that can reconstruct 546 the payload block. If so, we reconstruct the payload block, 547 verify any key-identifying information, and then use this to 548 verify the signatures on the certificate blocks we've received. 549 When this is done, we have verified the reboot session and key 550 used for the rest of the process. 552 c. We sort the signature block file by firstMessageNumber. We now 553 create an authenticated log file, which will consist of some 554 header information, and then a sequence of message number, 555 message text pairs. We next go through the signature block 556 file. For each signature block in the file, we do the 557 following: 559 (i) Verify the signature on the block. 561 (ii) For each hashed message in the block: 563 (a) Look up the hash value in the keyed message file. 565 (b) If the message is found, write (message number, message 566 text) to the authenticated log file. 568 (iii) Skip all other signature blocks with the same 569 firstMessageNumber. 571 d. The resulting authenticated log file will contain all messages 572 that have been authenticated, and will indicate (by missing 573 message numbers) all gaps in the authenticated messages. 575 It's pretty easy to see that, assuming sufficient space for building 576 the keyed file, this whole process is linear in the number of 577 messages (generally two seeks, one to write and the other to read, 578 per normal message received), and O(N lg N) in the number of 579 signature blocks. This estimate comes with two caveats: first, the 580 signature blocks will arrive very nearly in sorted order, and so can 581 probably be sorted more cheaply on average than O(N lg N) steps. 582 Second, the signature verification on each signature block will 583 almost certainly be more expensive than the sorting step in 584 practice. We haven't discussed error-recovery, which may be 585 necessary for the certificate blocks. In practice, a very simple 586 error-recovery strategy is probably good enough -- if the payload 587 block doesn't come out as valid, then we can just try an alternate 588 instance of each certificate block, if such are available, until we 589 get the payload block right. 591 It's easy for an attacker to flood us with plausible-looking 592 messages, signature blocks, and certificate blocks. 594 6.2. Online Review of Logs 596 Some processes on the collector machine may need to monitor log 597 messages in something very close to real-time. This can be done 598 with syslog-sign, though it is somewhat more complex than the 599 offline analysis. This is done as follows: 601 a. We have an output queue, into which we write (message number, 602 message text) pairs which have been authenticated. Again, we'll 603 assume we're handling only one signature group, and only one 604 reboot session ID, at any given time. 606 b. We have three data structures: A queue into which (message 607 number, hash of message) pairs is kept in sorted order, a queue 608 into which (arrival sequence, hash of message) is kept in sorted 609 order, and a hash table which stores (message text, count) 610 indexed by hash value. In this file, count may be any number 611 greater than zero; when count is zero, the entry in the hash 612 table is cleared. 614 c. We must receive all the certificate blocks before any other 615 processing can really be done. (This is why they're sent 616 first.) Once that's done, any certificate block that arrives is 617 discarded. 619 d. Whenever a normal message arrives, we add (arrival sequence, 620 hash of message) to our message queue. If our hash table has an 621 entry for the message's hash value, we increment its count by 622 one; otherwise, we create a new entry with count = 1. When the 623 message queue is full, we roll the oldest messages off the queue 624 by taking the last entry in the queue, and using it to index the 625 hash table. If that entry has count is 1, we delete the entry 626 in the hash table; otherwise, we decrement its count. We then 627 delete the last entry in the queue. 629 e. Whenever a signature block arrives, we first check to see if the 630 firstMessageNumber value is too old, or if another signature 631 block with that firstMessageNumber has already been received. 632 If so, we discard the signature block unread. Otherwise, we 633 check its signature, and discard it if the signature isn't 634 valid. A signature block contains a sequence of (message 635 number, message hash) pairs. For each pair, we first check to 636 see if the message hash is in the hash table. If so, we write 637 out the (message number, message text) in the authenticated 638 message queue. Otherwise, we write the (message number, message 639 hash) to the message number queue. This generally involves 640 rolling the oldest entry out of this queue: before this is done, 641 that entry's hash value is again searched for in the hash table. 642 If a matching entry is found, the (message number, message 643 text) pair is written out to the authenticated message queue. 644 In either case, the oldest entry is then discarded. 646 f. The result of this is a sequence of messages in the 647 authenticated message queue, each of which has been 648 authenticated, and which are combined with numbers showing their 649 order of original transmission. 651 It's not too hard to see that this whole process is roughly linear 652 in the number of messages, and also in the number of signature 653 blocks received. The process is susceptible to flooding attacks; an 654 attacker can send enough normal messages that the messages roll off 655 their queue before their signature blocks can be processed. 657 7. Security Considerations 659 * As with any technology involving cryptography, you should check 660 the current literature to determine if any algorithms used here 661 have been found to be vulnerable to attack. 663 * This specification uses Public Key Cryptography technologies. 664 The proper party or parties must control the private key portion 665 of a public-private key pair. 667 * Certain operations in this specification involve the use of 668 random numbers. An appropriate entropy source should be used to 669 generate these numbers. See [RFC1750]. 671 8. IANA Considerations 673 As specified in this document, the Priority field contains options 674 for a hash algorithm and signature scheme. Values of zero are 675 reserved. A value of 1 is defined to be SHA-1, and OpenPGP-DSA, 676 respectively. Values 2 through 63 are to be assigned by IANA using 677 the "IETF Consensus" policy defined in RFC2434. Capability Code 678 values 64 through 127 are to be assigned by IANA, using the "First 679 Come First Served" policy defined in RFC2434. Capability Code values 680 128 through 255 are vendor-specific, and values in this range are 681 not to be assigned by IANA. 683 9. Authors and Working Group Chair 685 The working group can be contacted via the current chair: 687 Chris Lonvick 688 Cisco Systems 689 Email: clonvick@cisco.com 691 The authors of this draft are: 693 John Kelsey 694 Email: kelsey.j@ix.netcom.com 696 Jon Callas 697 Email: jon@callas.org 699 10. Acknowledgements 701 The authors wish to thank Alex Brown, Chris Calabrese, Carson 702 Gaspar, Drew Gross, Chris Lonvick, Darrin New, Marshall Rose, Holt 703 Sorenson, Rodney Thayer, and the many Counterpane Internet Security 704 engineering and operations people who commented on various versions 705 of this proposal. 707 11. References 709 [DSA94] NIST, FIPS PUB 186, "Digital Signature Standard", 710 May 1994. 712 [FIPS-180-1] "Secure Hash Standard", National Institute of 713 Standards and Technology, U.S. Department Of 714 Commerce, April 1995. 716 Also known as: 59 Fed Reg 35317 (1994). 718 [MENEZES] Alfred Menezes, Paul van Oorschot, and Scott 719 Vanstone, "Handbook of Applied Cryptography," CRC 720 Press, 1996. 722 [RFC1750] D. Eastlake, S. Crocker, and J. Schiller, 723 "Randomness Recommendations for Security", RFC 724 1750, December 1994. 726 [RFC1983] Malkin, G., "Internet Users' Glossary", FYI 18, RFC 727 1983, August 1996. 729 [RFC2085] M. Oehler and R. Glenn, "HMAC-MD5 IP Authentication 730 with Replay Prevention", RFC 2085, February 1997. 732 [RFC2104] H. Krawczyk, M. Bellare, and R. Canetti, "HMAC: 733 Keyed-Hashing for Message Authentication", RFC 2104 734 February 1997. 736 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 737 Requirement Level", BCP 14, RFC 2119, March 1997. 739 [RFC2434] T. Narten and H. Alvestrand, "Guidelines for 740 Writing an IANA Considerations Section in RFCs", 741 RFC 2434, October 1998 743 [RFC2440] J. Callas, L. Donnerhacke, H. Finney, and R. 744 Thayer,"OpenPGP Message Format", RFC 2440, November 745 1998. 747 [RFC3164] C. Lonvick, "The BSD Syslog Protocol", RFC 3164, 748 August 2001. 750 [SCHNEIER] Schneier, B., "Applied Cryptography Second Edition: 751 protocols, algorithms, and source code in C", 1996. 753 [SYSLOG-REL] D. New, M. Rose, "Reliable Delivery for syslog", 754 work in progress. 756 12. Full Copyright Statement 758 Copyright 2001 by The Internet Society. All Rights Reserved. 760 This document and translations of it may be copied and furnished to 761 others, and derivative works that comment on or otherwise explain it 762 or assist in its implementation may be prepared, copied, published 763 and distributed, in whole or in part, without restriction of any 764 kind, provided that the above copyright notice and this paragraph 765 are included on all such copies and derivative works. However, this 766 document itself may not be modified in any way, such as by removing 767 the copyright notice or references to the Internet Society or other 768 Internet organizations, except as needed for the purpose of 769 developing Internet standards in which case the procedures for 770 copyrights defined in the Internet Standards process must be 771 followed, or as required to translate it into languages other than 772 English. 774 The limited permissions granted above are perpetual and will not be 775 revoked by the Internet Society or its successors or assigns. 777 This document and the information contained herein is provided on an 778 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 779 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 780 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 781 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 782 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.