8 .ds RF FORMFEED[Page %]
17 Network Working Group P. Riikonen
19 draft-riikonen-silc-ke-auth-05.txt XXX
25 SILC Key Exchange and Authentication Protocols
26 <draft-riikonen-silc-ke-auth-05.txt>
31 This document is an Internet-Draft and is in full conformance with
32 all provisions of Section 10 of RFC 2026. Internet-Drafts are
33 working documents of the Internet Engineering Task Force (IETF), its
34 areas, and its working groups. Note that other groups may also
35 distribute working documents as Internet-Drafts.
37 Internet-Drafts are draft documents valid for a maximum of six months
38 and may be updated, replaced, or obsoleted by other documents at any
39 time. It is inappropriate to use Internet-Drafts as reference
40 material or to cite them other than as "work in progress."
42 The list of current Internet-Drafts can be accessed at
43 http://www.ietf.org/ietf/1id-abstracts.txt
45 The list of Internet-Draft Shadow Directories can be accessed at
46 http://www.ietf.org/shadow.html
48 The distribution of this memo is unlimited.
54 This memo describes two protocols used in the Secure Internet Live
55 Conferencing (SILC) protocol, specified in the Secure Internet Live
56 Conferencing, Protocol Specification internet-draft [SILC1]. The
57 SILC Key Exchange (SKE) protocol provides secure key exchange between
58 two parties resulting into shared secret key material. The protocol
59 is based on Diffie-Hellman key exchange algorithm and its functionality
60 is derived from several key exchange protocols. SKE uses best parts
61 of the SSH2 Key Exchange protocol, Station-To-Station (STS) protocol
62 and the OAKLEY Key Determination protocol [OAKLEY].
64 The SILC Connection Authentication protocol provides user level
65 authentication used when creating connections in SILC network. The
66 protocol is transparent to the authentication data which means that it
67 can be used to authenticate the user with, for example, passphrase
68 (pre-shared-secret) or public key (and certificate).
76 1 Introduction .................................................. 2
77 1.1 Requirements Terminology .................................. 3
78 2 SILC Key Exchange Protocol .................................... 3
79 2.1 Key Exchange Payloads ..................................... 4
80 2.1.1 Key Exchange Start Payload .......................... 4
81 2.1.2 Key Exchange Payload ................................ 8
82 2.2 Key Exchange Procedure .................................... 10
83 2.3 Processing the Key Material ............................... 12
84 2.4 SILC Key Exchange Groups .................................. 13
85 2.4.1 diffie-hellman-group1 ............................... 14
86 2.4.2 diffie-hellman-group2 ............................... 14
87 2.5 Key Exchange Status Types ................................. 15
88 3 SILC Connection Authentication Protocol ....................... 16
89 3.1 Connection Auth Payload ................................... 18
90 3.2 Connection Authentication Types ........................... 19
91 3.2.1 Passphrase Authentication ........................... 19
92 3.2.2 Public Key Authentication ........................... 19
93 3.3 Connection Authentication Status Types .................... 20
94 4 Security Considerations ....................................... 20
95 5 References .................................................... 20
96 6 Author's Address .............................................. 22
103 Figure 1: Key Exchange Start Payload
104 Figure 2: Key Exchange Payload
105 Figure 3: Connection Auth Payload
111 This memo describes two protocols used in the Secure Internet Live
112 Conferencing (SILC) protocol specified in the Secure Internet Live
113 Conferencing, Protocol Specification Internet-Draft [SILC1]. The
114 SILC Key Exchange (SKE) protocol provides secure key exchange between
115 two parties resulting into shared secret key material. The protocol
116 is based on Diffie-Hellman key exchange algorithm and its functionality
117 is derived from several key exchange protocols. SKE uses best parts
118 of the SSH2 Key Exchange protocol, Station-To-Station (STS) protocol
119 and the OAKLEY Key Determination protocol.
121 The SILC Connection Authentication protocol provides user level
122 authentication used when creating connections in SILC network. The
123 protocol is transparent to the authentication data which means that it
124 can be used to authenticate the user with, for example, pass phrase
125 (pre-shared- secret) or public key (and certificate).
127 The basis of secure SILC session requires strong and secure key exchange
128 protocol and authentication. The authentication protocol is entirely
129 secured and no authentication data is ever sent in the network without
130 encrypting and authenticating it first. Thus, authentication protocol
131 may be used only after the key exchange protocol has been successfully
134 This document refers constantly to other SILC protocol specification
135 Internet Drafts that are a must read for those who wants to understand
136 the function of these protocols. The most important references are
137 the Secure Internet Live Conferencing, Protocol Specification [SILC1]
138 and the SILC Packet Protocol [SILC2] Internet Drafts.
140 The protocol is intended to be used with the SILC protocol thus it
141 does not define own framework that could be used. The framework is
142 provided by the SILC protocol.
146 1.1 Requirements Terminology
148 The keywords MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, RECOMMENDED,
149 MAY, and OPTIONAL, when they appear in this document, are to be
150 interpreted as described in [RFC2119].
154 2 SILC Key Exchange Protocol
156 SILC Key Exchange Protocol (SKE) is used to exchange shared secret
157 between connecting entities. The result of this protocol is a key
158 material used to secure the communication channel. The protocol uses
159 Diffie-Hellman key exchange algorithm and its functionality is derived
160 from several key exchange protocols. SKE uses best parts of the SSH2
161 Key Exchange protocol, Station-To-Station (STS) protocol and the OAKLEY
162 Key Determination protocol. The protocol does not claim any conformance
163 to any of these protocols, they were merely used as a reference when
164 designing this protocol.
166 The purpose of SILC Key Exchange protocol is to create session keys to
167 be used in current SILC session. The keys are valid only for some period
168 of time (usually an hour) or at most until the session ends. These keys
169 are used to protect packets like commands, command replies and other
170 communication between two entities. If connection is server to router
171 connection, the keys are used to protect all traffic between those
172 servers. In client connections usually all the packets are protected
173 with this key except channel messages; channels has their own keys and
174 they are not exchanged with this protocol.
176 The Diffie-Hellman implementation used in the SILC SHOULD be compliant
181 2.1 Key Exchange Payloads
183 During the key exchange procedure public data is sent between initiator
184 and responder. This data is later used in the key exchange procedure.
185 There are several payloads used in the key exchange. As for all SILC
186 packets, SILC Packet Header, described in [SILC2], is at the start of
187 all packets. The same is done with these payloads as well. All the
188 fields in the payloads are always in MSB (most significant byte first)
189 order. Following descriptions of these payloads.
193 2.1.1 Key Exchange Start Payload
195 The key exchange between two entities MUST be started by sending the
196 SILC_PACKET_KEY_EXCHANGE packet containing Key Exchange Start Payload.
197 Initiator sends the Key Exchange Start Payload to the responder filled
198 with all security properties it supports. The responder then checks
199 whether it supports the security properties.
201 It then sends a Key Exchange Start Payload to the initiator filled with
202 security properties it selected from the original payload. The payload
203 sent by responder MUST include only one chosen property per list. The
204 character encoding for the security property values as defined in [SILC1]
205 SHOULD be UTF-8 [RFC2279].
207 The Key Exchange Start Payload is used to tell connecting entities what
208 security properties and algorithms should be used in the communication.
209 The Key Exchange Start Payload is sent only once per session. Even if
210 the PFS (Perfect Forward Secrecy) flag is set the Key Exchange Start
211 Payload is not re-sent. When PFS is desired the Key Exchange Payloads
212 are sent to negotiate new key material. The procedure is equivalent to
213 the very first negotiation except that the Key Exchange Start Payload
216 As this payload is used only with the very first key exchange the payload
217 is never encrypted, as there are no keys to encrypt it with.
219 A cookie is also sent in this payload. A cookie is used to randomize the
220 payload so that none of the key exchange parties can determine this
221 payload before the key exchange procedure starts. The cookie MUST be
222 returned to the original sender by the responder.
224 Following diagram represents the Key Exchange Start Payload. The lists
225 mentioned below are always comma (`,') separated and the list MUST NOT
226 include spaces (` ').
232 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
233 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
234 | RESERVED | Flags | Payload Length |
235 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
243 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
244 | Version String Length | |
245 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
249 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
250 | Key Exchange Grp Length | |
251 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
253 ~ Key Exchange Groups ~
255 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
256 | PKCS Alg Length | |
257 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
261 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
262 | Encryption Alg Length | |
263 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
265 ~ Encryption Algorithms ~
267 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
268 | Hash Alg Length | |
269 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
273 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
275 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
279 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
280 | Compression Alg Length | |
281 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
283 ~ Compression Algorithms ~
285 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
289 Figure 1: Key Exchange Start Payload
294 o RESERVED (1 byte) - Reserved field. Sender fills this with
297 o Flags (1 byte) - Indicates flags to be used in the key
298 exchange. Several flags can be set at once by ORing the
299 flags together. The following flags are reserved for this
304 In this case the field is ignored.
308 If set the receiver of the payload does not reply to
313 Perfect Forward Secrecy (PFS) to be used in the
314 key exchange protocol. If not set, re-keying
315 is performed using the old key. See the [SILC1]
316 for more information on this issue. When PFS is
317 used, re-keying and creating new keys for any
318 particular purpose MUST cause new key exchange.
319 In this key exchange only the Key Exchange Payload
320 is sent and the Key Exchange Start Payload MUST
321 NOT be sent. When doing PFS the Key Exchange
322 Payloads are encrypted with the old keys.
324 Mutual Authentication 0x04
326 Both of the parties will perform authentication
327 by providing signed data for the other party to
328 verify. By default, only responder will provide
329 the signature data. If this is set then the
330 initiator must also provide it. Initiator MAY
331 set this but also responder MAY set this even if
332 initiator did not set it.
334 Rest of the flags are reserved for the future and
337 o Payload Length (2 bytes) - Length of the entire Key Exchange
338 Start payload, not including any other field.
340 o Cookie (16 bytes) - Cookie that randomize this payload so
341 that each of the party cannot determine the payload before
344 o Version String Length (2 bytes) - The length of the Version
345 String field, not including any other field.
347 o Version String (variable length) - Indicates the version of
348 the sender of this payload. Initiator sets this when sending
349 the payload and responder sets this when it replies by sending
350 this payload. See [SILC1] for definition of the version
353 o Key Exchange Grp Length (2 bytes) - The length of the
354 key exchange group list, not including any other field.
356 o Key Exchange Group (variable length) - The list of
357 key exchange groups. See the section 2.4 SILC Key Exchange
358 Groups for definitions of these groups.
360 o PKCS Alg Length (2 bytes) - The length of the PKCS algorithms
361 list, not including any other field.
363 o PKCS Algorithms (variable length) - The list of PKCS
366 o Encryption Alg Length (2 bytes) - The length of the encryption
367 algorithms list, not including any other field.
369 o Encryption Algorithms (variable length) - The list of
370 encryption algorithms.
372 o Hash Alg Length (2 bytes) - The length of the Hash algorithm
373 list, not including any other field.
375 o Hash Algorithms (variable length) - The list of Hash
376 algorithms. The hash algorithms are mainly used in the
379 o HMAC Length (2 bytes) - The length of the HMAC list, not
380 including any other field.
382 o HMACs (variable length) - The list of HMACs. The HMAC's
383 are used to compute the Message Authentication Codes (MAC)
386 o Compression Alg Length (2 bytes) - The length of the
387 compression algorithms list, not including any other field.
389 o Compression Algorithms (variable length) - The list of
390 compression algorithms.
395 2.1.2 Key Exchange Payload
397 Key Exchange payload is used to deliver the public key (or certificate),
398 the computed Diffie-Hellman public value and possibly signature data
399 from one party to the other. When initiator is using this payload
400 and the Mutual Authentication flag is not set then the initiator MUST
401 NOT provide the signature data. If the flag is set then the initiator
402 MUST provide the signature data so that the responder can verify it.
404 The Mutual Authentication flag is usually used when a separate
405 authentication protocol will not be executed for the initiator of the
406 protocol. This is case for example when the SKE is performed between
407 two SILC clients. In normal case, where client is connecting to a
408 server, or server is connecting to a router the Mutual Authentication
409 flag may be omitted. However, if the connection authentication protocol
410 for the connecting entity is not based on public key authentication (it
411 is based on passphrase) then the Mutual Authentication flag SHOULD be
412 enabled. This way the connecting entity has to provide proof of
413 posession of the private key for the public key it will provide in
414 SILC Key Exchange protocol.
416 When performing re-key with PFS selected this is the only payload that
417 is sent in the SKE protocol. The Key Exchange Start Payload MUST NOT
418 be sent at all. However, this payload does not have all the fields
419 present. In the re-key with PFS the public key and a possible signature
420 data SHOULD NOT be present. If they are present they MUST be ignored.
421 The only field that is present is the Public Data that is used to create
422 the new key material. In the re-key the Mutual Authentication flag, that
423 may be set in the initial negotiation, MUST also be ignored.
425 This payload is sent inside SILC_PACKET_KEY_EXCHANGE_1 and inside
426 SILC_PACKET_KEY_EXCHANGE_2 packet types. The initiator uses the
427 SILC_PACKET_KEY_EXCHANGE_1 and the responder the latter.
429 The following diagram represent the Key Exchange Payload.
435 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
436 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
437 | Public Key Length | Public Key Type |
438 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
440 ~ Public Key of the party (or certificate) ~
442 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
443 | Public Data Length | |
444 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
448 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
449 | Signature Length | |
450 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
454 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
458 Figure 2: Key Exchange Payload
462 o Public Key Length (2 bytes) - The length of the Public Key
463 (or certificate) field, not including any other field.
465 o Public Key Type (2 bytes) - The public key (or certificate)
466 type. This field indicates the type of the public key in
467 the packet. Following types are defined:
469 1 SILC style public key (mandatory)
470 2 SSH2 style public key (optional)
471 3 X.509 Version 3 certificate (optional)
472 4 OpenPGP certificate (optional)
473 5 SPKI certificate (optional)
475 The only required type to support is type number 1. See
476 [SILC1] for the SILC public key specification. See
477 SSH public key specification in [SSH-TRANS]. See X.509v3
478 certificate specification in [PKIX-Part1]. See OpenPGP
479 certificate specification in [PGP]. See SPKI certificate
480 specification in [SPKI]. If this field includes zero (0)
481 or unsupported type number the protocol MUST be aborted
482 sending SILC_PACKET_FAILURE message and the connection SHOULD
483 be closed immediately.
485 o Public Key (or certificate) (variable length) - The
486 public key or certificate. The public key or certificate
487 in this field is encoded in the manner as defined in their
488 respective definitions; see previous field.
490 o Public Data Length (2 bytes) - The length of the Public Data
491 field, not including any other field.
493 o Public Data (variable length) - The public data to be
494 sent to the receiver. See section 2.2 Key Exchange
495 Procedure for detailed description how this field is
496 computed. This value is binary encoded.
498 o Signature Length (2 bytes) - The length of the signature,
499 not including any other field.
501 o Signature Data (variable length) - The signature signed
502 by the sender. The receiver of this signature MUST
503 verify it. The verification is done using the sender's
504 public key. See section 2.2 Key Exchange Procedure for
505 detailed description how to produce the signature. If
506 the Mutual Authentication flag is not set then initiator
507 MUST NOT provide this field and the Signature Length field
508 MUST be set to zero (0) value. If the flag is set then
509 also the initiator MUST provide this field. The responder
510 MUST always provide this field.
515 2.2 Key Exchange Procedure
517 The key exchange begins by sending SILC_PACKET_KEY_EXCHANGE packet with
518 Key Exchange Start Payload to select the security properties to be used
519 in the key exchange and later in the communication.
521 After Key Exchange Start Payload has been processed by both of the
522 parties the protocol proceeds as follows:
525 Setup: p is a large and public safe prime. This is one of the
526 Diffie Hellman groups. q is order of subgroup (largest
527 prime factor of p). g is a generator and is defined
528 along with the Diffie Hellman group.
530 1. Initiator generates a random number x, where 1 < x < q,
531 and computes e = g ^ x mod p. The result e is then
532 encoded into Key Exchange Payload, with the public key
533 (or certificate) and sent to the responder.
535 If the Mutual Authentication flag is set then initiator
536 MUST also produce signature data SIGN_i which the responder
537 will verify. The initiator MUST compute a hash value
538 HASH_i = hash(Key Exchange Start Payload | public key
539 (or certificate) | e). It then signs the HASH_i value with
540 its private key resulting a signature SIGN_i.
542 2. Responder generates a random number y, where 1 < y < q,
543 and computes f = g ^ y mod p. It then computes the
544 shared secret KEY = e ^ y mod p, and, a hash value
545 HASH = hash(Key Exchange Start Payload data | public
546 key (or certificate) | Initiator's public key (or
547 certificate) | e | f | KEY). It then signs
548 the HASH value with its private key resulting a signature
551 It then encodes its public key (or certificate), f and
552 SIGN into Key Exchange Payload and sends it to the
555 If the Mutual Authentication flag is set then the responder
556 SHOULD verify that the public key provided in the payload
557 is authentic, or if certificates are used it verifies the
558 certificate. The responder MAY accept the public key without
559 verifying it, however, doing so may result to insecure key
560 exchange (accepting the public key without verifying may be
561 desirable for practical reasons on many environments. For
562 long term use this is never desirable, in which case
563 certificates would be the preferred method to use). It then
564 computes the HASH_i value the same way initiator did in the
565 phase 1. It then verifies the signature SIGN_i from the
566 payload with the hash value HASH_i using the received public
569 3. Initiator verifies that the public key provided in
570 the payload is authentic, or if certificates are used
571 it verifies the certificate. The initiator MAY accept
572 the public key without verifying it, however, doing
573 so may result to insecure key exchange (accepting the
574 public key without verifying may be desirable for
575 practical reasons on many environments. For long term
576 use this is never desirable, in which case certificates
577 would be the preferred method to use).
579 Initiator then computes the shared secret KEY =
580 f ^ x mod p, and, a hash value HASH in the same way as
581 responder did in phase 2. It then verifies the
582 signature SIGN from the payload with the hash value
583 HASH using the received public key.
586 If any of these phases is to fail the SILC_PACKET_FAILURE MUST be sent
587 to indicate that the key exchange protocol has failed, and the connection
588 SHOULD be closed immediately. Any other packets MUST NOT be sent or
589 accepted during the key exchange except the SILC_PACKET_KEY_EXCHANGE_*,
590 SILC_PACKET_FAILURE and SILC_PACKET_SUCCESS packets.
592 The result of this protocol is a shared secret key material KEY and
593 a hash value HASH. The key material itself is not fit to be used as
594 a key, it needs to be processed further to derive the actual keys to be
595 used. The key material is also used to produce other security parameters
596 later used in the communication. See section 2.3 Processing the Key
597 Material for detailed description how to process the key material.
599 If the Mutual Authentication flag was set the protocol produces also
600 a hash value HASH_i. This value, however, must be discarded.
602 After the keys are processed the protocol is ended by sending the
603 SILC_PACKET_SUCCESS packet. Both entities send this packet to
604 each other. After this both parties will start using the new keys.
608 2.3 Processing the Key Material
610 Key Exchange protocol produces secret shared key material KEY. This
611 key material is used to derive the actual keys used in the encryption
612 of the communication channel. The key material is also used to derive
613 other security parameters used in the communication. Key Exchange
614 protocol produces a hash value HASH as well.
616 The keys MUST be derived from the key material as follows:
619 Sending Initial Vector (IV) = hash(0 | KEY | HASH)
620 Receiving Initial Vector (IV) = hash(1 | KEY | HASH)
621 Sending Encryption Key = hash(2 | KEY | HASH)
622 Receiving Encryption Key = hash(3 | KEY | HASH)
623 Sending HMAC Key = hash(4 | KEY | HASH)
624 Receiving HMAC Key = hash(5 | KEY | HASH)
628 The Initial Vector (IV) is used in the encryption when doing for
629 example CBC mode. As many bytes as needed are taken from the start of
630 the hash output for IV. Sending IV is for sending key and receiving IV
631 is for receiving key. For receiving party, the receiving IV is actually
632 sender's sending IV, and, the sending IV is actually sender's receiving
633 IV. Initiator uses IV's as they are (sending IV for sending and
634 receiving IV for receiving).
636 The Encryption Keys are derived as well from the hash(). If the hash()
637 output is too short for the encryption algorithm more key material MUST
638 be produced in the following manner:
641 K1 = hash(2 | KEY | HASH)
642 K2 = hash(KEY | HASH | K1)
643 K3 = hash(KEY | HASH | K1 | K2) ...
645 Sending Encryption Key = K1 | K2 | K3 ...
648 K1 = hash(3 | KEY | HASH)
649 K2 = hash(KEY | HASH | K1)
650 K3 = hash(KEY | HASH | K1 | K2) ...
652 Receiving Encryption Key = K1 | K2 | K3 ...
656 The key is distributed by hashing the previous hash with the original
657 key material. The final key is a concatenation of the hash values.
658 For Receiving Encryption Key the procedure is equivalent. Sending key
659 is used only for encrypting data to be sent. The receiving key is used
660 only to decrypt received data. For receiving party, the receive key is
661 actually sender's sending key, and, the sending key is actually sender's
662 receiving key. Initiator uses generated keys as they are (sending key
663 for sending and receiving key for receiving).
665 The HMAC keys are used to create MAC values to packets in the
666 communication channel. As many bytes as needed are taken from the start
667 of the hash output to generate the MAC keys.
669 These procedures are performed by all parties of the key exchange
670 protocol. This MUST be done before the protocol has been ended by
671 sending the SILC_PACKET_SUCCESS packet.
673 This same procedure is used in the SILC in some other circumstances
674 as well. Any changes to this procedure is mentioned separately when
675 this procedure is needed. See the [SILC1] and the [SILC2] for these
680 2.4 SILC Key Exchange Groups
682 The Following groups may be used in the SILC Key Exchange protocol.
683 The first group diffie-hellman-group1 is REQUIRED, other groups MAY be
684 negotiated to be used in the connection with Key Exchange Start Payload
685 and SILC_PACKET_KEY_EXCHANGE packet. However, the first group MUST be
686 proposed in the Key Exchange Start Payload regardless of any other
687 requested group (however, it does not have to be the first in the list).
691 2.4.1 diffie-hellman-group1
693 The length of this group is 1024 bits. This is REQUIRED group.
694 The prime is 2^1024 - 2^960 - 1 + 2^64 * { [2^894 pi] + 129093 }.
699 179769313486231590770839156793787453197860296048756011706444
700 423684197180216158519368947833795864925541502180565485980503
701 646440548199239100050792877003355816639229553136239076508735
702 759914822574862575007425302077447712589550957937778424442426
703 617334727629299387668709205606050270810842907692932019128194
707 Its hexadecimal value is
710 FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
711 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
712 EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
713 E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
714 EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381
719 The generator used with this prime is g = 2. The group order q is
722 This group was taken from the OAKLEY specification.
726 2.4.2 diffie-hellman-group2
728 The length of this group is 1536 bits. This is OPTIONAL group.
729 The prime is 2^1536 - 2^1472 - 1 + 2^64 * { [2^1406 pi] + 741804 }.
734 241031242692103258855207602219756607485695054850245994265411
735 694195810883168261222889009385826134161467322714147790401219
736 650364895705058263194273070680500922306273474534107340669624
737 601458936165977404102716924945320037872943417032584377865919
738 814376319377685986952408894019557734611984354530154704374720
739 774996976375008430892633929555996888245787241299381012913029
740 459299994792636526405928464720973038494721168143446471443848
741 8520940127459844288859336526896320919633919
744 Its hexadecimal value is
747 FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
748 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
749 EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
750 E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
751 EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE45B3D
752 C2007CB8 A163BF05 98DA4836 1C55D39A 69163FA8 FD24CF5F
753 83655D23 DCA3AD96 1C62F356 208552BB 9ED52907 7096966D
754 670C354E 4ABC9804 F1746C08 CA237327 FFFFFFFF FFFFFFFF
757 The generator used with this prime is g = 2. The group order q is
760 This group was taken from the OAKLEY specification.
764 2.5 Key Exchange Status Types
766 This section defines all key exchange protocol status types that may
767 be returned in the SILC_PACKET_SUCCESS or SILC_PACKET_FAILURE packets
768 to indicate the status of the protocol. Implementations may map the
769 status types to human readable error message. All types except the
770 SILC_SKE_STATUS_OK type MUST be sent in SILC_PACKET_FAILURE packet.
771 The length of status is 32 bits (4 bytes). The following status types
777 Protocol were executed successfully.
780 1 SILC_SKE_STATUS_ERROR
782 Unknown error occurred. No specific error type is defined.
785 2 SILC_SKE_STATUS_BAD_PAYLOAD
787 Provided KE payload were malformed or included bad fields.
790 3 SILC_SKE_STATUS_UNSUPPORTED_GROUP
792 None of the provided groups were supported.
795 4 SILC_SKE_STATUS_UNSUPPORTED_CIPHER
797 None of the provided ciphers were supported.
800 5 SILC_SKE_STATUS_UNSUPPORTED_PKCS
802 None of the provided public key algorithms were supported.
805 6 SILC_SKE_STATUS_UNSUPPORTED_HASH_FUNCTION
807 None of the provided hash functions were supported.
810 7 SILC_SKE_STATUS_UNSUPPORTED_HMAC
812 None of the provided HMACs were supported.
815 8 SILC_SKE_STATUS_UNSUPPORTED_PUBLIC_KEY
817 Provided public key type is not supported.
820 9 SILC_SKE_STATUS_INCORRECT_SIGNATURE
822 Provided signature was incorrect.
825 10 SILC_SKE_STATUS_BAD_VERSION
827 Provided version string was not acceptable.
830 11 SILC_SKE_STATUS_INVALID_COOKIE
832 The cookie in the Key Exchange Start Payload was malformed,
833 because responder modified the cookie.
838 3 SILC Connection Authentication Protocol
840 Purpose of Connection Authentication protocol is to authenticate the
841 connecting party with server. Usually connecting party is client but
842 server may connect to router server as well. Its other purpose is to
843 provide information for the server about which type of connection this
844 is. The type defines whether this is client, server or router
845 connection. Server uses this information to create the ID for the
848 After the authentication protocol has been successfully completed
849 SILC_PACKET_NEW_ID must be sent to the connecting client by the server.
850 See the [SILC1] for the details of the connecting procedure.
852 Server MUST verify the authentication data received and if it is to fail
853 the authentication MUST be failed by sending SILC_PACKET_FAILURE packet.
854 If everything checks out fine the protocol is ended by server by sending
855 SILC_PACKET_SUCCESS packet.
857 The protocol is executed after the SILC Key Exchange protocol. It MUST
858 NOT be executed in any other time. As it is performed after key exchange
859 protocol all traffic in the connection authentication protocol is
860 encrypted with the exchanged keys.
862 The protocol MUST be started by the connecting party by sending the
863 SILC_PACKET_CONNECTION_AUTH packet with Connection Auth Payload,
864 described in the next section. This payload MUST include the
865 authentication data. The authentication data is set according
866 authentication method that MUST be known by both parties. If connecting
867 party does not know what is the mandatory authentication method it MAY
868 request it from the server by sending SILC_PACKET_CONNECTION_AUTH_REQUEST
869 packet. This packet is not part of this protocol and is described in
870 section Connection Auth Request Payload in [SILC2]. However, if
871 connecting party already knows the mandatory authentication method
872 sending the request is not necessary.
874 See [SILC1] and section Connection Auth Request Payload in [SILC2] also
875 for the list of different authentication methods. Authentication method
876 MAY also be NONE, in which case the server does not require
877 authentication at all. However, in this case the protocol still MUST be
878 executed; the authentication data just is empty indicating no
879 authentication is required.
881 If authentication method is passphrase the authentication data is
882 plaintext passphrase. As the payload is entirely encrypted it is safe
883 to have plaintext passphrase. It is also provided as plaintext passphrase
884 because the receiver may need to pass the entire passphrase into a
885 passphrase checker, and hash digest of the passphrase would prevent this.
886 See the section 3.2.1 Passphrase Authentication for more information.
888 If authentication method is public key authentication the authentication
889 data is a signature of the hash value of hash HASH plus Key Exchange
890 Start Payload, established by the SILC Key Exchange protocol. This
891 signature MUST then be verified by the server. See the section 3.2.2
892 Public Key Authentication for more information.
894 The connecting client of this protocol MUST wait after successful execution
895 of this protocol for the SILC_PACKET_NEW_ID packet where it will receive
896 the ID it will be using in the SILC network. The connecting client cannot
897 start normal SILC session (sending messages or commands) until it has
898 received its ID. The ID's are always created by the server except
899 for server to router connection where servers create their own ID's.
903 3.1 Connection Auth Payload
905 Client sends this payload to authenticate itself to the server. Server
906 connecting to another server also sends this payload. Server receiving
907 this payload MUST verify all the data in it and if something is to fail
908 the authentication MUST be failed by sending SILC_PACKET_FAILURE packet.
910 The payload may only be sent with SILC_PACKET_CONNECTION_AUTH packet.
911 It MUST NOT be sent in any other packet type. The following diagram
912 represent the Connection Auth Payload.
918 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
919 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
920 | Payload Length | Connection Type |
921 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
923 ~ Authentication Data ~
925 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
929 Figure 3: Connection Auth Payload
933 o Payload Length (2 bytes) - Length of the entire Connection
936 o Connection Type (2 bytes) - Indicates the type of the
937 connection. See section Connection Auth Request Payload
938 in [SILC2] for the list of connection types. This field MUST
939 include valid connection type or the packet MUST be discarded
940 and authentication MUST be failed.
942 o Authentication Data (variable length) - The actual
943 authentication data. Contents of this depends on the
944 authentication method known by both parties. If no
945 authentication is required this field does not exist.
952 3.2 Connection Authentication Types
954 SILC supports two authentication types to be used in the connection
955 authentication protocol; passphrase or public key based authentication.
956 The following sections defines the authentication methods. See [SILC2]
957 for defined numerical authentication method types.
961 3.2.1 Passphrase Authentication
963 Passphrase authentication or pre-shared-key based authentication is
964 simply an authentication where the party that wants to authenticate
965 itself to the other end sends the passphrase that is required by
966 the other end, for example server. The plaintext passphrase is put
967 to the payload, that is then encrypted. The plaintext passphrase
968 MUST be in UTF-8 [RFC2279] encoding. If the passphrase is in the
969 sender's system in some other encoding it MUST be UTF-8 encoded
970 before transmitted. The receiver MAY change the encoding of the
971 passphrase to its system's default character encoding before verifying
974 If the passphrase matches with the one in the server's end the
975 authentication is successful. Otherwise SILC_PACKET_FAILURE MUST be
976 sent to the sender and the protocol execution fails.
978 This is REQUIRED authentication method to be supported by all SILC
981 When password authentication is used it is RECOMMENDED that maximum
982 amount of padding is applied to the SILC packet. This way it is not
983 possible to approximate the length of the password from the encrypted
988 3.2.2 Public Key Authentication
990 Public key authentication may be used if passphrase based authentication
991 is not desired. The public key authentication works by sending a
992 signature as authentication data to the other end, say, server. The
993 server MUST then verify the signature by the public key of the sender,
994 which the server has received earlier in SKE protocol.
996 The signature is computed using the private key of the sender by signing
997 the HASH value provided by the SKE protocol previously, and the Key
998 Exchange Start Payload from SKE protocol that was sent to the server.
999 These are concatenated and hash function is used to compute a hash value
1000 which is then signed.
1002 auth_hash = hash(HASH | Key Exchange Start Payload);
1003 signature = sign(auth_hash);
1005 The hash() function used to compute the value is the hash function
1006 negotiated in the SKE protocol. The server MUST verify the data, thus
1007 it must keep the HASH and the Key Exchange Start Payload saved during
1008 SKE and authentication protocols.
1010 If the verified signature matches the sent signature, the authentication
1011 were successful and SILC_PACKET_SUCCESS is sent. If it failed the
1012 protocol execution is stopped and SILC_PACKET_FAILURE is sent.
1014 This is REQUIRED authentication method to be supported by all SILC
1019 3.3 Connection Authentication Status Types
1021 This section defines all connection authentication status types that
1022 may be returned in the SILC_PACKET_SUCCESS or SILC_PACKET_FAILURE packets
1023 to indicate the status of the protocol. Implementations may map the
1024 status types to human readable error message. All types except the
1025 SILC_AUTH_STATUS_OK type MUST be sent in SILC_PACKET_FAILURE packet.
1026 The length of status is 32 bits (4 bytes). The following status types
1033 Protocol was executed successfully.
1038 Authentication failed.
1042 4 Security Considerations
1044 Security is central to the design of this protocol, and these security
1045 considerations permeate the specification. Common security considerations
1046 such as keeping private keys truly private and using adequate lengths for
1047 symmetric and asymmetric keys must be followed in order to maintain the
1048 security of this protocol.
1054 [SILC1] Riikonen, P., "Secure Internet Live Conferencing (SILC),
1055 Protocol Specification", Internet Draft, April 2001.
1057 [SILC2] Riikonen, P., "SILC Packet Protocol", Internet Draft,
1060 [SILC4] Riikonen, P., "SILC Commands", Internet Draft, April 2001.
1062 [IRC] Oikarinen, J., and Reed D., "Internet Relay Chat Protocol",
1065 [IRC-ARCH] Kalt, C., "Internet Relay Chat: Architecture", RFC 2810,
1068 [IRC-CHAN] Kalt, C., "Internet Relay Chat: Channel Management", RFC
1071 [IRC-CLIENT] Kalt, C., "Internet Relay Chat: Client Protocol", RFC
1074 [IRC-SERVER] Kalt, C., "Internet Relay Chat: Server Protocol", RFC
1077 [SSH-TRANS] Ylonen, T., et al, "SSH Transport Layer Protocol",
1080 [PGP] Callas, J., et al, "OpenPGP Message Format", RFC 2440,
1083 [SPKI] Ellison C., et al, "SPKI Certificate Theory", RFC 2693,
1086 [PKIX-Part1] Housley, R., et al, "Internet X.509 Public Key
1087 Infrastructure, Certificate and CRL Profile", RFC 2459,
1090 [Schneier] Schneier, B., "Applied Cryptography Second Edition",
1091 John Wiley & Sons, New York, NY, 1996.
1093 [Menezes] Menezes, A., et al, "Handbook of Applied Cryptography",
1096 [OAKLEY] Orman, H., "The OAKLEY Key Determination Protocol",
1097 RFC 2412, November 1998.
1099 [ISAKMP] Maughan D., et al, "Internet Security Association and
1100 Key Management Protocol (ISAKMP)", RFC 2408, November
1103 [IKE] Harkins D., and Carrel D., "The Internet Key Exchange
1104 (IKE)", RFC 2409, November 1998.
1106 [HMAC] Krawczyk, H., "HMAC: Keyed-Hashing for Message
1107 Authentication", RFC 2104, February 1997.
1109 [PKCS1] Kalinski, B., and Staddon, J., "PKCS #1 RSA Cryptography
1110 Specifications, Version 2.0", RFC 2437, October 1998.
1112 [RFC2119] Bradner, S., "Key Words for use in RFCs to Indicate
1113 Requirement Levels", BCP 14, RFC 2119, March 1997.
1115 [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO
1116 10646", RFC 2279, January 1998.
1124 Snellmanninkatu 34 A 15
1128 EMail: priikone@iki.fi
1130 This Internet-Draft expires XXX