annotate docs/rfcs/rfc2246.txt @ 914:8961a1a5c96b

Updated Spanish translation
author jorgegonz
date Tue, 24 Apr 2007 22:40:07 +0000
parents e60a6ec4aa85
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
497
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
5
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
6
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
7 Network Working Group T. Dierks
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
8 Request for Comments: 2246 Certicom
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
9 Category: Standards Track C. Allen
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
10 Certicom
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
11 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
12
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
13
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
14 The TLS Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
15 Version 1.0
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
16
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
17 Status of this Memo
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
18
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
19 This document specifies an Internet standards track protocol for the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
20 Internet community, and requests discussion and suggestions for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
21 improvements. Please refer to the current edition of the "Internet
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
22 Official Protocol Standards" (STD 1) for the standardization state
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
23 and status of this protocol. Distribution of this memo is unlimited.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
24
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
25 Copyright Notice
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
26
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
27 Copyright (C) The Internet Society (1999). All Rights Reserved.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
28
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
29 Abstract
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
30
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
31 This document specifies Version 1.0 of the Transport Layer Security
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
32 (TLS) protocol. The TLS protocol provides communications privacy over
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
33 the Internet. The protocol allows client/server applications to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
34 communicate in a way that is designed to prevent eavesdropping,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
35 tampering, or message forgery.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
36
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
37 Table of Contents
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
38
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
39 1. Introduction 3
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
40 2. Goals 4
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
41 3. Goals of this document 5
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
42 4. Presentation language 5
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
43 4.1. Basic block size 6
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
44 4.2. Miscellaneous 6
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
45 4.3. Vectors 6
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
46 4.4. Numbers 7
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
47 4.5. Enumerateds 7
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
48 4.6. Constructed types 8
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
49 4.6.1. Variants 9
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
50 4.7. Cryptographic attributes 10
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
51 4.8. Constants 11
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
52 5. HMAC and the pseudorandom function 11
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
53 6. The TLS Record Protocol 13
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
54 6.1. Connection states 14
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
55
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
56
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
57
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
58 Dierks & Allen Standards Track [Page 1]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
59
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
60 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
61
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
62
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
63 6.2. Record layer 16
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
64 6.2.1. Fragmentation 16
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
65 6.2.2. Record compression and decompression 17
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
66 6.2.3. Record payload protection 18
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
67 6.2.3.1. Null or standard stream cipher 19
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
68 6.2.3.2. CBC block cipher 19
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
69 6.3. Key calculation 21
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
70 6.3.1. Export key generation example 22
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
71 7. The TLS Handshake Protocol 23
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
72 7.1. Change cipher spec protocol 24
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
73 7.2. Alert protocol 24
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
74 7.2.1. Closure alerts 25
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
75 7.2.2. Error alerts 26
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
76 7.3. Handshake Protocol overview 29
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
77 7.4. Handshake protocol 32
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
78 7.4.1. Hello messages 33
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
79 7.4.1.1. Hello request 33
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
80 7.4.1.2. Client hello 34
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
81 7.4.1.3. Server hello 36
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
82 7.4.2. Server certificate 37
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
83 7.4.3. Server key exchange message 39
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
84 7.4.4. Certificate request 41
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
85 7.4.5. Server hello done 42
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
86 7.4.6. Client certificate 43
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
87 7.4.7. Client key exchange message 43
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
88 7.4.7.1. RSA encrypted premaster secret message 44
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
89 7.4.7.2. Client Diffie-Hellman public value 45
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
90 7.4.8. Certificate verify 45
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
91 7.4.9. Finished 46
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
92 8. Cryptographic computations 47
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
93 8.1. Computing the master secret 47
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
94 8.1.1. RSA 48
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
95 8.1.2. Diffie-Hellman 48
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
96 9. Mandatory Cipher Suites 48
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
97 10. Application data protocol 48
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
98 A. Protocol constant values 49
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
99 A.1. Record layer 49
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
100 A.2. Change cipher specs message 50
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
101 A.3. Alert messages 50
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
102 A.4. Handshake protocol 51
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
103 A.4.1. Hello messages 51
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
104 A.4.2. Server authentication and key exchange messages 52
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
105 A.4.3. Client authentication and key exchange messages 53
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
106 A.4.4. Handshake finalization message 54
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
107 A.5. The CipherSuite 54
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
108 A.6. The Security Parameters 56
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
109 B. Glossary 57
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
110 C. CipherSuite definitions 61
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
111
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
112
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
113
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
114 Dierks & Allen Standards Track [Page 2]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
115
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
116 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
117
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
118
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
119 D. Implementation Notes 64
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
120 D.1. Temporary RSA keys 64
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
121 D.2. Random Number Generation and Seeding 64
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
122 D.3. Certificates and authentication 65
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
123 D.4. CipherSuites 65
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
124 E. Backward Compatibility With SSL 66
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
125 E.1. Version 2 client hello 67
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
126 E.2. Avoiding man-in-the-middle version rollback 68
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
127 F. Security analysis 69
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
128 F.1. Handshake protocol 69
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
129 F.1.1. Authentication and key exchange 69
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
130 F.1.1.1. Anonymous key exchange 69
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
131 F.1.1.2. RSA key exchange and authentication 70
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
132 F.1.1.3. Diffie-Hellman key exchange with authentication 71
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
133 F.1.2. Version rollback attacks 71
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
134 F.1.3. Detecting attacks against the handshake protocol 72
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
135 F.1.4. Resuming sessions 72
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
136 F.1.5. MD5 and SHA 72
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
137 F.2. Protecting application data 72
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
138 F.3. Final notes 73
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
139 G. Patent Statement 74
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
140 Security Considerations 75
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
141 References 75
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
142 Credits 77
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
143 Comments 78
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
144 Full Copyright Statement 80
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
145
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
146 1. Introduction
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
147
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
148 The primary goal of the TLS Protocol is to provide privacy and data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
149 integrity between two communicating applications. The protocol is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
150 composed of two layers: the TLS Record Protocol and the TLS Handshake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
151 Protocol. At the lowest level, layered on top of some reliable
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
152 transport protocol (e.g., TCP[TCP]), is the TLS Record Protocol. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
153 TLS Record Protocol provides connection security that has two basic
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
154 properties:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
155
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
156 - The connection is private. Symmetric cryptography is used for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
157 data encryption (e.g., DES [DES], RC4 [RC4], etc.) The keys for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
158 this symmetric encryption are generated uniquely for each
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
159 connection and are based on a secret negotiated by another
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
160 protocol (such as the TLS Handshake Protocol). The Record
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
161 Protocol can also be used without encryption.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
162
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
163 - The connection is reliable. Message transport includes a message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
164 integrity check using a keyed MAC. Secure hash functions (e.g.,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
165 SHA, MD5, etc.) are used for MAC computations. The Record
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
166 Protocol can operate without a MAC, but is generally only used in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
167
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
168
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
169
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
170 Dierks & Allen Standards Track [Page 3]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
171
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
172 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
173
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
174
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
175 this mode while another protocol is using the Record Protocol as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
176 a transport for negotiating security parameters.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
177
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
178 The TLS Record Protocol is used for encapsulation of various higher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
179 level protocols. One such encapsulated protocol, the TLS Handshake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
180 Protocol, allows the server and client to authenticate each other and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
181 to negotiate an encryption algorithm and cryptographic keys before
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
182 the application protocol transmits or receives its first byte of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
183 data. The TLS Handshake Protocol provides connection security that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
184 has three basic properties:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
185
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
186 - The peer's identity can be authenticated using asymmetric, or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
187 public key, cryptography (e.g., RSA [RSA], DSS [DSS], etc.). This
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
188 authentication can be made optional, but is generally required
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
189 for at least one of the peers.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
190
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
191 - The negotiation of a shared secret is secure: the negotiated
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
192 secret is unavailable to eavesdroppers, and for any authenticated
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
193 connection the secret cannot be obtained, even by an attacker who
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
194 can place himself in the middle of the connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
195
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
196 - The negotiation is reliable: no attacker can modify the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
197 negotiation communication without being detected by the parties
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
198 to the communication.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
199
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
200 One advantage of TLS is that it is application protocol independent.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
201 Higher level protocols can layer on top of the TLS Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
202 transparently. The TLS standard, however, does not specify how
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
203 protocols add security with TLS; the decisions on how to initiate TLS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
204 handshaking and how to interpret the authentication certificates
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
205 exchanged are left up to the judgment of the designers and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
206 implementors of protocols which run on top of TLS.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
207
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
208 2. Goals
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
209
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
210 The goals of TLS Protocol, in order of their priority, are:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
211
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
212 1. Cryptographic security: TLS should be used to establish a secure
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
213 connection between two parties.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
214
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
215 2. Interoperability: Independent programmers should be able to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
216 develop applications utilizing TLS that will then be able to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
217 successfully exchange cryptographic parameters without knowledge
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
218 of one another's code.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
219
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
220 3. Extensibility: TLS seeks to provide a framework into which new
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
221 public key and bulk encryption methods can be incorporated as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
222 necessary. This will also accomplish two sub-goals: to prevent
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
223
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
224
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
225
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
226 Dierks & Allen Standards Track [Page 4]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
227
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
228 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
229
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
230
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
231 the need to create a new protocol (and risking the introduction
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
232 of possible new weaknesses) and to avoid the need to implement an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
233 entire new security library.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
234
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
235 4. Relative efficiency: Cryptographic operations tend to be highly
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
236 CPU intensive, particularly public key operations. For this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
237 reason, the TLS protocol has incorporated an optional session
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
238 caching scheme to reduce the number of connections that need to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
239 be established from scratch. Additionally, care has been taken to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
240 reduce network activity.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
241
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
242 3. Goals of this document
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
243
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
244 This document and the TLS protocol itself are based on the SSL 3.0
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
245 Protocol Specification as published by Netscape. The differences
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
246 between this protocol and SSL 3.0 are not dramatic, but they are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
247 significant enough that TLS 1.0 and SSL 3.0 do not interoperate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
248 (although TLS 1.0 does incorporate a mechanism by which a TLS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
249 implementation can back down to SSL 3.0). This document is intended
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
250 primarily for readers who will be implementing the protocol and those
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
251 doing cryptographic analysis of it. The specification has been
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
252 written with this in mind, and it is intended to reflect the needs of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
253 those two groups. For that reason, many of the algorithm-dependent
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
254 data structures and rules are included in the body of the text (as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
255 opposed to in an appendix), providing easier access to them.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
256
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
257 This document is not intended to supply any details of service
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
258 definition nor interface definition, although it does cover select
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
259 areas of policy as they are required for the maintenance of solid
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
260 security.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
261
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
262 4. Presentation language
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
263
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
264 This document deals with the formatting of data in an external
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
265 representation. The following very basic and somewhat casually
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
266 defined presentation syntax will be used. The syntax draws from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
267 several sources in its structure. Although it resembles the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
268 programming language "C" in its syntax and XDR [XDR] in both its
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
269 syntax and intent, it would be risky to draw too many parallels. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
270 purpose of this presentation language is to document TLS only, not to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
271 have general application beyond that particular goal.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
272
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
273
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
274
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
275
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
276
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
277
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
278
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
279
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
280
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
281
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
282 Dierks & Allen Standards Track [Page 5]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
283
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
284 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
285
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
286
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
287 4.1. Basic block size
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
288
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
289 The representation of all data items is explicitly specified. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
290 basic data block size is one byte (i.e. 8 bits). Multiple byte data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
291 items are concatenations of bytes, from left to right, from top to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
292 bottom. From the bytestream a multi-byte item (a numeric in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
293 example) is formed (using C notation) by:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
294
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
295 value = (byte[0] << 8*(n-1)) | (byte[1] << 8*(n-2)) |
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
296 ... | byte[n-1];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
297
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
298 This byte ordering for multi-byte values is the commonplace network
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
299 byte order or big endian format.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
300
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
301 4.2. Miscellaneous
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
302
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
303 Comments begin with "/*" and end with "*/".
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
304
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
305 Optional components are denoted by enclosing them in "[[ ]]" double
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
306 brackets.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
307
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
308 Single byte entities containing uninterpreted data are of type
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
309 opaque.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
310
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
311 4.3. Vectors
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
312
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
313 A vector (single dimensioned array) is a stream of homogeneous data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
314 elements. The size of the vector may be specified at documentation
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
315 time or left unspecified until runtime. In either case the length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
316 declares the number of bytes, not the number of elements, in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
317 vector. The syntax for specifying a new type T' that is a fixed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
318 length vector of type T is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
319
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
320 T T'[n];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
321
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
322 Here T' occupies n bytes in the data stream, where n is a multiple of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
323 the size of T. The length of the vector is not included in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
324 encoded stream.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
325
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
326 In the following example, Datum is defined to be three consecutive
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
327 bytes that the protocol does not interpret, while Data is three
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
328 consecutive Datum, consuming a total of nine bytes.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
329
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
330 opaque Datum[3]; /* three uninterpreted bytes */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
331 Datum Data[9]; /* 3 consecutive 3 byte vectors */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
332
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
333
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
334
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
335
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
336
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
337
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
338 Dierks & Allen Standards Track [Page 6]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
339
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
340 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
341
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
342
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
343 Variable length vectors are defined by specifying a subrange of legal
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
344 lengths, inclusively, using the notation <floor..ceiling>. When
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
345 encoded, the actual length precedes the vector's contents in the byte
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
346 stream. The length will be in the form of a number consuming as many
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
347 bytes as required to hold the vector's specified maximum (ceiling)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
348 length. A variable length vector with an actual length field of zero
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
349 is referred to as an empty vector.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
350
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
351 T T'<floor..ceiling>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
352
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
353 In the following example, mandatory is a vector that must contain
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
354 between 300 and 400 bytes of type opaque. It can never be empty. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
355 actual length field consumes two bytes, a uint16, sufficient to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
356 represent the value 400 (see Section 4.4). On the other hand, longer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
357 can represent up to 800 bytes of data, or 400 uint16 elements, and it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
358 may be empty. Its encoding will include a two byte actual length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
359 field prepended to the vector. The length of an encoded vector must
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
360 be an even multiple of the length of a single element (for example, a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
361 17 byte vector of uint16 would be illegal).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
362
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
363 opaque mandatory<300..400>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
364 /* length field is 2 bytes, cannot be empty */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
365 uint16 longer<0..800>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
366 /* zero to 400 16-bit unsigned integers */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
367
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
368 4.4. Numbers
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
369
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
370 The basic numeric data type is an unsigned byte (uint8). All larger
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
371 numeric data types are formed from fixed length series of bytes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
372 concatenated as described in Section 4.1 and are also unsigned. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
373 following numeric types are predefined.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
374
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
375 uint8 uint16[2];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
376 uint8 uint24[3];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
377 uint8 uint32[4];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
378 uint8 uint64[8];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
379
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
380 All values, here and elsewhere in the specification, are stored in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
381 "network" or "big-endian" order; the uint32 represented by the hex
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
382 bytes 01 02 03 04 is equivalent to the decimal value 16909060.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
383
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
384 4.5. Enumerateds
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
385
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
386 An additional sparse data type is available called enum. A field of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
387 type enum can only assume the values declared in the definition.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
388 Each definition is a different type. Only enumerateds of the same
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
389 type may be assigned or compared. Every element of an enumerated must
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
390
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
391
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
392
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
393
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
394 Dierks & Allen Standards Track [Page 7]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
395
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
396 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
397
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
398
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
399 be assigned a value, as demonstrated in the following example. Since
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
400 the elements of the enumerated are not ordered, they can be assigned
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
401 any unique value, in any order.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
402
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
403 enum { e1(v1), e2(v2), ... , en(vn) [[, (n)]] } Te;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
404
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
405 Enumerateds occupy as much space in the byte stream as would its
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
406 maximal defined ordinal value. The following definition would cause
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
407 one byte to be used to carry fields of type Color.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
408
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
409 enum { red(3), blue(5), white(7) } Color;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
410
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
411 One may optionally specify a value without its associated tag to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
412 force the width definition without defining a superfluous element.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
413 In the following example, Taste will consume two bytes in the data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
414 stream but can only assume the values 1, 2 or 4.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
415
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
416 enum { sweet(1), sour(2), bitter(4), (32000) } Taste;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
417
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
418 The names of the elements of an enumeration are scoped within the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
419 defined type. In the first example, a fully qualified reference to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
420 the second element of the enumeration would be Color.blue. Such
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
421 qualification is not required if the target of the assignment is well
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
422 specified.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
423
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
424 Color color = Color.blue; /* overspecified, legal */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
425 Color color = blue; /* correct, type implicit */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
426
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
427 For enumerateds that are never converted to external representation,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
428 the numerical information may be omitted.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
429
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
430 enum { low, medium, high } Amount;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
431
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
432 4.6. Constructed types
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
433
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
434 Structure types may be constructed from primitive types for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
435 convenience. Each specification declares a new, unique type. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
436 syntax for definition is much like that of C.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
437
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
438 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
439 T1 f1;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
440 T2 f2;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
441 ...
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
442 Tn fn;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
443 } [[T]];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
444
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
445
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
446
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
447
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
448
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
449
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
450 Dierks & Allen Standards Track [Page 8]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
451
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
452 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
453
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
454
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
455 The fields within a structure may be qualified using the type's name
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
456 using a syntax much like that available for enumerateds. For example,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
457 T.f2 refers to the second field of the previous declaration.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
458 Structure definitions may be embedded.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
459
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
460 4.6.1. Variants
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
461
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
462 Defined structures may have variants based on some knowledge that is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
463 available within the environment. The selector must be an enumerated
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
464 type that defines the possible variants the structure defines. There
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
465 must be a case arm for every element of the enumeration declared in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
466 the select. The body of the variant structure may be given a label
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
467 for reference. The mechanism by which the variant is selected at
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
468 runtime is not prescribed by the presentation language.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
469
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
470 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
471 T1 f1;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
472 T2 f2;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
473 ....
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
474 Tn fn;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
475 select (E) {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
476 case e1: Te1;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
477 case e2: Te2;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
478 ....
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
479 case en: Ten;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
480 } [[fv]];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
481 } [[Tv]];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
482
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
483 For example:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
484
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
485 enum { apple, orange } VariantTag;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
486 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
487 uint16 number;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
488 opaque string<0..10>; /* variable length */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
489 } V1;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
490 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
491 uint32 number;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
492 opaque string[10]; /* fixed length */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
493 } V2;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
494 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
495 select (VariantTag) { /* value of selector is implicit */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
496 case apple: V1; /* VariantBody, tag = apple */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
497 case orange: V2; /* VariantBody, tag = orange */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
498 } variant_body; /* optional label on variant */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
499 } VariantRecord;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
500
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
501 Variant structures may be qualified (narrowed) by specifying a value
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
502 for the selector prior to the type. For example, a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
503
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
504
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
505
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
506 Dierks & Allen Standards Track [Page 9]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
507
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
508 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
509
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
510
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
511 orange VariantRecord
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
512
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
513 is a narrowed type of a VariantRecord containing a variant_body of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
514 type V2.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
515
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
516 4.7. Cryptographic attributes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
517
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
518 The four cryptographic operations digital signing, stream cipher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
519 encryption, block cipher encryption, and public key encryption are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
520 designated digitally-signed, stream-ciphered, block-ciphered, and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
521 public-key-encrypted, respectively. A field's cryptographic
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
522 processing is specified by prepending an appropriate key word
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
523 designation before the field's type specification. Cryptographic keys
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
524 are implied by the current session state (see Section 6.1).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
525
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
526 In digital signing, one-way hash functions are used as input for a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
527 signing algorithm. A digitally-signed element is encoded as an opaque
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
528 vector <0..2^16-1>, where the length is specified by the signing
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
529 algorithm and key.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
531 In RSA signing, a 36-byte structure of two hashes (one SHA and one
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
532 MD5) is signed (encrypted with the private key). It is encoded with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
533 PKCS #1 block type 0 or type 1 as described in [PKCS1].
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
534
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
535 In DSS, the 20 bytes of the SHA hash are run directly through the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
536 Digital Signing Algorithm with no additional hashing. This produces
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
537 two values, r and s. The DSS signature is an opaque vector, as above,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
538 the contents of which are the DER encoding of:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
539
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
540 Dss-Sig-Value ::= SEQUENCE {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
541 r INTEGER,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
542 s INTEGER
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
543 }
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
544
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
545 In stream cipher encryption, the plaintext is exclusive-ORed with an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
546 identical amount of output generated from a cryptographically-secure
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
547 keyed pseudorandom number generator.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
548
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
549 In block cipher encryption, every block of plaintext encrypts to a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
550 block of ciphertext. All block cipher encryption is done in CBC
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
551 (Cipher Block Chaining) mode, and all items which are block-ciphered
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
552 will be an exact multiple of the cipher block length.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
553
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
554 In public key encryption, a public key algorithm is used to encrypt
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
555 data in such a way that it can be decrypted only with the matching
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
556 private key. A public-key-encrypted element is encoded as an opaque
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
557 vector <0..2^16-1>, where the length is specified by the signing
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
558 algorithm and key.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
559
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
560
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
561
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
562 Dierks & Allen Standards Track [Page 10]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
563
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
564 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
565
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
566
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
567 An RSA encrypted value is encoded with PKCS #1 block type 2 as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
568 described in [PKCS1].
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
569
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
570 In the following example:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
571
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
572 stream-ciphered struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
573 uint8 field1;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
574 uint8 field2;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
575 digitally-signed opaque hash[20];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
576 } UserType;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
577
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
578 The contents of hash are used as input for the signing algorithm,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
579 then the entire structure is encrypted with a stream cipher. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
580 length of this structure, in bytes would be equal to 2 bytes for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
581 field1 and field2, plus two bytes for the length of the signature,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
582 plus the length of the output of the signing algorithm. This is known
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
583 due to the fact that the algorithm and key used for the signing are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
584 known prior to encoding or decoding this structure.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
585
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
586 4.8. Constants
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
587
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
588 Typed constants can be defined for purposes of specification by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
589 declaring a symbol of the desired type and assigning values to it.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
590 Under-specified types (opaque, variable length vectors, and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
591 structures that contain opaque) cannot be assigned values. No fields
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
592 of a multi-element structure or vector may be elided.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
593
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
594 For example,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
595
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
596 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
597 uint8 f1;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
598 uint8 f2;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
599 } Example1;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
600
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
601 Example1 ex1 = {1, 4}; /* assigns f1 = 1, f2 = 4 */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
602
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
603 5. HMAC and the pseudorandom function
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
604
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
605 A number of operations in the TLS record and handshake layer required
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
606 a keyed MAC; this is a secure digest of some data protected by a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
607 secret. Forging the MAC is infeasible without knowledge of the MAC
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
608 secret. The construction we use for this operation is known as HMAC,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
609 described in [HMAC].
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
610
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
611 HMAC can be used with a variety of different hash algorithms. TLS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
612 uses it in the handshake with two different algorithms: MD5 and SHA-
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
613 1, denoting these as HMAC_MD5(secret, data) and HMAC_SHA(secret,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
614
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
615
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
616
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
617
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
618 Dierks & Allen Standards Track [Page 11]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
619
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
620 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
621
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
622
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
623 data). Additional hash algorithms can be defined by cipher suites and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
624 used to protect record data, but MD5 and SHA-1 are hard coded into
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
625 the description of the handshaking for this version of the protocol.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
626
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
627 In addition, a construction is required to do expansion of secrets
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
628 into blocks of data for the purposes of key generation or validation.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
629 This pseudo-random function (PRF) takes as input a secret, a seed,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
630 and an identifying label and produces an output of arbitrary length.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
631
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
632 In order to make the PRF as secure as possible, it uses two hash
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
633 algorithms in a way which should guarantee its security if either
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
634 algorithm remains secure.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
635
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
636 First, we define a data expansion function, P_hash(secret, data)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
637 which uses a single hash function to expand a secret and seed into an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
638 arbitrary quantity of output:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
639
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
640 P_hash(secret, seed) = HMAC_hash(secret, A(1) + seed) +
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
641 HMAC_hash(secret, A(2) + seed) +
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
642 HMAC_hash(secret, A(3) + seed) + ...
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
643
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
644 Where + indicates concatenation.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
645
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
646 A() is defined as:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
647 A(0) = seed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
648 A(i) = HMAC_hash(secret, A(i-1))
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
649
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
650 P_hash can be iterated as many times as is necessary to produce the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
651 required quantity of data. For example, if P_SHA-1 was being used to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
652 create 64 bytes of data, it would have to be iterated 4 times
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
653 (through A(4)), creating 80 bytes of output data; the last 16 bytes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
654 of the final iteration would then be discarded, leaving 64 bytes of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
655 output data.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
656
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
657 TLS's PRF is created by splitting the secret into two halves and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
658 using one half to generate data with P_MD5 and the other half to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
659 generate data with P_SHA-1, then exclusive-or'ing the outputs of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
660 these two expansion functions together.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
661
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
662 S1 and S2 are the two halves of the secret and each is the same
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
663 length. S1 is taken from the first half of the secret, S2 from the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
664 second half. Their length is created by rounding up the length of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
665 overall secret divided by two; thus, if the original secret is an odd
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
666 number of bytes long, the last byte of S1 will be the same as the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
667 first byte of S2.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
668
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
669 L_S = length in bytes of secret;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
670 L_S1 = L_S2 = ceil(L_S / 2);
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
671
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
672
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
673
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
674 Dierks & Allen Standards Track [Page 12]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
675
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
676 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
677
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
678
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
679 The secret is partitioned into two halves (with the possibility of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
680 one shared byte) as described above, S1 taking the first L_S1 bytes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
681 and S2 the last L_S2 bytes.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
682
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
683 The PRF is then defined as the result of mixing the two pseudorandom
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
684 streams by exclusive-or'ing them together.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
685
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
686 PRF(secret, label, seed) = P_MD5(S1, label + seed) XOR
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
687 P_SHA-1(S2, label + seed);
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
688
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
689 The label is an ASCII string. It should be included in the exact form
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
690 it is given without a length byte or trailing null character. For
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
691 example, the label "slithy toves" would be processed by hashing the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
692 following bytes:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
693
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
694 73 6C 69 74 68 79 20 74 6F 76 65 73
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
695
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
696 Note that because MD5 produces 16 byte outputs and SHA-1 produces 20
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
697 byte outputs, the boundaries of their internal iterations will not be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
698 aligned; to generate a 80 byte output will involve P_MD5 being
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
699 iterated through A(5), while P_SHA-1 will only iterate through A(4).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
700
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
701 6. The TLS Record Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
702
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
703 The TLS Record Protocol is a layered protocol. At each layer,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
704 messages may include fields for length, description, and content.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
705 The Record Protocol takes messages to be transmitted, fragments the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
706 data into manageable blocks, optionally compresses the data, applies
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
707 a MAC, encrypts, and transmits the result. Received data is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
708 decrypted, verified, decompressed, and reassembled, then delivered to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
709 higher level clients.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
710
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
711 Four record protocol clients are described in this document: the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
712 handshake protocol, the alert protocol, the change cipher spec
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
713 protocol, and the application data protocol. In order to allow
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
714 extension of the TLS protocol, additional record types can be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
715 supported by the record protocol. Any new record types should
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
716 allocate type values immediately beyond the ContentType values for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
717 the four record types described here (see Appendix A.2). If a TLS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
718 implementation receives a record type it does not understand, it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
719 should just ignore it. Any protocol designed for use over TLS must be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
720 carefully designed to deal with all possible attacks against it.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
721 Note that because the type and length of a record are not protected
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
722 by encryption, care should be take to minimize the value of traffic
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
723 analysis of these values.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
724
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
725
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
726
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
727
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
728
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
729
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
730 Dierks & Allen Standards Track [Page 13]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
731
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
732 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
733
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
734
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
735 6.1. Connection states
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
736
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
737 A TLS connection state is the operating environment of the TLS Record
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
738 Protocol. It specifies a compression algorithm, encryption algorithm,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
739 and MAC algorithm. In addition, the parameters for these algorithms
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
740 are known: the MAC secret and the bulk encryption keys and IVs for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
741 the connection in both the read and the write directions. Logically,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
742 there are always four connection states outstanding: the current read
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
743 and write states, and the pending read and write states. All records
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
744 are processed under the current read and write states. The security
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
745 parameters for the pending states can be set by the TLS Handshake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
746 Protocol, and the Handshake Protocol can selectively make either of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
747 the pending states current, in which case the appropriate current
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
748 state is disposed of and replaced with the pending state; the pending
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
749 state is then reinitialized to an empty state. It is illegal to make
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
750 a state which has not been initialized with security parameters a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
751 current state. The initial current state always specifies that no
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
752 encryption, compression, or MAC will be used.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
753
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
754 The security parameters for a TLS Connection read and write state are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
755 set by providing the following values:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
756
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
757 connection end
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
758 Whether this entity is considered the "client" or the "server" in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
759 this connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
760
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
761 bulk encryption algorithm
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
762 An algorithm to be used for bulk encryption. This specification
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
763 includes the key size of this algorithm, how much of that key is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
764 secret, whether it is a block or stream cipher, the block size of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
765 the cipher (if appropriate), and whether it is considered an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
766 "export" cipher.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
767
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
768 MAC algorithm
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
769 An algorithm to be used for message authentication. This
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
770 specification includes the size of the hash which is returned by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
771 the MAC algorithm.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
772
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
773 compression algorithm
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
774 An algorithm to be used for data compression. This specification
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
775 must include all information the algorithm requires to do
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
776 compression.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
777
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
778 master secret
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
779 A 48 byte secret shared between the two peers in the connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
780
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
781 client random
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
782 A 32 byte value provided by the client.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
783
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
784
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
785
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
786 Dierks & Allen Standards Track [Page 14]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
787
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
788 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
789
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
790
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
791 server random
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
792 A 32 byte value provided by the server.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
793
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
794 These parameters are defined in the presentation language as:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
795
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
796 enum { server, client } ConnectionEnd;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
797
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
798 enum { null, rc4, rc2, des, 3des, des40 } BulkCipherAlgorithm;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
799
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
800 enum { stream, block } CipherType;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
801
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
802 enum { true, false } IsExportable;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
803
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
804 enum { null, md5, sha } MACAlgorithm;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
805
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
806 enum { null(0), (255) } CompressionMethod;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
807
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
808 /* The algorithms specified in CompressionMethod,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
809 BulkCipherAlgorithm, and MACAlgorithm may be added to. */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
810
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
811 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
812 ConnectionEnd entity;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
813 BulkCipherAlgorithm bulk_cipher_algorithm;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
814 CipherType cipher_type;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
815 uint8 key_size;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
816 uint8 key_material_length;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
817 IsExportable is_exportable;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
818 MACAlgorithm mac_algorithm;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
819 uint8 hash_size;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
820 CompressionMethod compression_algorithm;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
821 opaque master_secret[48];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
822 opaque client_random[32];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
823 opaque server_random[32];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
824 } SecurityParameters;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
825
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
826 The record layer will use the security parameters to generate the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
827 following six items:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
828
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
829 client write MAC secret
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
830 server write MAC secret
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
831 client write key
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
832 server write key
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
833 client write IV (for block ciphers only)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
834 server write IV (for block ciphers only)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
835
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
836 The client write parameters are used by the server when receiving and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
837 processing records and vice-versa. The algorithm used for generating
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
838 these items from the security parameters is described in section 6.3.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
839
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
840
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
841
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
842 Dierks & Allen Standards Track [Page 15]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
843
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
844 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
845
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
846
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
847 Once the security parameters have been set and the keys have been
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
848 generated, the connection states can be instantiated by making them
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
849 the current states. These current states must be updated for each
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
850 record processed. Each connection state includes the following
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
851 elements:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
852
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
853 compression state
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
854 The current state of the compression algorithm.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
855
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
856 cipher state
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
857 The current state of the encryption algorithm. This will consist
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
858 of the scheduled key for that connection. In addition, for block
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
859 ciphers running in CBC mode (the only mode specified for TLS),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
860 this will initially contain the IV for that connection state and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
861 be updated to contain the ciphertext of the last block encrypted
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
862 or decrypted as records are processed. For stream ciphers, this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
863 will contain whatever the necessary state information is to allow
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
864 the stream to continue to encrypt or decrypt data.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
865
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
866 MAC secret
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
867 The MAC secret for this connection as generated above.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
868
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
869 sequence number
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
870 Each connection state contains a sequence number, which is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
871 maintained separately for read and write states. The sequence
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
872 number must be set to zero whenever a connection state is made
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
873 the active state. Sequence numbers are of type uint64 and may not
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
874 exceed 2^64-1. A sequence number is incremented after each
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
875 record: specifically, the first record which is transmitted under
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
876 a particular connection state should use sequence number 0.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
877
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
878 6.2. Record layer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
879
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
880 The TLS Record Layer receives uninterpreted data from higher layers
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
881 in non-empty blocks of arbitrary size.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
882
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
883 6.2.1. Fragmentation
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
884
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
885 The record layer fragments information blocks into TLSPlaintext
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
886 records carrying data in chunks of 2^14 bytes or less. Client message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
887 boundaries are not preserved in the record layer (i.e., multiple
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
888 client messages of the same ContentType may be coalesced into a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
889 single TLSPlaintext record, or a single message may be fragmented
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
890 across several records).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
891
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
892 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
893 uint8 major, minor;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
894 } ProtocolVersion;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
895
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
896
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
897
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
898 Dierks & Allen Standards Track [Page 16]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
899
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
900 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
901
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
902
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
903 enum {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
904 change_cipher_spec(20), alert(21), handshake(22),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
905 application_data(23), (255)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
906 } ContentType;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
907
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
908 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
909 ContentType type;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
910 ProtocolVersion version;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
911 uint16 length;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
912 opaque fragment[TLSPlaintext.length];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
913 } TLSPlaintext;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
914
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
915 type
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
916 The higher level protocol used to process the enclosed fragment.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
917
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
918 version
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
919 The version of the protocol being employed. This document
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
920 describes TLS Version 1.0, which uses the version { 3, 1 }. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
921 version value 3.1 is historical: TLS version 1.0 is a minor
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
922 modification to the SSL 3.0 protocol, which bears the version
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
923 value 3.0. (See Appendix A.1).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
924
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
925 length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
926 The length (in bytes) of the following TLSPlaintext.fragment.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
927 The length should not exceed 2^14.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
928
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
929 fragment
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
930 The application data. This data is transparent and treated as an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
931 independent block to be dealt with by the higher level protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
932 specified by the type field.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
933
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
934 Note: Data of different TLS Record layer content types may be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
935 interleaved. Application data is generally of lower precedence
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
936 for transmission than other content types.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
937
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
938 6.2.2. Record compression and decompression
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
939
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
940 All records are compressed using the compression algorithm defined in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
941 the current session state. There is always an active compression
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
942 algorithm; however, initially it is defined as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
943 CompressionMethod.null. The compression algorithm translates a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
944 TLSPlaintext structure into a TLSCompressed structure. Compression
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
945 functions are initialized with default state information whenever a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
946 connection state is made active.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
947
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
948
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
949
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
950
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
951
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
952
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
953
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
954 Dierks & Allen Standards Track [Page 17]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
955
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
956 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
957
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
958
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
959 Compression must be lossless and may not increase the content length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
960 by more than 1024 bytes. If the decompression function encounters a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
961 TLSCompressed.fragment that would decompress to a length in excess of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
962 2^14 bytes, it should report a fatal decompression failure error.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
963
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
964 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
965 ContentType type; /* same as TLSPlaintext.type */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
966 ProtocolVersion version;/* same as TLSPlaintext.version */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
967 uint16 length;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
968 opaque fragment[TLSCompressed.length];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
969 } TLSCompressed;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
970
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
971 length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
972 The length (in bytes) of the following TLSCompressed.fragment.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
973 The length should not exceed 2^14 + 1024.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
974
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
975 fragment
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
976 The compressed form of TLSPlaintext.fragment.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
977
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
978 Note: A CompressionMethod.null operation is an identity operation; no
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
979 fields are altered.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
980
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
981 Implementation note:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
982 Decompression functions are responsible for ensuring that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
983 messages cannot cause internal buffer overflows.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
984
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
985 6.2.3. Record payload protection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
986
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
987 The encryption and MAC functions translate a TLSCompressed structure
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
988 into a TLSCiphertext. The decryption functions reverse the process.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
989 The MAC of the record also includes a sequence number so that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
990 missing, extra or repeated messages are detectable.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
991
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
992 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
993 ContentType type;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
994 ProtocolVersion version;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
995 uint16 length;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
996 select (CipherSpec.cipher_type) {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
997 case stream: GenericStreamCipher;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
998 case block: GenericBlockCipher;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
999 } fragment;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1000 } TLSCiphertext;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1001
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1002 type
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1003 The type field is identical to TLSCompressed.type.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1004
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1005 version
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1006 The version field is identical to TLSCompressed.version.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1007
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1008
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1009
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1010 Dierks & Allen Standards Track [Page 18]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1011
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1012 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1013
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1014
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1015 length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1016 The length (in bytes) of the following TLSCiphertext.fragment.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1017 The length may not exceed 2^14 + 2048.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1018
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1019 fragment
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1020 The encrypted form of TLSCompressed.fragment, with the MAC.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1021
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1022 6.2.3.1. Null or standard stream cipher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1023
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1024 Stream ciphers (including BulkCipherAlgorithm.null - see Appendix
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1025 A.6) convert TLSCompressed.fragment structures to and from stream
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1026 TLSCiphertext.fragment structures.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1027
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1028 stream-ciphered struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1029 opaque content[TLSCompressed.length];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1030 opaque MAC[CipherSpec.hash_size];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1031 } GenericStreamCipher;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1032
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1033 The MAC is generated as:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1034
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1035 HMAC_hash(MAC_write_secret, seq_num + TLSCompressed.type +
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1036 TLSCompressed.version + TLSCompressed.length +
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1037 TLSCompressed.fragment));
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1038
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1039 where "+" denotes concatenation.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1040
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1041 seq_num
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1042 The sequence number for this record.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1043
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1044 hash
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1045 The hashing algorithm specified by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1046 SecurityParameters.mac_algorithm.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1047
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1048 Note that the MAC is computed before encryption. The stream cipher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1049 encrypts the entire block, including the MAC. For stream ciphers that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1050 do not use a synchronization vector (such as RC4), the stream cipher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1051 state from the end of one record is simply used on the subsequent
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1052 packet. If the CipherSuite is TLS_NULL_WITH_NULL_NULL, encryption
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1053 consists of the identity operation (i.e., the data is not encrypted
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1054 and the MAC size is zero implying that no MAC is used).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1055 TLSCiphertext.length is TLSCompressed.length plus
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1056 CipherSpec.hash_size.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1057
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1058 6.2.3.2. CBC block cipher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1059
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1060 For block ciphers (such as RC2 or DES), the encryption and MAC
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1061 functions convert TLSCompressed.fragment structures to and from block
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1062 TLSCiphertext.fragment structures.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1063
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1064
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1065
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1066 Dierks & Allen Standards Track [Page 19]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1067
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1068 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1069
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1070
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1071 block-ciphered struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1072 opaque content[TLSCompressed.length];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1073 opaque MAC[CipherSpec.hash_size];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1074 uint8 padding[GenericBlockCipher.padding_length];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1075 uint8 padding_length;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1076 } GenericBlockCipher;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1077
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1078 The MAC is generated as described in Section 6.2.3.1.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1079
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1080 padding
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1081 Padding that is added to force the length of the plaintext to be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1082 an integral multiple of the block cipher's block length. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1083 padding may be any length up to 255 bytes long, as long as it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1084 results in the TLSCiphertext.length being an integral multiple of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1085 the block length. Lengths longer than necessary might be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1086 desirable to frustrate attacks on a protocol based on analysis of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1087 the lengths of exchanged messages. Each uint8 in the padding data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1088 vector must be filled with the padding length value.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1089
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1090 padding_length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1091 The padding length should be such that the total size of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1092 GenericBlockCipher structure is a multiple of the cipher's block
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1093 length. Legal values range from zero to 255, inclusive. This
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1094 length specifies the length of the padding field exclusive of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1095 padding_length field itself.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1096
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1097 The encrypted data length (TLSCiphertext.length) is one more than the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1098 sum of TLSCompressed.length, CipherSpec.hash_size, and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1099 padding_length.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1100
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1101 Example: If the block length is 8 bytes, the content length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1102 (TLSCompressed.length) is 61 bytes, and the MAC length is 20
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1103 bytes, the length before padding is 82 bytes. Thus, the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1104 padding length modulo 8 must be equal to 6 in order to make
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1105 the total length an even multiple of 8 bytes (the block
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1106 length). The padding length can be 6, 14, 22, and so on,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1107 through 254. If the padding length were the minimum necessary,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1108 6, the padding would be 6 bytes, each containing the value 6.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1109 Thus, the last 8 octets of the GenericBlockCipher before block
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1110 encryption would be xx 06 06 06 06 06 06 06, where xx is the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1111 last octet of the MAC.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1112
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1113 Note: With block ciphers in CBC mode (Cipher Block Chaining) the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1114 initialization vector (IV) for the first record is generated with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1115 the other keys and secrets when the security parameters are set.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1116 The IV for subsequent records is the last ciphertext block from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1117 the previous record.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1118
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1119
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1120
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1121
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1122 Dierks & Allen Standards Track [Page 20]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1123
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1124 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1125
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1126
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1127 6.3. Key calculation
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1128
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1129 The Record Protocol requires an algorithm to generate keys, IVs, and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1130 MAC secrets from the security parameters provided by the handshake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1131 protocol.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1132
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1133 The master secret is hashed into a sequence of secure bytes, which
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1134 are assigned to the MAC secrets, keys, and non-export IVs required by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1135 the current connection state (see Appendix A.6). CipherSpecs require
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1136 a client write MAC secret, a server write MAC secret, a client write
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1137 key, a server write key, a client write IV, and a server write IV,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1138 which are generated from the master secret in that order. Unused
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1139 values are empty.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1140
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1141 When generating keys and MAC secrets, the master secret is used as an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1142 entropy source, and the random values provide unencrypted salt
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1143 material and IVs for exportable ciphers.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1144
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1145 To generate the key material, compute
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1146
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1147 key_block = PRF(SecurityParameters.master_secret,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1148 "key expansion",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1149 SecurityParameters.server_random +
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1150 SecurityParameters.client_random);
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1151
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1152 until enough output has been generated. Then the key_block is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1153 partitioned as follows:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1154
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1155 client_write_MAC_secret[SecurityParameters.hash_size]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1156 server_write_MAC_secret[SecurityParameters.hash_size]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1157 client_write_key[SecurityParameters.key_material_length]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1158 server_write_key[SecurityParameters.key_material_length]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1159 client_write_IV[SecurityParameters.IV_size]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1160 server_write_IV[SecurityParameters.IV_size]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1161
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1162 The client_write_IV and server_write_IV are only generated for non-
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1163 export block ciphers. For exportable block ciphers, the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1164 initialization vectors are generated later, as described below. Any
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1165 extra key_block material is discarded.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1166
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1167 Implementation note:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1168 The cipher spec which is defined in this document which requires
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1169 the most material is 3DES_EDE_CBC_SHA: it requires 2 x 24 byte
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1170 keys, 2 x 20 byte MAC secrets, and 2 x 8 byte IVs, for a total of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1171 104 bytes of key material.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1172
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1173
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1174
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1175
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1176
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1177
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1178 Dierks & Allen Standards Track [Page 21]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1179
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1180 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1181
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1182
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1183 Exportable encryption algorithms (for which CipherSpec.is_exportable
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1184 is true) require additional processing as follows to derive their
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1185 final write keys:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1186
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1187 final_client_write_key =
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1188 PRF(SecurityParameters.client_write_key,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1189 "client write key",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1190 SecurityParameters.client_random +
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1191 SecurityParameters.server_random);
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1192 final_server_write_key =
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1193 PRF(SecurityParameters.server_write_key,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1194 "server write key",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1195 SecurityParameters.client_random +
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1196 SecurityParameters.server_random);
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1197
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1198 Exportable encryption algorithms derive their IVs solely from the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1199 random values from the hello messages:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1200
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1201 iv_block = PRF("", "IV block", SecurityParameters.client_random +
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1202 SecurityParameters.server_random);
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1203
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1204 The iv_block is partitioned into two initialization vectors as the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1205 key_block was above:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1206
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1207 client_write_IV[SecurityParameters.IV_size]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1208 server_write_IV[SecurityParameters.IV_size]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1209
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1210 Note that the PRF is used without a secret in this case: this just
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1211 means that the secret has a length of zero bytes and contributes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1212 nothing to the hashing in the PRF.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1213
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1214 6.3.1. Export key generation example
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1215
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1216 TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 requires five random bytes for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1217 each of the two encryption keys and 16 bytes for each of the MAC
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1218 keys, for a total of 42 bytes of key material. The PRF output is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1219 stored in the key_block. The key_block is partitioned, and the write
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1220 keys are salted because this is an exportable encryption algorithm.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1221
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1222 key_block = PRF(master_secret,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1223 "key expansion",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1224 server_random +
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1225 client_random)[0..41]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1226 client_write_MAC_secret = key_block[0..15]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1227 server_write_MAC_secret = key_block[16..31]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1228 client_write_key = key_block[32..36]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1229 server_write_key = key_block[37..41]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1230
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1231
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1232
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1233
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1234 Dierks & Allen Standards Track [Page 22]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1235
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1236 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1237
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1238
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1239 final_client_write_key = PRF(client_write_key,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1240 "client write key",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1241 client_random +
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1242 server_random)[0..15]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1243 final_server_write_key = PRF(server_write_key,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1244 "server write key",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1245 client_random +
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1246 server_random)[0..15]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1247
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1248 iv_block = PRF("", "IV block", client_random +
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1249 server_random)[0..15]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1250 client_write_IV = iv_block[0..7]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1251 server_write_IV = iv_block[8..15]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1252
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1253 7. The TLS Handshake Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1254
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1255 The TLS Handshake Protocol consists of a suite of three sub-protocols
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1256 which are used to allow peers to agree upon security parameters for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1257 the record layer, authenticate themselves, instantiate negotiated
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1258 security parameters, and report error conditions to each other.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1259
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1260 The Handshake Protocol is responsible for negotiating a session,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1261 which consists of the following items:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1262
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1263 session identifier
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1264 An arbitrary byte sequence chosen by the server to identify an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1265 active or resumable session state.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1266
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1267 peer certificate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1268 X509v3 [X509] certificate of the peer. This element of the state
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1269 may be null.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1270
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1271 compression method
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1272 The algorithm used to compress data prior to encryption.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1273
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1274 cipher spec
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1275 Specifies the bulk data encryption algorithm (such as null, DES,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1276 etc.) and a MAC algorithm (such as MD5 or SHA). It also defines
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1277 cryptographic attributes such as the hash_size. (See Appendix A.6
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1278 for formal definition)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1279
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1280 master secret
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1281 48-byte secret shared between the client and server.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1282
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1283 is resumable
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1284 A flag indicating whether the session can be used to initiate new
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1285 connections.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1286
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1287
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1288
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1289
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1290 Dierks & Allen Standards Track [Page 23]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1291
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1292 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1293
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1294
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1295 These items are then used to create security parameters for use by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1296 the Record Layer when protecting application data. Many connections
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1297 can be instantiated using the same session through the resumption
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1298 feature of the TLS Handshake Protocol.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1299
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1300 7.1. Change cipher spec protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1301
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1302 The change cipher spec protocol exists to signal transitions in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1303 ciphering strategies. The protocol consists of a single message,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1304 which is encrypted and compressed under the current (not the pending)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1305 connection state. The message consists of a single byte of value 1.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1306
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1307 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1308 enum { change_cipher_spec(1), (255) } type;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1309 } ChangeCipherSpec;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1310
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1311 The change cipher spec message is sent by both the client and server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1312 to notify the receiving party that subsequent records will be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1313 protected under the newly negotiated CipherSpec and keys. Reception
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1314 of this message causes the receiver to instruct the Record Layer to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1315 immediately copy the read pending state into the read current state.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1316 Immediately after sending this message, the sender should instruct
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1317 the record layer to make the write pending state the write active
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1318 state. (See section 6.1.) The change cipher spec message is sent
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1319 during the handshake after the security parameters have been agreed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1320 upon, but before the verifying finished message is sent (see section
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1321 7.4.9).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1322
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1323 7.2. Alert protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1324
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1325 One of the content types supported by the TLS Record layer is the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1326 alert type. Alert messages convey the severity of the message and a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1327 description of the alert. Alert messages with a level of fatal result
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1328 in the immediate termination of the connection. In this case, other
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1329 connections corresponding to the session may continue, but the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1330 session identifier must be invalidated, preventing the failed session
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1331 from being used to establish new connections. Like other messages,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1332 alert messages are encrypted and compressed, as specified by the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1333 current connection state.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1334
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1335 enum { warning(1), fatal(2), (255) } AlertLevel;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1336
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1337 enum {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1338 close_notify(0),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1339 unexpected_message(10),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1340 bad_record_mac(20),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1341 decryption_failed(21),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1342 record_overflow(22),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1343
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1344
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1345
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1346 Dierks & Allen Standards Track [Page 24]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1347
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1348 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1349
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1350
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1351 decompression_failure(30),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1352 handshake_failure(40),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1353 bad_certificate(42),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1354 unsupported_certificate(43),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1355 certificate_revoked(44),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1356 certificate_expired(45),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1357 certificate_unknown(46),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1358 illegal_parameter(47),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1359 unknown_ca(48),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1360 access_denied(49),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1361 decode_error(50),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1362 decrypt_error(51),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1363 export_restriction(60),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1364 protocol_version(70),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1365 insufficient_security(71),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1366 internal_error(80),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1367 user_canceled(90),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1368 no_renegotiation(100),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1369 (255)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1370 } AlertDescription;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1371
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1372 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1373 AlertLevel level;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1374 AlertDescription description;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1375 } Alert;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1376
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1377 7.2.1. Closure alerts
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1378
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1379 The client and the server must share knowledge that the connection is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1380 ending in order to avoid a truncation attack. Either party may
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1381 initiate the exchange of closing messages.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1382
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1383 close_notify
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1384 This message notifies the recipient that the sender will not send
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1385 any more messages on this connection. The session becomes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1386 unresumable if any connection is terminated without proper
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1387 close_notify messages with level equal to warning.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1388
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1389 Either party may initiate a close by sending a close_notify alert.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1390 Any data received after a closure alert is ignored.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1391
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1392 Each party is required to send a close_notify alert before closing
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1393 the write side of the connection. It is required that the other party
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1394 respond with a close_notify alert of its own and close down the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1395 connection immediately, discarding any pending writes. It is not
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1396 required for the initiator of the close to wait for the responding
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1397 close_notify alert before closing the read side of the connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1398
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1399
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1400
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1401
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1402 Dierks & Allen Standards Track [Page 25]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1403
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1404 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1405
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1406
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1407 If the application protocol using TLS provides that any data may be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1408 carried over the underlying transport after the TLS connection is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1409 closed, the TLS implementation must receive the responding
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1410 close_notify alert before indicating to the application layer that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1411 the TLS connection has ended. If the application protocol will not
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1412 transfer any additional data, but will only close the underlying
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1413 transport connection, then the implementation may choose to close the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1414 transport without waiting for the responding close_notify. No part of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1415 this standard should be taken to dictate the manner in which a usage
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1416 profile for TLS manages its data transport, including when
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1417 connections are opened or closed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1418
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1419 NB: It is assumed that closing a connection reliably delivers
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1420 pending data before destroying the transport.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1421
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1422 7.2.2. Error alerts
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1423
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1424 Error handling in the TLS Handshake protocol is very simple. When an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1425 error is detected, the detecting party sends a message to the other
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1426 party. Upon transmission or receipt of an fatal alert message, both
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1427 parties immediately close the connection. Servers and clients are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1428 required to forget any session-identifiers, keys, and secrets
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1429 associated with a failed connection. The following error alerts are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1430 defined:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1431
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1432 unexpected_message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1433 An inappropriate message was received. This alert is always fatal
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1434 and should never be observed in communication between proper
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1435 implementations.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1436
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1437 bad_record_mac
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1438 This alert is returned if a record is received with an incorrect
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1439 MAC. This message is always fatal.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1440
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1441 decryption_failed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1442 A TLSCiphertext decrypted in an invalid way: either it wasn`t an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1443 even multiple of the block length or its padding values, when
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1444 checked, weren`t correct. This message is always fatal.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1445
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1446 record_overflow
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1447 A TLSCiphertext record was received which had a length more than
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1448 2^14+2048 bytes, or a record decrypted to a TLSCompressed record
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1449 with more than 2^14+1024 bytes. This message is always fatal.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1450
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1451 decompression_failure
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1452 The decompression function received improper input (e.g. data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1453 that would expand to excessive length). This message is always
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1454 fatal.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1455
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1456
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1457
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1458 Dierks & Allen Standards Track [Page 26]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1459
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1460 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1461
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1462
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1463 handshake_failure
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1464 Reception of a handshake_failure alert message indicates that the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1465 sender was unable to negotiate an acceptable set of security
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1466 parameters given the options available. This is a fatal error.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1467
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1468 bad_certificate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1469 A certificate was corrupt, contained signatures that did not
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1470 verify correctly, etc.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1471
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1472 unsupported_certificate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1473 A certificate was of an unsupported type.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1474
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1475 certificate_revoked
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1476 A certificate was revoked by its signer.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1477
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1478 certificate_expired
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1479 A certificate has expired or is not currently valid.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1480
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1481 certificate_unknown
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1482 Some other (unspecified) issue arose in processing the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1483 certificate, rendering it unacceptable.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1484
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1485 illegal_parameter
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1486 A field in the handshake was out of range or inconsistent with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1487 other fields. This is always fatal.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1488
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1489 unknown_ca
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1490 A valid certificate chain or partial chain was received, but the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1491 certificate was not accepted because the CA certificate could not
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1492 be located or couldn`t be matched with a known, trusted CA. This
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1493 message is always fatal.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1494
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1495 access_denied
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1496 A valid certificate was received, but when access control was
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1497 applied, the sender decided not to proceed with negotiation.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1498 This message is always fatal.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1499
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1500 decode_error
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1501 A message could not be decoded because some field was out of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1502 specified range or the length of the message was incorrect. This
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1503 message is always fatal.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1504
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1505 decrypt_error
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1506 A handshake cryptographic operation failed, including being
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1507 unable to correctly verify a signature, decrypt a key exchange,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1508 or validate a finished message.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1509
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1510
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1511
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1512
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1513
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1514 Dierks & Allen Standards Track [Page 27]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1515
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1516 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1517
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1518
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1519 export_restriction
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1520 A negotiation not in compliance with export restrictions was
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1521 detected; for example, attempting to transfer a 1024 bit
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1522 ephemeral RSA key for the RSA_EXPORT handshake method. This
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1523 message is always fatal.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1524
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1525 protocol_version
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1526 The protocol version the client has attempted to negotiate is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1527 recognized, but not supported. (For example, old protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1528 versions might be avoided for security reasons). This message is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1529 always fatal.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1530
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1531 insufficient_security
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1532 Returned instead of handshake_failure when a negotiation has
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1533 failed specifically because the server requires ciphers more
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1534 secure than those supported by the client. This message is always
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1535 fatal.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1536
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1537 internal_error
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1538 An internal error unrelated to the peer or the correctness of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1539 protocol makes it impossible to continue (such as a memory
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1540 allocation failure). This message is always fatal.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1541
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1542 user_canceled
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1543 This handshake is being canceled for some reason unrelated to a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1544 protocol failure. If the user cancels an operation after the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1545 handshake is complete, just closing the connection by sending a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1546 close_notify is more appropriate. This alert should be followed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1547 by a close_notify. This message is generally a warning.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1548
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1549 no_renegotiation
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1550 Sent by the client in response to a hello request or by the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1551 server in response to a client hello after initial handshaking.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1552 Either of these would normally lead to renegotiation; when that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1553 is not appropriate, the recipient should respond with this alert;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1554 at that point, the original requester can decide whether to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1555 proceed with the connection. One case where this would be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1556 appropriate would be where a server has spawned a process to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1557 satisfy a request; the process might receive security parameters
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1558 (key length, authentication, etc.) at startup and it might be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1559 difficult to communicate changes to these parameters after that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1560 point. This message is always a warning.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1561
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1562 For all errors where an alert level is not explicitly specified, the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1563 sending party may determine at its discretion whether this is a fatal
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1564 error or not; if an alert with a level of warning is received, the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1565
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1566
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1567
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1568
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1569
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1570 Dierks & Allen Standards Track [Page 28]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1571
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1572 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1573
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1574
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1575 receiving party may decide at its discretion whether to treat this as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1576 a fatal error or not. However, all messages which are transmitted
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1577 with a level of fatal must be treated as fatal messages.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1578
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1579 7.3. Handshake Protocol overview
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1580
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1581 The cryptographic parameters of the session state are produced by the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1582 TLS Handshake Protocol, which operates on top of the TLS Record
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1583 Layer. When a TLS client and server first start communicating, they
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1584 agree on a protocol version, select cryptographic algorithms,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1585 optionally authenticate each other, and use public-key encryption
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1586 techniques to generate shared secrets.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1587
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1588 The TLS Handshake Protocol involves the following steps:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1589
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1590 - Exchange hello messages to agree on algorithms, exchange random
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1591 values, and check for session resumption.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1592
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1593 - Exchange the necessary cryptographic parameters to allow the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1594 client and server to agree on a premaster secret.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1595
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1596 - Exchange certificates and cryptographic information to allow the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1597 client and server to authenticate themselves.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1598
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1599 - Generate a master secret from the premaster secret and exchanged
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1600 random values.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1601
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1602 - Provide security parameters to the record layer.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1603
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1604 - Allow the client and server to verify that their peer has
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1605 calculated the same security parameters and that the handshake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1606 occurred without tampering by an attacker.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1607
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1608 Note that higher layers should not be overly reliant on TLS always
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1609 negotiating the strongest possible connection between two peers:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1610 there are a number of ways a man in the middle attacker can attempt
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1611 to make two entities drop down to the least secure method they
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1612 support. The protocol has been designed to minimize this risk, but
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1613 there are still attacks available: for example, an attacker could
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1614 block access to the port a secure service runs on, or attempt to get
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1615 the peers to negotiate an unauthenticated connection. The fundamental
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1616 rule is that higher levels must be cognizant of what their security
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1617 requirements are and never transmit information over a channel less
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1618 secure than what they require. The TLS protocol is secure, in that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1619 any cipher suite offers its promised level of security: if you
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1620 negotiate 3DES with a 1024 bit RSA key exchange with a host whose
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1621 certificate you have verified, you can expect to be that secure.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1622
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1623
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1624
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1625
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1626 Dierks & Allen Standards Track [Page 29]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1627
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1628 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1629
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1630
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1631 However, you should never send data over a link encrypted with 40 bit
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1632 security unless you feel that data is worth no more than the effort
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1633 required to break that encryption.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1634
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1635 These goals are achieved by the handshake protocol, which can be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1636 summarized as follows: The client sends a client hello message to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1637 which the server must respond with a server hello message, or else a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1638 fatal error will occur and the connection will fail. The client hello
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1639 and server hello are used to establish security enhancement
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1640 capabilities between client and server. The client hello and server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1641 hello establish the following attributes: Protocol Version, Session
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1642 ID, Cipher Suite, and Compression Method. Additionally, two random
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1643 values are generated and exchanged: ClientHello.random and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1644 ServerHello.random.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1645
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1646 The actual key exchange uses up to four messages: the server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1647 certificate, the server key exchange, the client certificate, and the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1648 client key exchange. New key exchange methods can be created by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1649 specifying a format for these messages and defining the use of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1650 messages to allow the client and server to agree upon a shared
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1651 secret. This secret should be quite long; currently defined key
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1652 exchange methods exchange secrets which range from 48 to 128 bytes in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1653 length.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1654
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1655 Following the hello messages, the server will send its certificate,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1656 if it is to be authenticated. Additionally, a server key exchange
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1657 message may be sent, if it is required (e.g. if their server has no
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1658 certificate, or if its certificate is for signing only). If the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1659 server is authenticated, it may request a certificate from the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1660 client, if that is appropriate to the cipher suite selected. Now the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1661 server will send the server hello done message, indicating that the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1662 hello-message phase of the handshake is complete. The server will
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1663 then wait for a client response. If the server has sent a certificate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1664 request message, the client must send the certificate message. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1665 client key exchange message is now sent, and the content of that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1666 message will depend on the public key algorithm selected between the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1667 client hello and the server hello. If the client has sent a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1668 certificate with signing ability, a digitally-signed certificate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1669 verify message is sent to explicitly verify the certificate.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1670
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1671 At this point, a change cipher spec message is sent by the client,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1672 and the client copies the pending Cipher Spec into the current Cipher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1673 Spec. The client then immediately sends the finished message under
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1674 the new algorithms, keys, and secrets. In response, the server will
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1675 send its own change cipher spec message, transfer the pending to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1676 current Cipher Spec, and send its finished message under the new
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1677
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1678
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1679
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1680
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1681
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1682 Dierks & Allen Standards Track [Page 30]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1683
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1684 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1685
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1686
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1687 Cipher Spec. At this point, the handshake is complete and the client
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1688 and server may begin to exchange application layer data. (See flow
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1689 chart below.)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1690
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1691 Client Server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1692
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1693 ClientHello -------->
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1694 ServerHello
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1695 Certificate*
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1696 ServerKeyExchange*
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1697 CertificateRequest*
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1698 <-------- ServerHelloDone
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1699 Certificate*
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1700 ClientKeyExchange
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1701 CertificateVerify*
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1702 [ChangeCipherSpec]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1703 Finished -------->
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1704 [ChangeCipherSpec]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1705 <-------- Finished
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1706 Application Data <-------> Application Data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1707
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1708 Fig. 1 - Message flow for a full handshake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1709
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1710 * Indicates optional or situation-dependent messages that are not
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1711 always sent.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1712
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1713 Note: To help avoid pipeline stalls, ChangeCipherSpec is an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1714 independent TLS Protocol content type, and is not actually a TLS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1715 handshake message.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1716
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1717 When the client and server decide to resume a previous session or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1718 duplicate an existing session (instead of negotiating new security
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1719 parameters) the message flow is as follows:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1720
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1721 The client sends a ClientHello using the Session ID of the session to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1722 be resumed. The server then checks its session cache for a match. If
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1723 a match is found, and the server is willing to re-establish the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1724 connection under the specified session state, it will send a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1725 ServerHello with the same Session ID value. At this point, both
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1726 client and server must send change cipher spec messages and proceed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1727 directly to finished messages. Once the re-establishment is complete,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1728 the client and server may begin to exchange application layer data.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1729 (See flow chart below.) If a Session ID match is not found, the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1730 server generates a new session ID and the TLS client and server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1731 perform a full handshake.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1732
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1733
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1734
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1735
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1736
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1737
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1738 Dierks & Allen Standards Track [Page 31]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1739
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1740 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1741
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1742
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1743 Client Server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1744
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1745 ClientHello -------->
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1746 ServerHello
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1747 [ChangeCipherSpec]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1748 <-------- Finished
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1749 [ChangeCipherSpec]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1750 Finished -------->
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1751 Application Data <-------> Application Data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1752
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1753 Fig. 2 - Message flow for an abbreviated handshake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1754
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1755 The contents and significance of each message will be presented in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1756 detail in the following sections.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1757
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1758 7.4. Handshake protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1759
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1760 The TLS Handshake Protocol is one of the defined higher level clients
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1761 of the TLS Record Protocol. This protocol is used to negotiate the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1762 secure attributes of a session. Handshake messages are supplied to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1763 the TLS Record Layer, where they are encapsulated within one or more
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1764 TLSPlaintext structures, which are processed and transmitted as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1765 specified by the current active session state.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1766
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1767 enum {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1768 hello_request(0), client_hello(1), server_hello(2),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1769 certificate(11), server_key_exchange (12),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1770 certificate_request(13), server_hello_done(14),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1771 certificate_verify(15), client_key_exchange(16),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1772 finished(20), (255)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1773 } HandshakeType;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1774
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1775 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1776 HandshakeType msg_type; /* handshake type */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1777 uint24 length; /* bytes in message */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1778 select (HandshakeType) {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1779 case hello_request: HelloRequest;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1780 case client_hello: ClientHello;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1781 case server_hello: ServerHello;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1782 case certificate: Certificate;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1783 case server_key_exchange: ServerKeyExchange;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1784 case certificate_request: CertificateRequest;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1785 case server_hello_done: ServerHelloDone;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1786 case certificate_verify: CertificateVerify;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1787 case client_key_exchange: ClientKeyExchange;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1788 case finished: Finished;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1789 } body;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1790 } Handshake;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1791
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1792
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1793
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1794 Dierks & Allen Standards Track [Page 32]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1795
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1796 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1797
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1798
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1799 The handshake protocol messages are presented below in the order they
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1800 must be sent; sending handshake messages in an unexpected order
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1801 results in a fatal error. Unneeded handshake messages can be omitted,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1802 however. Note one exception to the ordering: the Certificate message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1803 is used twice in the handshake (from server to client, then from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1804 client to server), but described only in its first position. The one
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1805 message which is not bound by these ordering rules in the Hello
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1806 Request message, which can be sent at any time, but which should be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1807 ignored by the client if it arrives in the middle of a handshake.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1808
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1809 7.4.1. Hello messages
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1810
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1811 The hello phase messages are used to exchange security enhancement
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1812 capabilities between the client and server. When a new session
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1813 begins, the Record Layer's connection state encryption, hash, and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1814 compression algorithms are initialized to null. The current
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1815 connection state is used for renegotiation messages.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1816
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1817 7.4.1.1. Hello request
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1818
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1819 When this message will be sent:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1820 The hello request message may be sent by the server at any time.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1821
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1822 Meaning of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1823 Hello request is a simple notification that the client should
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1824 begin the negotiation process anew by sending a client hello
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1825 message when convenient. This message will be ignored by the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1826 client if the client is currently negotiating a session. This
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1827 message may be ignored by the client if it does not wish to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1828 renegotiate a session, or the client may, if it wishes, respond
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1829 with a no_renegotiation alert. Since handshake messages are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1830 intended to have transmission precedence over application data,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1831 it is expected that the negotiation will begin before no more
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1832 than a few records are received from the client. If the server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1833 sends a hello request but does not receive a client hello in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1834 response, it may close the connection with a fatal alert.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1835
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1836 After sending a hello request, servers should not repeat the request
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1837 until the subsequent handshake negotiation is complete.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1838
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1839 Structure of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1840 struct { } HelloRequest;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1841
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1842 Note: This message should never be included in the message hashes which
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1843 are maintained throughout the handshake and used in the finished
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1844 messages and the certificate verify message.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1845
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1846
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1847
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1848
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1849
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1850 Dierks & Allen Standards Track [Page 33]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1851
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1852 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1853
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1854
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1855 7.4.1.2. Client hello
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1856
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1857 When this message will be sent:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1858 When a client first connects to a server it is required to send
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1859 the client hello as its first message. The client can also send a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1860 client hello in response to a hello request or on its own
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1861 initiative in order to renegotiate the security parameters in an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1862 existing connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1863
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1864 Structure of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1865 The client hello message includes a random structure, which is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1866 used later in the protocol.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1867
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1868 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1869 uint32 gmt_unix_time;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1870 opaque random_bytes[28];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1871 } Random;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1872
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1873 gmt_unix_time
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1874 The current time and date in standard UNIX 32-bit format (seconds
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1875 since the midnight starting Jan 1, 1970, GMT) according to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1876 sender's internal clock. Clocks are not required to be set
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1877 correctly by the basic TLS Protocol; higher level or application
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1878 protocols may define additional requirements.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1879
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1880 random_bytes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1881 28 bytes generated by a secure random number generator.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1882
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1883 The client hello message includes a variable length session
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1884 identifier. If not empty, the value identifies a session between the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1885 same client and server whose security parameters the client wishes to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1886 reuse. The session identifier may be from an earlier connection, this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1887 connection, or another currently active connection. The second option
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1888 is useful if the client only wishes to update the random structures
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1889 and derived values of a connection, while the third option makes it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1890 possible to establish several independent secure connections without
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1891 repeating the full handshake protocol. These independent connections
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1892 may occur sequentially or simultaneously; a SessionID becomes valid
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1893 when the handshake negotiating it completes with the exchange of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1894 Finished messages and persists until removed due to aging or because
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1895 a fatal error was encountered on a connection associated with the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1896 session. The actual contents of the SessionID are defined by the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1897 server.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1898
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1899 opaque SessionID<0..32>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1900
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1901
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1902
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1903
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1904
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1905
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1906 Dierks & Allen Standards Track [Page 34]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1907
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1908 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1909
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1910
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1911 Warning:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1912 Because the SessionID is transmitted without encryption or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1913 immediate MAC protection, servers must not place confidential
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1914 information in session identifiers or let the contents of fake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1915 session identifiers cause any breach of security. (Note that the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1916 content of the handshake as a whole, including the SessionID, is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1917 protected by the Finished messages exchanged at the end of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1918 handshake.)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1919
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1920 The CipherSuite list, passed from the client to the server in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1921 client hello message, contains the combinations of cryptographic
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1922 algorithms supported by the client in order of the client's
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1923 preference (favorite choice first). Each CipherSuite defines a key
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1924 exchange algorithm, a bulk encryption algorithm (including secret key
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1925 length) and a MAC algorithm. The server will select a cipher suite
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1926 or, if no acceptable choices are presented, return a handshake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1927 failure alert and close the connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1928
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1929 uint8 CipherSuite[2]; /* Cryptographic suite selector */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1930
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1931 The client hello includes a list of compression algorithms supported
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1932 by the client, ordered according to the client's preference.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1933
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1934 enum { null(0), (255) } CompressionMethod;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1935
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1936 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1937 ProtocolVersion client_version;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1938 Random random;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1939 SessionID session_id;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1940 CipherSuite cipher_suites<2..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1941 CompressionMethod compression_methods<1..2^8-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1942 } ClientHello;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1943
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1944 client_version
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1945 The version of the TLS protocol by which the client wishes to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1946 communicate during this session. This should be the latest
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1947 (highest valued) version supported by the client. For this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1948 version of the specification, the version will be 3.1 (See
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1949 Appendix E for details about backward compatibility).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1950
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1951 random
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1952 A client-generated random structure.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1953
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1954 session_id
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1955 The ID of a session the client wishes to use for this connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1956 This field should be empty if no session_id is available or the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1957 client wishes to generate new security parameters.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1958
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1959
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1960
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1961
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1962 Dierks & Allen Standards Track [Page 35]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1963
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1964 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1965
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1966
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1967 cipher_suites
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1968 This is a list of the cryptographic options supported by the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1969 client, with the client's first preference first. If the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1970 session_id field is not empty (implying a session resumption
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1971 request) this vector must include at least the cipher_suite from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1972 that session. Values are defined in Appendix A.5.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1973
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1974 compression_methods
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1975 This is a list of the compression methods supported by the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1976 client, sorted by client preference. If the session_id field is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1977 not empty (implying a session resumption request) it must include
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1978 the compression_method from that session. This vector must
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1979 contain, and all implementations must support,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1980 CompressionMethod.null. Thus, a client and server will always be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1981 able to agree on a compression method.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1982
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1983 After sending the client hello message, the client waits for a server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1984 hello message. Any other handshake message returned by the server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1985 except for a hello request is treated as a fatal error.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1986
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1987 Forward compatibility note:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1988 In the interests of forward compatibility, it is permitted for a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1989 client hello message to include extra data after the compression
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1990 methods. This data must be included in the handshake hashes, but
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1991 must otherwise be ignored. This is the only handshake message for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1992 which this is legal; for all other messages, the amount of data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1993 in the message must match the description of the message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1994 precisely.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1995
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1996 7.4.1.3. Server hello
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1997
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1998 When this message will be sent:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1999 The server will send this message in response to a client hello
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2000 message when it was able to find an acceptable set of algorithms.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2001 If it cannot find such a match, it will respond with a handshake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2002 failure alert.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2003
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2004 Structure of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2005 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2006 ProtocolVersion server_version;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2007 Random random;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2008 SessionID session_id;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2009 CipherSuite cipher_suite;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2010 CompressionMethod compression_method;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2011 } ServerHello;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2012
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2013
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2014
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2015
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2016
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2017
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2018 Dierks & Allen Standards Track [Page 36]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2019
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2020 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2021
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2022
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2023 server_version
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2024 This field will contain the lower of that suggested by the client
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2025 in the client hello and the highest supported by the server. For
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2026 this version of the specification, the version is 3.1 (See
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2027 Appendix E for details about backward compatibility).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2028
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2029 random
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2030 This structure is generated by the server and must be different
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2031 from (and independent of) ClientHello.random.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2032
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2033 session_id
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2034 This is the identity of the session corresponding to this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2035 connection. If the ClientHello.session_id was non-empty, the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2036 server will look in its session cache for a match. If a match is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2037 found and the server is willing to establish the new connection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2038 using the specified session state, the server will respond with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2039 the same value as was supplied by the client. This indicates a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2040 resumed session and dictates that the parties must proceed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2041 directly to the finished messages. Otherwise this field will
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2042 contain a different value identifying the new session. The server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2043 may return an empty session_id to indicate that the session will
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2044 not be cached and therefore cannot be resumed. If a session is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2045 resumed, it must be resumed using the same cipher suite it was
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2046 originally negotiated with.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2047
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2048 cipher_suite
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2049 The single cipher suite selected by the server from the list in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2050 ClientHello.cipher_suites. For resumed sessions this field is the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2051 value from the state of the session being resumed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2052
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2053 compression_method
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2054 The single compression algorithm selected by the server from the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2055 list in ClientHello.compression_methods. For resumed sessions
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2056 this field is the value from the resumed session state.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2057
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2058 7.4.2. Server certificate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2059
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2060 When this message will be sent:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2061 The server must send a certificate whenever the agreed-upon key
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2062 exchange method is not an anonymous one. This message will always
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2063 immediately follow the server hello message.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2064
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2065 Meaning of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2066 The certificate type must be appropriate for the selected cipher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2067 suite's key exchange algorithm, and is generally an X.509v3
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2068 certificate. It must contain a key which matches the key exchange
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2069 method, as follows. Unless otherwise specified, the signing
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2070
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2071
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2072
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2073
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2074 Dierks & Allen Standards Track [Page 37]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2075
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2076 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2077
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2078
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2079 algorithm for the certificate must be the same as the algorithm
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2080 for the certificate key. Unless otherwise specified, the public
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2081 key may be of any length.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2082
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2083 Key Exchange Algorithm Certificate Key Type
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2084
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2085 RSA RSA public key; the certificate must
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2086 allow the key to be used for encryption.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2087
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2088 RSA_EXPORT RSA public key of length greater than
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2089 512 bits which can be used for signing,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2090 or a key of 512 bits or shorter which
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2091 can be used for either encryption or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2092 signing.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2093
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2094 DHE_DSS DSS public key.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2095
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2096 DHE_DSS_EXPORT DSS public key.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2097
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2098 DHE_RSA RSA public key which can be used for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2099 signing.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2100
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2101 DHE_RSA_EXPORT RSA public key which can be used for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2102 signing.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2103
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2104 DH_DSS Diffie-Hellman key. The algorithm used
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2105 to sign the certificate should be DSS.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2106
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2107 DH_RSA Diffie-Hellman key. The algorithm used
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2108 to sign the certificate should be RSA.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2109
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2110 All certificate profiles, key and cryptographic formats are defined
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2111 by the IETF PKIX working group [PKIX]. When a key usage extension is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2112 present, the digitalSignature bit must be set for the key to be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2113 eligible for signing, as described above, and the keyEncipherment bit
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2114 must be present to allow encryption, as described above. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2115 keyAgreement bit must be set on Diffie-Hellman certificates.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2116
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2117 As CipherSuites which specify new key exchange methods are specified
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2118 for the TLS Protocol, they will imply certificate format and the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2119 required encoded keying information.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2120
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2121 Structure of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2122 opaque ASN.1Cert<1..2^24-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2123
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2124 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2125 ASN.1Cert certificate_list<0..2^24-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2126 } Certificate;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2127
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2128
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2129
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2130 Dierks & Allen Standards Track [Page 38]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2131
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2132 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2133
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2134
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2135 certificate_list
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2136 This is a sequence (chain) of X.509v3 certificates. The sender's
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2137 certificate must come first in the list. Each following
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2138 certificate must directly certify the one preceding it. Because
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2139 certificate validation requires that root keys be distributed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2140 independently, the self-signed certificate which specifies the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2141 root certificate authority may optionally be omitted from the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2142 chain, under the assumption that the remote end must already
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2143 possess it in order to validate it in any case.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2144
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2145 The same message type and structure will be used for the client's
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2146 response to a certificate request message. Note that a client may
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2147 send no certificates if it does not have an appropriate certificate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2148 to send in response to the server's authentication request.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2149
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2150 Note: PKCS #7 [PKCS7] is not used as the format for the certificate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2151 vector because PKCS #6 [PKCS6] extended certificates are not
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2152 used. Also PKCS #7 defines a SET rather than a SEQUENCE, making
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2153 the task of parsing the list more difficult.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2154
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2155 7.4.3. Server key exchange message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2156
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2157 When this message will be sent:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2158 This message will be sent immediately after the server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2159 certificate message (or the server hello message, if this is an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2160 anonymous negotiation).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2161
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2162 The server key exchange message is sent by the server only when
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2163 the server certificate message (if sent) does not contain enough
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2164 data to allow the client to exchange a premaster secret. This is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2165 true for the following key exchange methods:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2166
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2167 RSA_EXPORT (if the public key in the server certificate is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2168 longer than 512 bits)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2169 DHE_DSS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2170 DHE_DSS_EXPORT
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2171 DHE_RSA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2172 DHE_RSA_EXPORT
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2173 DH_anon
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2174
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2175 It is not legal to send the server key exchange message for the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2176 following key exchange methods:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2177
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2178 RSA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2179 RSA_EXPORT (when the public key in the server certificate is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2180 less than or equal to 512 bits in length)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2181 DH_DSS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2182 DH_RSA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2183
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2184
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2185
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2186 Dierks & Allen Standards Track [Page 39]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2187
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2188 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2189
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2190
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2191 Meaning of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2192 This message conveys cryptographic information to allow the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2193 client to communicate the premaster secret: either an RSA public
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2194 key to encrypt the premaster secret with, or a Diffie-Hellman
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2195 public key with which the client can complete a key exchange
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2196 (with the result being the premaster secret.)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2197
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2198 As additional CipherSuites are defined for TLS which include new key
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2199 exchange algorithms, the server key exchange message will be sent if
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2200 and only if the certificate type associated with the key exchange
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2201 algorithm does not provide enough information for the client to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2202 exchange a premaster secret.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2203
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2204 Note: According to current US export law, RSA moduli larger than 512
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2205 bits may not be used for key exchange in software exported from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2206 the US. With this message, the larger RSA keys encoded in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2207 certificates may be used to sign temporary shorter RSA keys for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2208 the RSA_EXPORT key exchange method.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2209
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2210 Structure of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2211 enum { rsa, diffie_hellman } KeyExchangeAlgorithm;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2212
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2213 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2214 opaque rsa_modulus<1..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2215 opaque rsa_exponent<1..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2216 } ServerRSAParams;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2217
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2218 rsa_modulus
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2219 The modulus of the server's temporary RSA key.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2220
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2221 rsa_exponent
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2222 The public exponent of the server's temporary RSA key.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2223
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2224 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2225 opaque dh_p<1..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2226 opaque dh_g<1..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2227 opaque dh_Ys<1..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2228 } ServerDHParams; /* Ephemeral DH parameters */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2229
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2230 dh_p
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2231 The prime modulus used for the Diffie-Hellman operation.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2232
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2233 dh_g
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2234 The generator used for the Diffie-Hellman operation.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2235
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2236 dh_Ys
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2237 The server's Diffie-Hellman public value (g^X mod p).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2238
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2239
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2240
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2241
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2242 Dierks & Allen Standards Track [Page 40]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2243
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2244 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2245
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2246
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2247 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2248 select (KeyExchangeAlgorithm) {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2249 case diffie_hellman:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2250 ServerDHParams params;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2251 Signature signed_params;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2252 case rsa:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2253 ServerRSAParams params;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2254 Signature signed_params;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2255 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2256 } ServerKeyExchange;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2257
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2258 params
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2259 The server's key exchange parameters.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2260
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2261 signed_params
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2262 For non-anonymous key exchanges, a hash of the corresponding
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2263 params value, with the signature appropriate to that hash
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2264 applied.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2265
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2266 md5_hash
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2267 MD5(ClientHello.random + ServerHello.random + ServerParams);
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2268
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2269 sha_hash
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2270 SHA(ClientHello.random + ServerHello.random + ServerParams);
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2271
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2272 enum { anonymous, rsa, dsa } SignatureAlgorithm;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2273
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2274 select (SignatureAlgorithm)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2275 { case anonymous: struct { };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2276 case rsa:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2277 digitally-signed struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2278 opaque md5_hash[16];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2279 opaque sha_hash[20];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2280 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2281 case dsa:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2282 digitally-signed struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2283 opaque sha_hash[20];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2284 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2285 } Signature;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2286
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2287 7.4.4. Certificate request
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2288
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2289 When this message will be sent:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2290 A non-anonymous server can optionally request a certificate from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2291 the client, if appropriate for the selected cipher suite. This
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2292 message, if sent, will immediately follow the Server Key Exchange
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2293 message (if it is sent; otherwise, the Server Certificate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2294 message).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2295
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2296
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2297
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2298 Dierks & Allen Standards Track [Page 41]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2299
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2300 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2301
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2302
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2303 Structure of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2304 enum {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2305 rsa_sign(1), dss_sign(2), rsa_fixed_dh(3), dss_fixed_dh(4),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2306 (255)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2307 } ClientCertificateType;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2308
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2309 opaque DistinguishedName<1..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2310
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2311 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2312 ClientCertificateType certificate_types<1..2^8-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2313 DistinguishedName certificate_authorities<3..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2314 } CertificateRequest;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2315
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2316 certificate_types
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2317 This field is a list of the types of certificates requested,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2318 sorted in order of the server's preference.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2319
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2320 certificate_authorities
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2321 A list of the distinguished names of acceptable certificate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2322 authorities. These distinguished names may specify a desired
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2323 distinguished name for a root CA or for a subordinate CA;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2324 thus, this message can be used both to describe known roots
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2325 and a desired authorization space.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2326
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2327 Note: DistinguishedName is derived from [X509].
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2328
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2329 Note: It is a fatal handshake_failure alert for an anonymous server to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2330 request client identification.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2331
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2332 7.4.5. Server hello done
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2333
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2334 When this message will be sent:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2335 The server hello done message is sent by the server to indicate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2336 the end of the server hello and associated messages. After
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2337 sending this message the server will wait for a client response.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2338
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2339 Meaning of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2340 This message means that the server is done sending messages to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2341 support the key exchange, and the client can proceed with its
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2342 phase of the key exchange.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2343
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2344 Upon receipt of the server hello done message the client should
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2345 verify that the server provided a valid certificate if required
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2346 and check that the server hello parameters are acceptable.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2347
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2348 Structure of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2349 struct { } ServerHelloDone;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2350
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2351
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2352
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2353
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2354 Dierks & Allen Standards Track [Page 42]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2355
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2356 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2357
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2358
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2359 7.4.6. Client certificate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2360
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2361 When this message will be sent:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2362 This is the first message the client can send after receiving a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2363 server hello done message. This message is only sent if the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2364 server requests a certificate. If no suitable certificate is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2365 available, the client should send a certificate message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2366 containing no certificates. If client authentication is required
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2367 by the server for the handshake to continue, it may respond with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2368 a fatal handshake failure alert. Client certificates are sent
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2369 using the Certificate structure defined in Section 7.4.2.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2370
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2371 Note: When using a static Diffie-Hellman based key exchange method
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2372 (DH_DSS or DH_RSA), if client authentication is requested, the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2373 Diffie-Hellman group and generator encoded in the client's
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2374 certificate must match the server specified Diffie-Hellman
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2375 parameters if the client's parameters are to be used for the key
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2376 exchange.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2377
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2378 7.4.7. Client key exchange message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2379
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2380 When this message will be sent:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2381 This message is always sent by the client. It will immediately
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2382 follow the client certificate message, if it is sent. Otherwise
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2383 it will be the first message sent by the client after it receives
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2384 the server hello done message.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2385
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2386 Meaning of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2387 With this message, the premaster secret is set, either though
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2388 direct transmission of the RSA-encrypted secret, or by the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2389 transmission of Diffie-Hellman parameters which will allow each
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2390 side to agree upon the same premaster secret. When the key
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2391 exchange method is DH_RSA or DH_DSS, client certification has
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2392 been requested, and the client was able to respond with a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2393 certificate which contained a Diffie-Hellman public key whose
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2394 parameters (group and generator) matched those specified by the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2395 server in its certificate, this message will not contain any
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2396 data.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2397
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2398 Structure of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2399 The choice of messages depends on which key exchange method has
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2400 been selected. See Section 7.4.3 for the KeyExchangeAlgorithm
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2401 definition.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2402
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2403 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2404 select (KeyExchangeAlgorithm) {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2405 case rsa: EncryptedPreMasterSecret;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2406 case diffie_hellman: ClientDiffieHellmanPublic;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2407
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2408
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2409
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2410 Dierks & Allen Standards Track [Page 43]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2411
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2412 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2413
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2414
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2415 } exchange_keys;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2416 } ClientKeyExchange;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2417
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2418 7.4.7.1. RSA encrypted premaster secret message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2419
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2420 Meaning of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2421 If RSA is being used for key agreement and authentication, the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2422 client generates a 48-byte premaster secret, encrypts it using
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2423 the public key from the server's certificate or the temporary RSA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2424 key provided in a server key exchange message, and sends the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2425 result in an encrypted premaster secret message. This structure
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2426 is a variant of the client key exchange message, not a message in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2427 itself.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2428
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2429 Structure of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2430 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2431 ProtocolVersion client_version;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2432 opaque random[46];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2433 } PreMasterSecret;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2434
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2435 client_version
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2436 The latest (newest) version supported by the client. This is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2437 used to detect version roll-back attacks. Upon receiving the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2438 premaster secret, the server should check that this value
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2439 matches the value transmitted by the client in the client
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2440 hello message.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2441
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2442 random
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2443 46 securely-generated random bytes.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2444
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2445 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2446 public-key-encrypted PreMasterSecret pre_master_secret;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2447 } EncryptedPreMasterSecret;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2448
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2449 Note: An attack discovered by Daniel Bleichenbacher [BLEI] can be used
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2450 to attack a TLS server which is using PKCS#1 encoded RSA. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2451 attack takes advantage of the fact that by failing in different
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2452 ways, a TLS server can be coerced into revealing whether a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2453 particular message, when decrypted, is properly PKCS#1 formatted
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2454 or not.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2455
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2456 The best way to avoid vulnerability to this attack is to treat
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2457 incorrectly formatted messages in a manner indistinguishable from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2458 correctly formatted RSA blocks. Thus, when it receives an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2459 incorrectly formatted RSA block, a server should generate a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2460 random 48-byte value and proceed using it as the premaster
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2461 secret. Thus, the server will act identically whether the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2462 received RSA block is correctly encoded or not.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2463
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2464
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2465
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2466 Dierks & Allen Standards Track [Page 44]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2467
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2468 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2469
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2470
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2471 pre_master_secret
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2472 This random value is generated by the client and is used to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2473 generate the master secret, as specified in Section 8.1.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2474
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2475 7.4.7.2. Client Diffie-Hellman public value
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2476
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2477 Meaning of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2478 This structure conveys the client's Diffie-Hellman public value
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2479 (Yc) if it was not already included in the client's certificate.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2480 The encoding used for Yc is determined by the enumerated
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2481 PublicValueEncoding. This structure is a variant of the client
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2482 key exchange message, not a message in itself.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2483
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2484 Structure of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2485 enum { implicit, explicit } PublicValueEncoding;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2486
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2487 implicit
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2488 If the client certificate already contains a suitable
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2489 Diffie-Hellman key, then Yc is implicit and does not need to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2490 be sent again. In this case, the Client Key Exchange message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2491 will be sent, but will be empty.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2492
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2493 explicit
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2494 Yc needs to be sent.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2495
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2496 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2497 select (PublicValueEncoding) {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2498 case implicit: struct { };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2499 case explicit: opaque dh_Yc<1..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2500 } dh_public;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2501 } ClientDiffieHellmanPublic;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2502
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2503 dh_Yc
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2504 The client's Diffie-Hellman public value (Yc).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2505
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2506 7.4.8. Certificate verify
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2507
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2508 When this message will be sent:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2509 This message is used to provide explicit verification of a client
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2510 certificate. This message is only sent following a client
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2511 certificate that has signing capability (i.e. all certificates
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2512 except those containing fixed Diffie-Hellman parameters). When
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2513 sent, it will immediately follow the client key exchange message.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2514
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2515 Structure of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2516 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2517 Signature signature;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2518 } CertificateVerify;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2519
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2520
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2521
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2522 Dierks & Allen Standards Track [Page 45]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2523
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2524 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2525
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2526
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2527 The Signature type is defined in 7.4.3.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2528
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2529 CertificateVerify.signature.md5_hash
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2530 MD5(handshake_messages);
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2531
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2532 Certificate.signature.sha_hash
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2533 SHA(handshake_messages);
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2534
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2535 Here handshake_messages refers to all handshake messages sent or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2536 received starting at client hello up to but not including this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2537 message, including the type and length fields of the handshake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2538 messages. This is the concatenation of all the Handshake structures
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2539 as defined in 7.4 exchanged thus far.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2540
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2541 7.4.9. Finished
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2542
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2543 When this message will be sent:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2544 A finished message is always sent immediately after a change
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2545 cipher spec message to verify that the key exchange and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2546 authentication processes were successful. It is essential that a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2547 change cipher spec message be received between the other
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2548 handshake messages and the Finished message.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2549
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2550 Meaning of this message:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2551 The finished message is the first protected with the just-
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2552 negotiated algorithms, keys, and secrets. Recipients of finished
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2553 messages must verify that the contents are correct. Once a side
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2554 has sent its Finished message and received and validated the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2555 Finished message from its peer, it may begin to send and receive
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2556 application data over the connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2557
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2558 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2559 opaque verify_data[12];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2560 } Finished;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2561
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2562 verify_data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2563 PRF(master_secret, finished_label, MD5(handshake_messages) +
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2564 SHA-1(handshake_messages)) [0..11];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2565
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2566 finished_label
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2567 For Finished messages sent by the client, the string "client
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2568 finished". For Finished messages sent by the server, the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2569 string "server finished".
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2570
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2571 handshake_messages
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2572 All of the data from all handshake messages up to but not
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2573 including this message. This is only data visible at the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2574 handshake layer and does not include record layer headers.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2575
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2576
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2577
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2578 Dierks & Allen Standards Track [Page 46]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2579
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2580 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2581
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2582
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2583 This is the concatenation of all the Handshake structures as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2584 defined in 7.4 exchanged thus far.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2585
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2586 It is a fatal error if a finished message is not preceded by a change
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2587 cipher spec message at the appropriate point in the handshake.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2588
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2589 The hash contained in finished messages sent by the server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2590 incorporate Sender.server; those sent by the client incorporate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2591 Sender.client. The value handshake_messages includes all handshake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2592 messages starting at client hello up to, but not including, this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2593 finished message. This may be different from handshake_messages in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2594 Section 7.4.8 because it would include the certificate verify message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2595 (if sent). Also, the handshake_messages for the finished message sent
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2596 by the client will be different from that for the finished message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2597 sent by the server, because the one which is sent second will include
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2598 the prior one.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2599
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2600 Note: Change cipher spec messages, alerts and any other record types
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2601 are not handshake messages and are not included in the hash
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2602 computations. Also, Hello Request messages are omitted from
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2603 handshake hashes.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2604
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2605 8. Cryptographic computations
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2606
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2607 In order to begin connection protection, the TLS Record Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2608 requires specification of a suite of algorithms, a master secret, and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2609 the client and server random values. The authentication, encryption,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2610 and MAC algorithms are determined by the cipher_suite selected by the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2611 server and revealed in the server hello message. The compression
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2612 algorithm is negotiated in the hello messages, and the random values
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2613 are exchanged in the hello messages. All that remains is to calculate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2614 the master secret.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2615
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2616 8.1. Computing the master secret
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2617
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2618 For all key exchange methods, the same algorithm is used to convert
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2619 the pre_master_secret into the master_secret. The pre_master_secret
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2620 should be deleted from memory once the master_secret has been
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2621 computed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2622
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2623 master_secret = PRF(pre_master_secret, "master secret",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2624 ClientHello.random + ServerHello.random)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2625 [0..47];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2626
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2627 The master secret is always exactly 48 bytes in length. The length of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2628 the premaster secret will vary depending on key exchange method.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2629
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2630
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2631
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2632
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2633
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2634 Dierks & Allen Standards Track [Page 47]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2635
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2636 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2637
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2638
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2639 8.1.1. RSA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2640
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2641 When RSA is used for server authentication and key exchange, a 48-
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2642 byte pre_master_secret is generated by the client, encrypted under
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2643 the server's public key, and sent to the server. The server uses its
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2644 private key to decrypt the pre_master_secret. Both parties then
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2645 convert the pre_master_secret into the master_secret, as specified
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2646 above.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2647
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2648 RSA digital signatures are performed using PKCS #1 [PKCS1] block type
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2649 1. RSA public key encryption is performed using PKCS #1 block type 2.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2650
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2651 8.1.2. Diffie-Hellman
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2652
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2653 A conventional Diffie-Hellman computation is performed. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2654 negotiated key (Z) is used as the pre_master_secret, and is converted
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2655 into the master_secret, as specified above.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2656
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2657 Note: Diffie-Hellman parameters are specified by the server, and may
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2658 be either ephemeral or contained within the server's certificate.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2659
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2660 9. Mandatory Cipher Suites
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2661
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2662 In the absence of an application profile standard specifying
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2663 otherwise, a TLS compliant application MUST implement the cipher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2664 suite TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2665
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2666 10. Application data protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2667
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2668 Application data messages are carried by the Record Layer and are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2669 fragmented, compressed and encrypted based on the current connection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2670 state. The messages are treated as transparent data to the record
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2671 layer.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2672
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2673
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2674
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2675
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2676
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2677
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2678
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2679
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2680
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2681
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2682
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2683
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2684
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2685
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2686
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2687
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2688
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2689
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2690 Dierks & Allen Standards Track [Page 48]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2691
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2692 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2693
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2694
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2695 A. Protocol constant values
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2696
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2697 This section describes protocol types and constants.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2698
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2699 A.1. Record layer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2700
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2701 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2702 uint8 major, minor;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2703 } ProtocolVersion;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2704
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2705 ProtocolVersion version = { 3, 1 }; /* TLS v1.0 */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2706
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2707 enum {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2708 change_cipher_spec(20), alert(21), handshake(22),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2709 application_data(23), (255)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2710 } ContentType;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2711
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2712 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2713 ContentType type;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2714 ProtocolVersion version;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2715 uint16 length;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2716 opaque fragment[TLSPlaintext.length];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2717 } TLSPlaintext;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2718
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2719 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2720 ContentType type;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2721 ProtocolVersion version;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2722 uint16 length;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2723 opaque fragment[TLSCompressed.length];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2724 } TLSCompressed;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2725
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2726 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2727 ContentType type;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2728 ProtocolVersion version;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2729 uint16 length;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2730 select (CipherSpec.cipher_type) {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2731 case stream: GenericStreamCipher;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2732 case block: GenericBlockCipher;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2733 } fragment;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2734 } TLSCiphertext;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2735
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2736 stream-ciphered struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2737 opaque content[TLSCompressed.length];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2738 opaque MAC[CipherSpec.hash_size];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2739 } GenericStreamCipher;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2740
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2741 block-ciphered struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2742 opaque content[TLSCompressed.length];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2743
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2744
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2745
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2746 Dierks & Allen Standards Track [Page 49]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2747
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2748 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2749
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2750
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2751 opaque MAC[CipherSpec.hash_size];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2752 uint8 padding[GenericBlockCipher.padding_length];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2753 uint8 padding_length;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2754 } GenericBlockCipher;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2755
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2756 A.2. Change cipher specs message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2757
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2758 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2759 enum { change_cipher_spec(1), (255) } type;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2760 } ChangeCipherSpec;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2761
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2762 A.3. Alert messages
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2763
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2764 enum { warning(1), fatal(2), (255) } AlertLevel;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2765
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2766 enum {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2767 close_notify(0),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2768 unexpected_message(10),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2769 bad_record_mac(20),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2770 decryption_failed(21),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2771 record_overflow(22),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2772 decompression_failure(30),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2773 handshake_failure(40),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2774 bad_certificate(42),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2775 unsupported_certificate(43),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2776 certificate_revoked(44),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2777 certificate_expired(45),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2778 certificate_unknown(46),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2779 illegal_parameter(47),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2780 unknown_ca(48),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2781 access_denied(49),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2782 decode_error(50),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2783 decrypt_error(51),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2784 export_restriction(60),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2785 protocol_version(70),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2786 insufficient_security(71),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2787 internal_error(80),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2788 user_canceled(90),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2789 no_renegotiation(100),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2790 (255)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2791 } AlertDescription;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2792
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2793 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2794 AlertLevel level;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2795 AlertDescription description;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2796 } Alert;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2797
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2798
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2799
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2800
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2801
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2802 Dierks & Allen Standards Track [Page 50]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2803
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2804 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2805
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2806
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2807 A.4. Handshake protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2808
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2809 enum {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2810 hello_request(0), client_hello(1), server_hello(2),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2811 certificate(11), server_key_exchange (12),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2812 certificate_request(13), server_hello_done(14),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2813 certificate_verify(15), client_key_exchange(16),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2814 finished(20), (255)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2815 } HandshakeType;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2816
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2817 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2818 HandshakeType msg_type;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2819 uint24 length;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2820 select (HandshakeType) {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2821 case hello_request: HelloRequest;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2822 case client_hello: ClientHello;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2823 case server_hello: ServerHello;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2824 case certificate: Certificate;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2825 case server_key_exchange: ServerKeyExchange;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2826 case certificate_request: CertificateRequest;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2827 case server_hello_done: ServerHelloDone;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2828 case certificate_verify: CertificateVerify;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2829 case client_key_exchange: ClientKeyExchange;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2830 case finished: Finished;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2831 } body;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2832 } Handshake;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2833
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2834 A.4.1. Hello messages
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2835
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2836 struct { } HelloRequest;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2837
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2838 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2839 uint32 gmt_unix_time;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2840 opaque random_bytes[28];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2841 } Random;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2842
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2843 opaque SessionID<0..32>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2844
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2845 uint8 CipherSuite[2];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2846
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2847 enum { null(0), (255) } CompressionMethod;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2848
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2849 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2850 ProtocolVersion client_version;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2851 Random random;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2852 SessionID session_id;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2853 CipherSuite cipher_suites<2..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2854 CompressionMethod compression_methods<1..2^8-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2855
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2856
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2857
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2858 Dierks & Allen Standards Track [Page 51]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2859
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2860 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2861
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2862
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2863 } ClientHello;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2864
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2865 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2866 ProtocolVersion server_version;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2867 Random random;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2868 SessionID session_id;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2869 CipherSuite cipher_suite;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2870 CompressionMethod compression_method;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2871 } ServerHello;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2872
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2873 A.4.2. Server authentication and key exchange messages
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2874
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2875 opaque ASN.1Cert<2^24-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2876
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2877 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2878 ASN.1Cert certificate_list<1..2^24-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2879 } Certificate;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2880
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2881 enum { rsa, diffie_hellman } KeyExchangeAlgorithm;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2882
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2883 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2884 opaque RSA_modulus<1..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2885 opaque RSA_exponent<1..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2886 } ServerRSAParams;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2887
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2888 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2889 opaque DH_p<1..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2890 opaque DH_g<1..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2891 opaque DH_Ys<1..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2892 } ServerDHParams;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2893
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2894 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2895 select (KeyExchangeAlgorithm) {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2896 case diffie_hellman:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2897 ServerDHParams params;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2898 Signature signed_params;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2899 case rsa:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2900 ServerRSAParams params;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2901 Signature signed_params;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2902 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2903 } ServerKeyExchange;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2904
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2905 enum { anonymous, rsa, dsa } SignatureAlgorithm;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2906
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2907 select (SignatureAlgorithm)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2908 { case anonymous: struct { };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2909 case rsa:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2910 digitally-signed struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2911
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2912
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2913
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2914 Dierks & Allen Standards Track [Page 52]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2915
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2916 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2917
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2918
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2919 opaque md5_hash[16];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2920 opaque sha_hash[20];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2921 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2922 case dsa:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2923 digitally-signed struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2924 opaque sha_hash[20];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2925 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2926 } Signature;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2927
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2928 enum {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2929 rsa_sign(1), dss_sign(2), rsa_fixed_dh(3), dss_fixed_dh(4),
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2930 (255)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2931 } ClientCertificateType;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2932
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2933 opaque DistinguishedName<1..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2934
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2935 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2936 ClientCertificateType certificate_types<1..2^8-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2937 DistinguishedName certificate_authorities<3..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2938 } CertificateRequest;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2939
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2940 struct { } ServerHelloDone;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2941
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2942 A.4.3. Client authentication and key exchange messages
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2943
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2944 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2945 select (KeyExchangeAlgorithm) {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2946 case rsa: EncryptedPreMasterSecret;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2947 case diffie_hellman: DiffieHellmanClientPublicValue;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2948 } exchange_keys;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2949 } ClientKeyExchange;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2950
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2951 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2952 ProtocolVersion client_version;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2953 opaque random[46];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2954
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2955 } PreMasterSecret;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2956
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2957 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2958 public-key-encrypted PreMasterSecret pre_master_secret;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2959 } EncryptedPreMasterSecret;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2960
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2961 enum { implicit, explicit } PublicValueEncoding;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2962
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2963 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2964 select (PublicValueEncoding) {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2965 case implicit: struct {};
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2966 case explicit: opaque DH_Yc<1..2^16-1>;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2967
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2968
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2969
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2970 Dierks & Allen Standards Track [Page 53]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2971
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2972 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2973
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2974
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2975 } dh_public;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2976 } ClientDiffieHellmanPublic;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2977
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2978 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2979 Signature signature;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2980 } CertificateVerify;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2981
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2982 A.4.4. Handshake finalization message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2983
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2984 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2985 opaque verify_data[12];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2986 } Finished;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2987
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2988 A.5. The CipherSuite
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2989
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2990 The following values define the CipherSuite codes used in the client
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2991 hello and server hello messages.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2992
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2993 A CipherSuite defines a cipher specification supported in TLS Version
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2994 1.0.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2995
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2996 TLS_NULL_WITH_NULL_NULL is specified and is the initial state of a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2997 TLS connection during the first handshake on that channel, but must
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2998 not be negotiated, as it provides no more protection than an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2999 unsecured connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3000
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3001 CipherSuite TLS_NULL_WITH_NULL_NULL = { 0x00,0x00 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3002
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3003 The following CipherSuite definitions require that the server provide
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3004 an RSA certificate that can be used for key exchange. The server may
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3005 request either an RSA or a DSS signature-capable certificate in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3006 certificate request message.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3007
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3008 CipherSuite TLS_RSA_WITH_NULL_MD5 = { 0x00,0x01 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3009 CipherSuite TLS_RSA_WITH_NULL_SHA = { 0x00,0x02 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3010 CipherSuite TLS_RSA_EXPORT_WITH_RC4_40_MD5 = { 0x00,0x03 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3011 CipherSuite TLS_RSA_WITH_RC4_128_MD5 = { 0x00,0x04 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3012 CipherSuite TLS_RSA_WITH_RC4_128_SHA = { 0x00,0x05 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3013 CipherSuite TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = { 0x00,0x06 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3014 CipherSuite TLS_RSA_WITH_IDEA_CBC_SHA = { 0x00,0x07 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3015 CipherSuite TLS_RSA_EXPORT_WITH_DES40_CBC_SHA = { 0x00,0x08 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3016 CipherSuite TLS_RSA_WITH_DES_CBC_SHA = { 0x00,0x09 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3017 CipherSuite TLS_RSA_WITH_3DES_EDE_CBC_SHA = { 0x00,0x0A };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3018
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3019 The following CipherSuite definitions are used for server-
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3020 authenticated (and optionally client-authenticated) Diffie-Hellman.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3021 DH denotes cipher suites in which the server's certificate contains
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3022 the Diffie-Hellman parameters signed by the certificate authority
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3023
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3024
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3025
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3026 Dierks & Allen Standards Track [Page 54]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3027
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3028 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3029
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3030
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3031 (CA). DHE denotes ephemeral Diffie-Hellman, where the Diffie-Hellman
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3032 parameters are signed by a DSS or RSA certificate, which has been
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3033 signed by the CA. The signing algorithm used is specified after the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3034 DH or DHE parameter. The server can request an RSA or DSS signature-
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3035 capable certificate from the client for client authentication or it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3036 may request a Diffie-Hellman certificate. Any Diffie-Hellman
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3037 certificate provided by the client must use the parameters (group and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3038 generator) described by the server.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3039
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3040 CipherSuite TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = { 0x00,0x0B };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3041 CipherSuite TLS_DH_DSS_WITH_DES_CBC_SHA = { 0x00,0x0C };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3042 CipherSuite TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = { 0x00,0x0D };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3043 CipherSuite TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = { 0x00,0x0E };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3044 CipherSuite TLS_DH_RSA_WITH_DES_CBC_SHA = { 0x00,0x0F };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3045 CipherSuite TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = { 0x00,0x10 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3046 CipherSuite TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = { 0x00,0x11 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3047 CipherSuite TLS_DHE_DSS_WITH_DES_CBC_SHA = { 0x00,0x12 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3048 CipherSuite TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = { 0x00,0x13 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3049 CipherSuite TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = { 0x00,0x14 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3050 CipherSuite TLS_DHE_RSA_WITH_DES_CBC_SHA = { 0x00,0x15 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3051 CipherSuite TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = { 0x00,0x16 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3052
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3053 The following cipher suites are used for completely anonymous
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3054 Diffie-Hellman communications in which neither party is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3055 authenticated. Note that this mode is vulnerable to man-in-the-middle
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3056 attacks and is therefore deprecated.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3057
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3058 CipherSuite TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 = { 0x00,0x17 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3059 CipherSuite TLS_DH_anon_WITH_RC4_128_MD5 = { 0x00,0x18 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3060 CipherSuite TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA = { 0x00,0x19 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3061 CipherSuite TLS_DH_anon_WITH_DES_CBC_SHA = { 0x00,0x1A };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3062 CipherSuite TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = { 0x00,0x1B };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3063
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3064 Note: All cipher suites whose first byte is 0xFF are considered
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3065 private and can be used for defining local/experimental
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3066 algorithms. Interoperability of such types is a local matter.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3067
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3068 Note: Additional cipher suites can be registered by publishing an RFC
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3069 which specifies the cipher suites, including the necessary TLS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3070 protocol information, including message encoding, premaster
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3071 secret derivation, symmetric encryption and MAC calculation and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3072 appropriate reference information for the algorithms involved.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3073 The RFC editor's office may, at its discretion, choose to publish
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3074 specifications for cipher suites which are not completely
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3075 described (e.g., for classified algorithms) if it finds the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3076 specification to be of technical interest and completely
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3077 specified.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3078
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3079
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3080
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3081
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3082 Dierks & Allen Standards Track [Page 55]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3083
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3084 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3085
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3086
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3087 Note: The cipher suite values { 0x00, 0x1C } and { 0x00, 0x1D } are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3088 reserved to avoid collision with Fortezza-based cipher suites in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3089 SSL 3.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3090
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3091 A.6. The Security Parameters
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3092
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3093 These security parameters are determined by the TLS Handshake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3094 Protocol and provided as parameters to the TLS Record Layer in order
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3095 to initialize a connection state. SecurityParameters includes:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3096
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3097 enum { null(0), (255) } CompressionMethod;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3098
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3099 enum { server, client } ConnectionEnd;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3100
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3101 enum { null, rc4, rc2, des, 3des, des40, idea }
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3102 BulkCipherAlgorithm;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3103
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3104 enum { stream, block } CipherType;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3105
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3106 enum { true, false } IsExportable;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3107
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3108 enum { null, md5, sha } MACAlgorithm;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3109
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3110 /* The algorithms specified in CompressionMethod,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3111 BulkCipherAlgorithm, and MACAlgorithm may be added to. */
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3112
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3113 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3114 ConnectionEnd entity;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3115 BulkCipherAlgorithm bulk_cipher_algorithm;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3116 CipherType cipher_type;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3117 uint8 key_size;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3118 uint8 key_material_length;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3119 IsExportable is_exportable;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3120 MACAlgorithm mac_algorithm;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3121 uint8 hash_size;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3122 CompressionMethod compression_algorithm;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3123 opaque master_secret[48];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3124 opaque client_random[32];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3125 opaque server_random[32];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3126 } SecurityParameters;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3127
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3128
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3129
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3130
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3131
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3132
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3133
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3134
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3135
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3136
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3137
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3138 Dierks & Allen Standards Track [Page 56]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3139
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3140 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3141
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3142
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3143 B. Glossary
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3144
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3145 application protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3146 An application protocol is a protocol that normally layers
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3147 directly on top of the transport layer (e.g., TCP/IP). Examples
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3148 include HTTP, TELNET, FTP, and SMTP.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3149
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3150 asymmetric cipher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3151 See public key cryptography.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3152
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3153 authentication
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3154 Authentication is the ability of one entity to determine the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3155 identity of another entity.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3156
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3157 block cipher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3158 A block cipher is an algorithm that operates on plaintext in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3159 groups of bits, called blocks. 64 bits is a common block size.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3160
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3161 bulk cipher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3162 A symmetric encryption algorithm used to encrypt large quantities
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3163 of data.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3164
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3165 cipher block chaining (CBC)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3166 CBC is a mode in which every plaintext block encrypted with a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3167 block cipher is first exclusive-ORed with the previous ciphertext
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3168 block (or, in the case of the first block, with the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3169 initialization vector). For decryption, every block is first
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3170 decrypted, then exclusive-ORed with the previous ciphertext block
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3171 (or IV).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3172
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3173 certificate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3174 As part of the X.509 protocol (a.k.a. ISO Authentication
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3175 framework), certificates are assigned by a trusted Certificate
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3176 Authority and provide a strong binding between a party's identity
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3177 or some other attributes and its public key.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3178
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3179 client
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3180 The application entity that initiates a TLS connection to a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3181 server. This may or may not imply that the client initiated the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3182 underlying transport connection. The primary operational
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3183 difference between the server and client is that the server is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3184 generally authenticated, while the client is only optionally
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3185 authenticated.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3186
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3187 client write key
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3188 The key used to encrypt data written by the client.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3189
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3190
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3191
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3192
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3193
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3194 Dierks & Allen Standards Track [Page 57]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3195
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3196 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3197
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3198
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3199 client write MAC secret
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3200 The secret data used to authenticate data written by the client.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3201
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3202 connection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3203 A connection is a transport (in the OSI layering model
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3204 definition) that provides a suitable type of service. For TLS,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3205 such connections are peer to peer relationships. The connections
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3206 are transient. Every connection is associated with one session.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3207
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3208 Data Encryption Standard
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3209 DES is a very widely used symmetric encryption algorithm. DES is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3210 a block cipher with a 56 bit key and an 8 byte block size. Note
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3211 that in TLS, for key generation purposes, DES is treated as
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3212 having an 8 byte key length (64 bits), but it still only provides
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3213 56 bits of protection. (The low bit of each key byte is presumed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3214 to be set to produce odd parity in that key byte.) DES can also
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3215 be operated in a mode where three independent keys and three
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3216 encryptions are used for each block of data; this uses 168 bits
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3217 of key (24 bytes in the TLS key generation method) and provides
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3218 the equivalent of 112 bits of security. [DES], [3DES]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3219
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3220 Digital Signature Standard (DSS)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3221 A standard for digital signing, including the Digital Signing
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3222 Algorithm, approved by the National Institute of Standards and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3223 Technology, defined in NIST FIPS PUB 186, "Digital Signature
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3224 Standard," published May, 1994 by the U.S. Dept. of Commerce.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3225 [DSS]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3226
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3227 digital signatures
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3228 Digital signatures utilize public key cryptography and one-way
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3229 hash functions to produce a signature of the data that can be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3230 authenticated, and is difficult to forge or repudiate.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3231
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3232 handshake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3233 An initial negotiation between client and server that establishes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3234 the parameters of their transactions.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3235
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3236 Initialization Vector (IV)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3237 When a block cipher is used in CBC mode, the initialization
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3238 vector is exclusive-ORed with the first plaintext block prior to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3239 encryption.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3240
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3241 IDEA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3242 A 64-bit block cipher designed by Xuejia Lai and James Massey.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3243 [IDEA]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3244
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3245
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3246
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3247
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3248
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3249
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3250 Dierks & Allen Standards Track [Page 58]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3251
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3252 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3253
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3254
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3255 Message Authentication Code (MAC)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3256 A Message Authentication Code is a one-way hash computed from a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3257 message and some secret data. It is difficult to forge without
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3258 knowing the secret data. Its purpose is to detect if the message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3259 has been altered.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3260
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3261 master secret
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3262 Secure secret data used for generating encryption keys, MAC
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3263 secrets, and IVs.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3264
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3265 MD5
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3266 MD5 is a secure hashing function that converts an arbitrarily
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3267 long data stream into a digest of fixed size (16 bytes). [MD5]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3268
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3269 public key cryptography
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3270 A class of cryptographic techniques employing two-key ciphers.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3271 Messages encrypted with the public key can only be decrypted with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3272 the associated private key. Conversely, messages signed with the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3273 private key can be verified with the public key.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3274
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3275 one-way hash function
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3276 A one-way transformation that converts an arbitrary amount of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3277 data into a fixed-length hash. It is computationally hard to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3278 reverse the transformation or to find collisions. MD5 and SHA are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3279 examples of one-way hash functions.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3280
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3281 RC2
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3282 A block cipher developed by Ron Rivest at RSA Data Security, Inc.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3283 [RSADSI] described in [RC2].
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3284
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3285 RC4
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3286 A stream cipher licensed by RSA Data Security [RSADSI]. A
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3287 compatible cipher is described in [RC4].
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3288
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3289 RSA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3290 A very widely used public-key algorithm that can be used for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3291 either encryption or digital signing. [RSA]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3292
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3293 salt
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3294 Non-secret random data used to make export encryption keys resist
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3295 precomputation attacks.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3296
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3297 server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3298 The server is the application entity that responds to requests
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3299 for connections from clients. See also under client.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3300
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3301
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3302
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3303
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3304
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3305
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3306 Dierks & Allen Standards Track [Page 59]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3307
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3308 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3309
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3310
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3311 session
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3312 A TLS session is an association between a client and a server.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3313 Sessions are created by the handshake protocol. Sessions define a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3314 set of cryptographic security parameters, which can be shared
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3315 among multiple connections. Sessions are used to avoid the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3316 expensive negotiation of new security parameters for each
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3317 connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3318
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3319 session identifier
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3320 A session identifier is a value generated by a server that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3321 identifies a particular session.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3322
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3323 server write key
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3324 The key used to encrypt data written by the server.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3325
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3326 server write MAC secret
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3327 The secret data used to authenticate data written by the server.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3328
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3329 SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3330 The Secure Hash Algorithm is defined in FIPS PUB 180-1. It
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3331 produces a 20-byte output. Note that all references to SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3332 actually use the modified SHA-1 algorithm. [SHA]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3333
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3334 SSL
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3335 Netscape's Secure Socket Layer protocol [SSL3]. TLS is based on
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3336 SSL Version 3.0
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3337
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3338 stream cipher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3339 An encryption algorithm that converts a key into a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3340 cryptographically-strong keystream, which is then exclusive-ORed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3341 with the plaintext.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3342
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3343 symmetric cipher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3344 See bulk cipher.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3345
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3346 Transport Layer Security (TLS)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3347 This protocol; also, the Transport Layer Security working group
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3348 of the Internet Engineering Task Force (IETF). See "Comments" at
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3349 the end of this document.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3350
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3351
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3352
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3353
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3354
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3355
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3356
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3357
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3358
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3359
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3360
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3361
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3362 Dierks & Allen Standards Track [Page 60]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3363
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3364 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3365
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3366
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3367 C. CipherSuite definitions
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3368
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3369 CipherSuite Is Key Cipher Hash
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3370 Exportable Exchange
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3371
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3372 TLS_NULL_WITH_NULL_NULL * NULL NULL NULL
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3373 TLS_RSA_WITH_NULL_MD5 * RSA NULL MD5
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3374 TLS_RSA_WITH_NULL_SHA * RSA NULL SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3375 TLS_RSA_EXPORT_WITH_RC4_40_MD5 * RSA_EXPORT RC4_40 MD5
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3376 TLS_RSA_WITH_RC4_128_MD5 RSA RC4_128 MD5
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3377 TLS_RSA_WITH_RC4_128_SHA RSA RC4_128 SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3378 TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 * RSA_EXPORT RC2_CBC_40 MD5
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3379 TLS_RSA_WITH_IDEA_CBC_SHA RSA IDEA_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3380 TLS_RSA_EXPORT_WITH_DES40_CBC_SHA * RSA_EXPORT DES40_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3381 TLS_RSA_WITH_DES_CBC_SHA RSA DES_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3382 TLS_RSA_WITH_3DES_EDE_CBC_SHA RSA 3DES_EDE_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3383 TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA * DH_DSS_EXPORT DES40_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3384 TLS_DH_DSS_WITH_DES_CBC_SHA DH_DSS DES_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3385 TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA DH_DSS 3DES_EDE_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3386 TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA * DH_RSA_EXPORT DES40_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3387 TLS_DH_RSA_WITH_DES_CBC_SHA DH_RSA DES_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3388 TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA DH_RSA 3DES_EDE_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3389 TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA * DHE_DSS_EXPORT DES40_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3390 TLS_DHE_DSS_WITH_DES_CBC_SHA DHE_DSS DES_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3391 TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA DHE_DSS 3DES_EDE_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3392 TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA * DHE_RSA_EXPORT DES40_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3393 TLS_DHE_RSA_WITH_DES_CBC_SHA DHE_RSA DES_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3394 TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA DHE_RSA 3DES_EDE_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3395 TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 * DH_anon_EXPORT RC4_40 MD5
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3396 TLS_DH_anon_WITH_RC4_128_MD5 DH_anon RC4_128 MD5
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3397 TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA DH_anon DES40_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3398 TLS_DH_anon_WITH_DES_CBC_SHA DH_anon DES_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3399 TLS_DH_anon_WITH_3DES_EDE_CBC_SHA DH_anon 3DES_EDE_CBC SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3400
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3401
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3402 * Indicates IsExportable is True
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3403
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3404 Key
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3405 Exchange
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3406 Algorithm Description Key size limit
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3407
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3408 DHE_DSS Ephemeral DH with DSS signatures None
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3409 DHE_DSS_EXPORT Ephemeral DH with DSS signatures DH = 512 bits
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3410 DHE_RSA Ephemeral DH with RSA signatures None
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3411 DHE_RSA_EXPORT Ephemeral DH with RSA signatures DH = 512 bits,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3412 RSA = none
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3413 DH_anon Anonymous DH, no signatures None
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3414 DH_anon_EXPORT Anonymous DH, no signatures DH = 512 bits
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3415
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3416
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3417
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3418 Dierks & Allen Standards Track [Page 61]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3419
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3420 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3421
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3422
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3423 DH_DSS DH with DSS-based certificates None
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3424 DH_DSS_EXPORT DH with DSS-based certificates DH = 512 bits
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3425 DH_RSA DH with RSA-based certificates None
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3426 DH_RSA_EXPORT DH with RSA-based certificates DH = 512 bits,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3427 RSA = none
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3428 NULL No key exchange N/A
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3429 RSA RSA key exchange None
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3430 RSA_EXPORT RSA key exchange RSA = 512 bits
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3431
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3432 Key size limit
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3433 The key size limit gives the size of the largest public key that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3434 can be legally used for encryption in cipher suites that are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3435 exportable.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3436
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3437 Key Expanded Effective IV Block
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3438 Cipher Type Material Key Material Key Bits Size Size
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3439
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3440 NULL * Stream 0 0 0 0 N/A
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3441 IDEA_CBC Block 16 16 128 8 8
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3442 RC2_CBC_40 * Block 5 16 40 8 8
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3443 RC4_40 * Stream 5 16 40 0 N/A
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3444 RC4_128 Stream 16 16 128 0 N/A
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3445 DES40_CBC * Block 5 8 40 8 8
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3446 DES_CBC Block 8 8 56 8 8
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3447 3DES_EDE_CBC Block 24 24 168 8 8
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3448
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3449 * Indicates IsExportable is true.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3450
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3451 Type
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3452 Indicates whether this is a stream cipher or a block cipher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3453 running in CBC mode.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3454
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3455 Key Material
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3456 The number of bytes from the key_block that are used for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3457 generating the write keys.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3458
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3459 Expanded Key Material
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3460 The number of bytes actually fed into the encryption algorithm
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3461
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3462 Effective Key Bits
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3463 How much entropy material is in the key material being fed into
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3464 the encryption routines.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3465
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3466 IV Size
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3467 How much data needs to be generated for the initialization
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3468 vector. Zero for stream ciphers; equal to the block size for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3469 block ciphers.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3470
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3471
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3472
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3473
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3474 Dierks & Allen Standards Track [Page 62]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3475
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3476 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3477
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3478
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3479 Block Size
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3480 The amount of data a block cipher enciphers in one chunk; a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3481 block cipher running in CBC mode can only encrypt an even
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3482 multiple of its block size.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3483
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3484 Hash Hash Padding
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3485 function Size Size
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3486 NULL 0 0
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3487 MD5 16 48
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3488 SHA 20 40
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3489
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3490
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3491
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3492
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3493
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3494
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3495
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3496
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3497
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3498
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3499
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3500
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3501
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3502
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3503
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3504
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3505
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3506
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3507
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3508
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3509
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3510
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3511
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3512
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3513
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3514
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3515
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3516
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3517
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3518
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3519
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3520
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3521
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3522
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3523
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3524
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3525
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3526
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3527
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3528
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3529
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3530 Dierks & Allen Standards Track [Page 63]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3531
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3532 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3533
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3534
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3535 D. Implementation Notes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3536
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3537 The TLS protocol cannot prevent many common security mistakes. This
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3538 section provides several recommendations to assist implementors.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3539
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3540 D.1. Temporary RSA keys
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3541
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3542 US Export restrictions limit RSA keys used for encryption to 512
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3543 bits, but do not place any limit on lengths of RSA keys used for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3544 signing operations. Certificates often need to be larger than 512
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3545 bits, since 512-bit RSA keys are not secure enough for high-value
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3546 transactions or for applications requiring long-term security. Some
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3547 certificates are also designated signing-only, in which case they
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3548 cannot be used for key exchange.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3549
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3550 When the public key in the certificate cannot be used for encryption,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3551 the server signs a temporary RSA key, which is then exchanged. In
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3552 exportable applications, the temporary RSA key should be the maximum
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3553 allowable length (i.e., 512 bits). Because 512-bit RSA keys are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3554 relatively insecure, they should be changed often. For typical
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3555 electronic commerce applications, it is suggested that keys be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3556 changed daily or every 500 transactions, and more often if possible.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3557 Note that while it is acceptable to use the same temporary key for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3558 multiple transactions, it must be signed each time it is used.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3559
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3560 RSA key generation is a time-consuming process. In many cases, a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3561 low-priority process can be assigned the task of key generation.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3562
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3563 Whenever a new key is completed, the existing temporary key can be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3564 replaced with the new one.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3565
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3566 D.2. Random Number Generation and Seeding
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3567
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3568 TLS requires a cryptographically-secure pseudorandom number generator
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3569 (PRNG). Care must be taken in designing and seeding PRNGs. PRNGs
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3570 based on secure hash operations, most notably MD5 and/or SHA, are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3571 acceptable, but cannot provide more security than the size of the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3572 random number generator state. (For example, MD5-based PRNGs usually
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3573 provide 128 bits of state.)
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3574
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3575 To estimate the amount of seed material being produced, add the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3576 number of bits of unpredictable information in each seed byte. For
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3577 example, keystroke timing values taken from a PC compatible's 18.2 Hz
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3578 timer provide 1 or 2 secure bits each, even though the total size of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3579 the counter value is 16 bits or more. To seed a 128-bit PRNG, one
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3580 would thus require approximately 100 such timer values.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3581
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3582
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3583
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3584
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3585
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3586 Dierks & Allen Standards Track [Page 64]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3587
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3588 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3589
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3590
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3591 Warning: The seeding functions in RSAREF and versions of BSAFE prior to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3592 3.0 are order-independent. For example, if 1000 seed bits are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3593 supplied, one at a time, in 1000 separate calls to the seed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3594 function, the PRNG will end up in a state which depends only
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3595 on the number of 0 or 1 seed bits in the seed data (i.e.,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3596 there are 1001 possible final states). Applications using
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3597 BSAFE or RSAREF must take extra care to ensure proper seeding.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3598 This may be accomplished by accumulating seed bits into a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3599 buffer and processing them all at once or by processing an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3600 incrementing counter with every seed bit; either method will
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3601 reintroduce order dependence into the seeding process.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3602
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3603 D.3. Certificates and authentication
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3604
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3605 Implementations are responsible for verifying the integrity of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3606 certificates and should generally support certificate revocation
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3607 messages. Certificates should always be verified to ensure proper
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3608 signing by a trusted Certificate Authority (CA). The selection and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3609 addition of trusted CAs should be done very carefully. Users should
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3610 be able to view information about the certificate and root CA.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3611
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3612 D.4. CipherSuites
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3613
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3614 TLS supports a range of key sizes and security levels, including some
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3615 which provide no or minimal security. A proper implementation will
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3616 probably not support many cipher suites. For example, 40-bit
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3617 encryption is easily broken, so implementations requiring strong
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3618 security should not allow 40-bit keys. Similarly, anonymous Diffie-
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3619 Hellman is strongly discouraged because it cannot prevent man-in-
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3620 the-middle attacks. Applications should also enforce minimum and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3621 maximum key sizes. For example, certificate chains containing 512-bit
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3622 RSA keys or signatures are not appropriate for high-security
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3623 applications.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3624
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3625
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3626
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3627
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3628
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3629
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3630
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3631
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3632
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3633
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3634
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3635
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3636
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3637
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3638
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3639
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3640
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3641
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3642 Dierks & Allen Standards Track [Page 65]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3643
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3644 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3645
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3646
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3647 E. Backward Compatibility With SSL
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3648
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3649 For historical reasons and in order to avoid a profligate consumption
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3650 of reserved port numbers, application protocols which are secured by
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3651 TLS 1.0, SSL 3.0, and SSL 2.0 all frequently share the same
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3652 connection port: for example, the https protocol (HTTP secured by SSL
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3653 or TLS) uses port 443 regardless of which security protocol it is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3654 using. Thus, some mechanism must be determined to distinguish and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3655 negotiate among the various protocols.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3656
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3657 TLS version 1.0 and SSL 3.0 are very similar; thus, supporting both
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3658 is easy. TLS clients who wish to negotiate with SSL 3.0 servers
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3659 should send client hello messages using the SSL 3.0 record format and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3660 client hello structure, sending {3, 1} for the version field to note
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3661 that they support TLS 1.0. If the server supports only SSL 3.0, it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3662 will respond with an SSL 3.0 server hello; if it supports TLS, with a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3663 TLS server hello. The negotiation then proceeds as appropriate for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3664 the negotiated protocol.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3665
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3666 Similarly, a TLS server which wishes to interoperate with SSL 3.0
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3667 clients should accept SSL 3.0 client hello messages and respond with
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3668 an SSL 3.0 server hello if an SSL 3.0 client hello is received which
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3669 has a version field of {3, 0}, denoting that this client does not
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3670 support TLS.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3671
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3672 Whenever a client already knows the highest protocol known to a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3673 server (for example, when resuming a session), it should initiate the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3674 connection in that native protocol.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3675
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3676 TLS 1.0 clients that support SSL Version 2.0 servers must send SSL
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3677 Version 2.0 client hello messages [SSL2]. TLS servers should accept
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3678 either client hello format if they wish to support SSL 2.0 clients on
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3679 the same connection port. The only deviations from the Version 2.0
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3680 specification are the ability to specify a version with a value of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3681 three and the support for more ciphering types in the CipherSpec.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3682
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3683 Warning: The ability to send Version 2.0 client hello messages will be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3684 phased out with all due haste. Implementors should make every
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3685 effort to move forward as quickly as possible. Version 3.0
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3686 provides better mechanisms for moving to newer versions.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3687
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3688 The following cipher specifications are carryovers from SSL Version
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3689 2.0. These are assumed to use RSA for key exchange and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3690 authentication.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3691
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3692 V2CipherSpec TLS_RC4_128_WITH_MD5 = { 0x01,0x00,0x80 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3693 V2CipherSpec TLS_RC4_128_EXPORT40_WITH_MD5 = { 0x02,0x00,0x80 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3694 V2CipherSpec TLS_RC2_CBC_128_CBC_WITH_MD5 = { 0x03,0x00,0x80 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3695
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3696
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3697
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3698 Dierks & Allen Standards Track [Page 66]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3699
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3700 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3701
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3702
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3703 V2CipherSpec TLS_RC2_CBC_128_CBC_EXPORT40_WITH_MD5
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3704 = { 0x04,0x00,0x80 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3705 V2CipherSpec TLS_IDEA_128_CBC_WITH_MD5 = { 0x05,0x00,0x80 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3706 V2CipherSpec TLS_DES_64_CBC_WITH_MD5 = { 0x06,0x00,0x40 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3707 V2CipherSpec TLS_DES_192_EDE3_CBC_WITH_MD5 = { 0x07,0x00,0xC0 };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3708
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3709 Cipher specifications native to TLS can be included in Version 2.0
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3710 client hello messages using the syntax below. Any V2CipherSpec
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3711 element with its first byte equal to zero will be ignored by Version
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3712 2.0 servers. Clients sending any of the above V2CipherSpecs should
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3713 also include the TLS equivalent (see Appendix A.5):
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3714
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3715 V2CipherSpec (see TLS name) = { 0x00, CipherSuite };
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3716
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3717 E.1. Version 2 client hello
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3718
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3719 The Version 2.0 client hello message is presented below using this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3720 document's presentation model. The true definition is still assumed
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3721 to be the SSL Version 2.0 specification.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3722
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3723 uint8 V2CipherSpec[3];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3724
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3725 struct {
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3726 uint8 msg_type;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3727 Version version;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3728 uint16 cipher_spec_length;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3729 uint16 session_id_length;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3730 uint16 challenge_length;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3731 V2CipherSpec cipher_specs[V2ClientHello.cipher_spec_length];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3732 opaque session_id[V2ClientHello.session_id_length];
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3733 Random challenge;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3734 } V2ClientHello;
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3735
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3736 msg_type
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3737 This field, in conjunction with the version field, identifies a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3738 version 2 client hello message. The value should be one (1).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3739
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3740 version
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3741 The highest version of the protocol supported by the client
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3742 (equals ProtocolVersion.version, see Appendix A.1).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3743
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3744 cipher_spec_length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3745 This field is the total length of the field cipher_specs. It
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3746 cannot be zero and must be a multiple of the V2CipherSpec length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3747 (3).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3748
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3749
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3750
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3751
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3752
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3753
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3754 Dierks & Allen Standards Track [Page 67]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3755
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3756 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3757
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3758
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3759 session_id_length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3760 This field must have a value of either zero or 16. If zero, the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3761 client is creating a new session. If 16, the session_id field
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3762 will contain the 16 bytes of session identification.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3763
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3764 challenge_length
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3765 The length in bytes of the client's challenge to the server to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3766 authenticate itself. This value must be 32.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3767
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3768 cipher_specs
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3769 This is a list of all CipherSpecs the client is willing and able
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3770 to use. There must be at least one CipherSpec acceptable to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3771 server.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3772
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3773 session_id
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3774 If this field's length is not zero, it will contain the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3775 identification for a session that the client wishes to resume.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3776
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3777 challenge
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3778 The client challenge to the server for the server to identify
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3779 itself is a (nearly) arbitrary length random. The TLS server will
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3780 right justify the challenge data to become the ClientHello.random
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3781 data (padded with leading zeroes, if necessary), as specified in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3782 this protocol specification. If the length of the challenge is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3783 greater than 32 bytes, only the last 32 bytes are used. It is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3784 legitimate (but not necessary) for a V3 server to reject a V2
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3785 ClientHello that has fewer than 16 bytes of challenge data.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3786
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3787 Note: Requests to resume a TLS session should use a TLS client hello.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3788
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3789 E.2. Avoiding man-in-the-middle version rollback
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3790
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3791 When TLS clients fall back to Version 2.0 compatibility mode, they
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3792 should use special PKCS #1 block formatting. This is done so that TLS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3793 servers will reject Version 2.0 sessions with TLS-capable clients.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3794
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3795 When TLS clients are in Version 2.0 compatibility mode, they set the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3796 right-hand (least-significant) 8 random bytes of the PKCS padding
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3797 (not including the terminal null of the padding) for the RSA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3798 encryption of the ENCRYPTED-KEY-DATA field of the CLIENT-MASTER-KEY
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3799 to 0x03 (the other padding bytes are random). After decrypting the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3800 ENCRYPTED-KEY-DATA field, servers that support TLS should issue an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3801 error if these eight padding bytes are 0x03. Version 2.0 servers
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3802 receiving blocks padded in this manner will proceed normally.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3803
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3804
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3805
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3806
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3807
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3808
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3809
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3810 Dierks & Allen Standards Track [Page 68]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3811
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3812 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3813
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3814
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3815 F. Security analysis
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3816
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3817 The TLS protocol is designed to establish a secure connection between
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3818 a client and a server communicating over an insecure channel. This
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3819 document makes several traditional assumptions, including that
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3820 attackers have substantial computational resources and cannot obtain
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3821 secret information from sources outside the protocol. Attackers are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3822 assumed to have the ability to capture, modify, delete, replay, and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3823 otherwise tamper with messages sent over the communication channel.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3824 This appendix outlines how TLS has been designed to resist a variety
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3825 of attacks.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3826
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3827 F.1. Handshake protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3828
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3829 The handshake protocol is responsible for selecting a CipherSpec and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3830 generating a Master Secret, which together comprise the primary
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3831 cryptographic parameters associated with a secure session. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3832 handshake protocol can also optionally authenticate parties who have
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3833 certificates signed by a trusted certificate authority.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3834
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3835 F.1.1. Authentication and key exchange
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3836
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3837 TLS supports three authentication modes: authentication of both
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3838 parties, server authentication with an unauthenticated client, and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3839 total anonymity. Whenever the server is authenticated, the channel is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3840 secure against man-in-the-middle attacks, but completely anonymous
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3841 sessions are inherently vulnerable to such attacks. Anonymous
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3842 servers cannot authenticate clients. If the server is authenticated,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3843 its certificate message must provide a valid certificate chain
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3844 leading to an acceptable certificate authority. Similarly,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3845 authenticated clients must supply an acceptable certificate to the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3846 server. Each party is responsible for verifying that the other's
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3847 certificate is valid and has not expired or been revoked.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3848
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3849 The general goal of the key exchange process is to create a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3850 pre_master_secret known to the communicating parties and not to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3851 attackers. The pre_master_secret will be used to generate the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3852 master_secret (see Section 8.1). The master_secret is required to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3853 generate the certificate verify and finished messages, encryption
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3854 keys, and MAC secrets (see Sections 7.4.8, 7.4.9 and 6.3). By sending
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3855 a correct finished message, parties thus prove that they know the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3856 correct pre_master_secret.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3857
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3858 F.1.1.1. Anonymous key exchange
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3859
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3860 Completely anonymous sessions can be established using RSA or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3861 Diffie-Hellman for key exchange. With anonymous RSA, the client
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3862 encrypts a pre_master_secret with the server's uncertified public key
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3863
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3864
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3865
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3866 Dierks & Allen Standards Track [Page 69]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3867
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3868 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3869
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3870
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3871 extracted from the server key exchange message. The result is sent in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3872 a client key exchange message. Since eavesdroppers do not know the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3873 server's private key, it will be infeasible for them to decode the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3874 pre_master_secret. (Note that no anonymous RSA Cipher Suites are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3875 defined in this document).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3876
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3877 With Diffie-Hellman, the server's public parameters are contained in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3878 the server key exchange message and the client's are sent in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3879 client key exchange message. Eavesdroppers who do not know the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3880 private values should not be able to find the Diffie-Hellman result
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3881 (i.e. the pre_master_secret).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3882
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3883 Warning: Completely anonymous connections only provide protection
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3884 against passive eavesdropping. Unless an independent tamper-
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3885 proof channel is used to verify that the finished messages
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3886 were not replaced by an attacker, server authentication is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3887 required in environments where active man-in-the-middle
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3888 attacks are a concern.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3889
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3890 F.1.1.2. RSA key exchange and authentication
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3891
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3892 With RSA, key exchange and server authentication are combined. The
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3893 public key may be either contained in the server's certificate or may
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3894 be a temporary RSA key sent in a server key exchange message. When
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3895 temporary RSA keys are used, they are signed by the server's RSA or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3896 DSS certificate. The signature includes the current
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3897 ClientHello.random, so old signatures and temporary keys cannot be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3898 replayed. Servers may use a single temporary RSA key for multiple
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3899 negotiation sessions.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3900
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3901 Note: The temporary RSA key option is useful if servers need large
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3902 certificates but must comply with government-imposed size limits
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3903 on keys used for key exchange.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3904
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3905 After verifying the server's certificate, the client encrypts a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3906 pre_master_secret with the server's public key. By successfully
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3907 decoding the pre_master_secret and producing a correct finished
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3908 message, the server demonstrates that it knows the private key
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3909 corresponding to the server certificate.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3910
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3911 When RSA is used for key exchange, clients are authenticated using
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3912 the certificate verify message (see Section 7.4.8). The client signs
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3913 a value derived from the master_secret and all preceding handshake
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3914 messages. These handshake messages include the server certificate,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3915 which binds the signature to the server, and ServerHello.random,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3916 which binds the signature to the current handshake process.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3917
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3918
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3919
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3920
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3921
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3922 Dierks & Allen Standards Track [Page 70]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3923
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3924 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3925
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3926
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3927 F.1.1.3. Diffie-Hellman key exchange with authentication
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3928
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3929 When Diffie-Hellman key exchange is used, the server can either
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3930 supply a certificate containing fixed Diffie-Hellman parameters or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3931 can use the server key exchange message to send a set of temporary
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3932 Diffie-Hellman parameters signed with a DSS or RSA certificate.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3933 Temporary parameters are hashed with the hello.random values before
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3934 signing to ensure that attackers do not replay old parameters. In
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3935 either case, the client can verify the certificate or signature to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3936 ensure that the parameters belong to the server.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3937
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3938 If the client has a certificate containing fixed Diffie-Hellman
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3939 parameters, its certificate contains the information required to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3940 complete the key exchange. Note that in this case the client and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3941 server will generate the same Diffie-Hellman result (i.e.,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3942 pre_master_secret) every time they communicate. To prevent the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3943 pre_master_secret from staying in memory any longer than necessary,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3944 it should be converted into the master_secret as soon as possible.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3945 Client Diffie-Hellman parameters must be compatible with those
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3946 supplied by the server for the key exchange to work.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3947
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3948 If the client has a standard DSS or RSA certificate or is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3949 unauthenticated, it sends a set of temporary parameters to the server
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3950 in the client key exchange message, then optionally uses a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3951 certificate verify message to authenticate itself.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3952
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3953 F.1.2. Version rollback attacks
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3954
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3955 Because TLS includes substantial improvements over SSL Version 2.0,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3956 attackers may try to make TLS-capable clients and servers fall back
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3957 to Version 2.0. This attack can occur if (and only if) two TLS-
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3958 capable parties use an SSL 2.0 handshake.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3959
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3960 Although the solution using non-random PKCS #1 block type 2 message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3961 padding is inelegant, it provides a reasonably secure way for Version
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3962 3.0 servers to detect the attack. This solution is not secure against
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3963 attackers who can brute force the key and substitute a new
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3964 ENCRYPTED-KEY-DATA message containing the same key (but with normal
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3965 padding) before the application specified wait threshold has expired.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3966 Parties concerned about attacks of this scale should not be using
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3967 40-bit encryption keys anyway. Altering the padding of the least-
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3968 significant 8 bytes of the PKCS padding does not impact security for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3969 the size of the signed hashes and RSA key lengths used in the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3970 protocol, since this is essentially equivalent to increasing the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3971 input block size by 8 bytes.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3972
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3973
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3974
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3975
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3976
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3977
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3978 Dierks & Allen Standards Track [Page 71]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3979
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3980 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3981
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3982
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3983 F.1.3. Detecting attacks against the handshake protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3984
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3985 An attacker might try to influence the handshake exchange to make the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3986 parties select different encryption algorithms than they would
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3987 normally choose. Because many implementations will support 40-bit
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3988 exportable encryption and some may even support null encryption or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3989 MAC algorithms, this attack is of particular concern.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3990
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3991 For this attack, an attacker must actively change one or more
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3992 handshake messages. If this occurs, the client and server will
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3993 compute different values for the handshake message hashes. As a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3994 result, the parties will not accept each others' finished messages.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3995 Without the master_secret, the attacker cannot repair the finished
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3996 messages, so the attack will be discovered.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3997
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3998 F.1.4. Resuming sessions
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4000 When a connection is established by resuming a session, new
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4001 ClientHello.random and ServerHello.random values are hashed with the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4002 session's master_secret. Provided that the master_secret has not been
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4003 compromised and that the secure hash operations used to produce the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4004 encryption keys and MAC secrets are secure, the connection should be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4005 secure and effectively independent from previous connections.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4006 Attackers cannot use known encryption keys or MAC secrets to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4007 compromise the master_secret without breaking the secure hash
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4008 operations (which use both SHA and MD5).
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4009
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4010 Sessions cannot be resumed unless both the client and server agree.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4011 If either party suspects that the session may have been compromised,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4012 or that certificates may have expired or been revoked, it should
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4013 force a full handshake. An upper limit of 24 hours is suggested for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4014 session ID lifetimes, since an attacker who obtains a master_secret
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4015 may be able to impersonate the compromised party until the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4016 corresponding session ID is retired. Applications that may be run in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4017 relatively insecure environments should not write session IDs to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4018 stable storage.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4019
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4020 F.1.5. MD5 and SHA
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4021
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4022 TLS uses hash functions very conservatively. Where possible, both MD5
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4023 and SHA are used in tandem to ensure that non-catastrophic flaws in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4024 one algorithm will not break the overall protocol.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4025
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4026 F.2. Protecting application data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4027
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4028 The master_secret is hashed with the ClientHello.random and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4029 ServerHello.random to produce unique data encryption keys and MAC
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4030 secrets for each connection.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4031
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4032
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4033
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4034 Dierks & Allen Standards Track [Page 72]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4035
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4036 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4037
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4038
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4039 Outgoing data is protected with a MAC before transmission. To prevent
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4040 message replay or modification attacks, the MAC is computed from the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4041 MAC secret, the sequence number, the message length, the message
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4042 contents, and two fixed character strings. The message type field is
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4043 necessary to ensure that messages intended for one TLS Record Layer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4044 client are not redirected to another. The sequence number ensures
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4045 that attempts to delete or reorder messages will be detected. Since
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4046 sequence numbers are 64-bits long, they should never overflow.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4047 Messages from one party cannot be inserted into the other's output,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4048 since they use independent MAC secrets. Similarly, the server-write
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4049 and client-write keys are independent so stream cipher keys are used
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4050 only once.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4051
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4052 If an attacker does break an encryption key, all messages encrypted
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4053 with it can be read. Similarly, compromise of a MAC key can make
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4054 message modification attacks possible. Because MACs are also
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4055 encrypted, message-alteration attacks generally require breaking the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4056 encryption algorithm as well as the MAC.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4057
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4058 Note: MAC secrets may be larger than encryption keys, so messages can
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4059 remain tamper resistant even if encryption keys are broken.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4060
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4061 F.3. Final notes
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4062
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4063 For TLS to be able to provide a secure connection, both the client
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4064 and server systems, keys, and applications must be secure. In
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4065 addition, the implementation must be free of security errors.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4066
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4067 The system is only as strong as the weakest key exchange and
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4068 authentication algorithm supported, and only trustworthy
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4069 cryptographic functions should be used. Short public keys, 40-bit
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4070 bulk encryption keys, and anonymous servers should be used with great
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4071 caution. Implementations and users must be careful when deciding
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4072 which certificates and certificate authorities are acceptable; a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4073 dishonest certificate authority can do tremendous damage.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4074
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4075
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4076
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4077
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4078
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4079
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4080
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4081
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4082
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4083
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4084
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4085
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4086
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4087
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4088
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4089
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4090 Dierks & Allen Standards Track [Page 73]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4091
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4092 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4093
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4094
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4095 G. Patent Statement
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4096
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4097 Some of the cryptographic algorithms proposed for use in this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4098 protocol have patent claims on them. In addition Netscape
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4099 Communications Corporation has a patent claim on the Secure Sockets
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4100 Layer (SSL) work that this standard is based on. The Internet
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4101 Standards Process as defined in RFC 2026 requests that a statement be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4102 obtained from a Patent holder indicating that a license will be made
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4103 available to applicants under reasonable terms and conditions.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4104
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4105 The Massachusetts Institute of Technology has granted RSA Data
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4106 Security, Inc., exclusive sub-licensing rights to the following
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4107 patent issued in the United States:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4108
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4109 Cryptographic Communications System and Method ("RSA"), No.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4110 4,405,829
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4111
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4112 Netscape Communications Corporation has been issued the following
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4113 patent in the United States:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4114
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4115 Secure Socket Layer Application Program Apparatus And Method
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4116 ("SSL"), No. 5,657,390
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4117
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4118 Netscape Communications has issued the following statement:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4119
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4120 Intellectual Property Rights
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4121
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4122 Secure Sockets Layer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4123
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4124 The United States Patent and Trademark Office ("the PTO")
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4125 recently issued U.S. Patent No. 5,657,390 ("the SSL Patent") to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4126 Netscape for inventions described as Secure Sockets Layers
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4127 ("SSL"). The IETF is currently considering adopting SSL as a
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4128 transport protocol with security features. Netscape encourages
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4129 the royalty-free adoption and use of the SSL protocol upon the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4130 following terms and conditions:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4131
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4132 * If you already have a valid SSL Ref license today which
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4133 includes source code from Netscape, an additional patent
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4134 license under the SSL patent is not required.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4135
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4136 * If you don't have an SSL Ref license, you may have a royalty
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4137 free license to build implementations covered by the SSL
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4138 Patent Claims or the IETF TLS specification provided that you
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4139 do not to assert any patent rights against Netscape or other
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4140 companies for the implementation of SSL or the IETF TLS
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4141 recommendation.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4142
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4143
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4144
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4145
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4146 Dierks & Allen Standards Track [Page 74]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4147
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4148 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4149
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4150
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4151 What are "Patent Claims":
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4152
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4153 Patent claims are claims in an issued foreign or domestic patent
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4154 that:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4155
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4156 1) must be infringed in order to implement methods or build
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4157 products according to the IETF TLS specification; or
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4158
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4159 2) patent claims which require the elements of the SSL patent
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4160 claims and/or their equivalents to be infringed.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4161
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4162 The Internet Society, Internet Architecture Board, Internet
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4163 Engineering Steering Group and the Corporation for National Research
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4164 Initiatives take no position on the validity or scope of the patents
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4165 and patent applications, nor on the appropriateness of the terms of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4166 the assurance. The Internet Society and other groups mentioned above
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4167 have not made any determination as to any other intellectual property
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4168 rights which may apply to the practice of this standard. Any further
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4169 consideration of these matters is the user's own responsibility.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4170
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4171 Security Considerations
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4172
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4173 Security issues are discussed throughout this memo.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4174
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4175 References
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4176
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4177 [3DES] W. Tuchman, "Hellman Presents No Shortcut Solutions To DES,"
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4178 IEEE Spectrum, v. 16, n. 7, July 1979, pp40-41.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4179
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4180 [BLEI] Bleichenbacher D., "Chosen Ciphertext Attacks against
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4181 Protocols Based on RSA Encryption Standard PKCS #1" in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4182 Advances in Cryptology -- CRYPTO'98, LNCS vol. 1462, pages:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4183 1--12, 1998.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4184
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4185 [DES] ANSI X3.106, "American National Standard for Information
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4186 Systems-Data Link Encryption," American National Standards
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4187 Institute, 1983.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4188
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4189 [DH1] W. Diffie and M. E. Hellman, "New Directions in
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4190 Cryptography," IEEE Transactions on Information Theory, V.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4191 IT-22, n. 6, Jun 1977, pp. 74-84.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4192
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4193 [DSS] NIST FIPS PUB 186, "Digital Signature Standard," National
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4194 Institute of Standards and Technology, U.S. Department of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4195 Commerce, May 18, 1994.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4196
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4197 [FTP] Postel J., and J. Reynolds, "File Transfer Protocol", STD 9,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4198 RFC 959, October 1985.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4199
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4200
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4201
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4202 Dierks & Allen Standards Track [Page 75]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4203
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4204 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4205
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4206
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4207 [HTTP] Berners-Lee, T., Fielding, R., and H. Frystyk, "Hypertext
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4208 Transfer Protocol -- HTTP/1.0", RFC 1945, May 1996.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4209
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4210 [HMAC] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4211 Hashing for Message Authentication," RFC 2104, February
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4212 1997.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4213
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4214 [IDEA] X. Lai, "On the Design and Security of Block Ciphers," ETH
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4215 Series in Information Processing, v. 1, Konstanz: Hartung-
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4216 Gorre Verlag, 1992.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4217
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4218 [MD2] Kaliski, B., "The MD2 Message Digest Algorithm", RFC 1319,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4219 April 1992.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4220
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4221 [MD5] Rivest, R., "The MD5 Message Digest Algorithm", RFC 1321,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4222 April 1992.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4223
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4224 [PKCS1] RSA Laboratories, "PKCS #1: RSA Encryption Standard,"
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4225 version 1.5, November 1993.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4226
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4227 [PKCS6] RSA Laboratories, "PKCS #6: RSA Extended Certificate Syntax
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4228 Standard," version 1.5, November 1993.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4229
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4230 [PKCS7] RSA Laboratories, "PKCS #7: RSA Cryptographic Message Syntax
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4231 Standard," version 1.5, November 1993.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4232
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4233 [PKIX] Housley, R., Ford, W., Polk, W. and D. Solo, "Internet
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4234 Public Key Infrastructure: Part I: X.509 Certificate and CRL
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4235 Profile", RFC 2459, January 1999.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4236
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4237 [RC2] Rivest, R., "A Description of the RC2(r) Encryption
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4238 Algorithm", RFC 2268, January 1998.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4239
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4240 [RC4] Thayer, R. and K. Kaukonen, A Stream Cipher Encryption
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4241 Algorithm, Work in Progress.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4242
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4243 [RSA] R. Rivest, A. Shamir, and L. M. Adleman, "A Method for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4244 Obtaining Digital Signatures and Public-Key Cryptosystems,"
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4245 Communications of the ACM, v. 21, n. 2, Feb 1978, pp. 120-
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4246 126.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4247
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4248 [RSADSI] Contact RSA Data Security, Inc., Tel: 415-595-8782
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4249
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4250 [SCH] B. Schneier. Applied Cryptography: Protocols, Algorithms,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4251 and Source Code in C, Published by John Wiley & Sons, Inc.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4252 1994.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4253
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4254
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4255
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4256
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4257
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4258 Dierks & Allen Standards Track [Page 76]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4259
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4260 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4261
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4262
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4263 [SHA] NIST FIPS PUB 180-1, "Secure Hash Standard," National
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4264 Institute of Standards and Technology, U.S. Department of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4265 Commerce, Work in Progress, May 31, 1994.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4266
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4267 [SSL2] Hickman, Kipp, "The SSL Protocol", Netscape Communications
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4268 Corp., Feb 9, 1995.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4269
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4270 [SSL3] A. Frier, P. Karlton, and P. Kocher, "The SSL 3.0 Protocol",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4271 Netscape Communications Corp., Nov 18, 1996.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4272
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4273 [TCP] Postel, J., "Transmission Control Protocol," STD 7, RFC 793,
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4274 September 1981.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4275
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4276 [TEL] Postel J., and J. Reynolds, "Telnet Protocol
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4277 Specifications", STD 8, RFC 854, May 1993.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4278
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4279 [TEL] Postel J., and J. Reynolds, "Telnet Option Specifications",
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4280 STD 8, RFC 855, May 1993.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4281
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4282 [X509] CCITT. Recommendation X.509: "The Directory - Authentication
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4283 Framework". 1988.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4284
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4285 [XDR] R. Srinivansan, Sun Microsystems, RFC-1832: XDR: External
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4286 Data Representation Standard, August 1995.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4287
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4288 Credits
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4289
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4290 Win Treese
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4291 Open Market
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4292
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4293 EMail: treese@openmarket.com
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4294
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4295
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4296 Editors
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4297
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4298 Christopher Allen Tim Dierks
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4299 Certicom Certicom
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4300
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4301 EMail: callen@certicom.com EMail: tdierks@certicom.com
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4302
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4303
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4304 Authors' Addresses
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4305
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4306 Tim Dierks Philip L. Karlton
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4307 Certicom Netscape Communications
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4308
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4309 EMail: tdierks@certicom.com
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4310
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4311
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4312
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4313
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4314 Dierks & Allen Standards Track [Page 77]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4315
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4316 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4317
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4318
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4319 Alan O. Freier Paul C. Kocher
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4320 Netscape Communications Independent Consultant
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4321
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4322 EMail: freier@netscape.com EMail: pck@netcom.com
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4323
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4324
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4325 Other contributors
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4326
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4327 Martin Abadi Robert Relyea
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4328 Digital Equipment Corporation Netscape Communications
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4329
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4330 EMail: ma@pa.dec.com EMail: relyea@netscape.com
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4331
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4332 Ran Canetti Jim Roskind
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4333 IBM Watson Research Center Netscape Communications
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4334
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4335 EMail: canetti@watson.ibm.com EMail: jar@netscape.com
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4336
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4337
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4338 Taher Elgamal Micheal J. Sabin, Ph. D.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4339 Securify Consulting Engineer
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4340
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4341 EMail: elgamal@securify.com EMail: msabin@netcom.com
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4342
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4343
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4344 Anil R. Gangolli Dan Simon
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4345 Structured Arts Computing Corp. Microsoft
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4346
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4347 EMail: gangolli@structuredarts.com EMail: dansimon@microsoft.com
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4348
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4349
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4350 Kipp E.B. Hickman Tom Weinstein
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4351 Netscape Communications Netscape Communications
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4352
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4353 EMail: kipp@netscape.com EMail: tomw@netscape.com
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4354
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4355
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4356 Hugo Krawczyk
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4357 IBM Watson Research Center
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4358
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4359 EMail: hugo@watson.ibm.com
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4360
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4361 Comments
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4362
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4363 The discussion list for the IETF TLS working group is located at the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4364 e-mail address <ietf-tls@lists.consensus.com>. Information on the
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4365 group and information on how to subscribe to the list is at
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4366 <http://lists.consensus.com/>.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4367
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4368
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4369
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4370 Dierks & Allen Standards Track [Page 78]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4371
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4372 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4373
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4374
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4375 Archives of the list can be found at:
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4376 <http://www.imc.org/ietf-tls/mail-archive/>
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4377
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4378
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4379
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4380
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4381
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4382
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4383
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4384
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4385
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4386
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4387
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4388
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4389
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4390
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4391
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4392
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4393
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4394
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4395
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4396
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4397
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4398
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4399
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4400
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4401
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4402
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4403
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4404
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4405
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4406
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4407
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4408
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4409
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4410
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4411
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4412
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4413
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4414
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4415
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4416
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4417
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4418
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4419
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4420
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4421
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4422
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4423
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4424
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4425
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4426 Dierks & Allen Standards Track [Page 79]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4427
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4428 RFC 2246 The TLS Protocol Version 1.0 January 1999
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4429
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4430
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4431 Full Copyright Statement
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4432
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4433 Copyright (C) The Internet Society (1999). All Rights Reserved.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4434
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4435 This document and translations of it may be copied and furnished to
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4436 others, and derivative works that comment on or otherwise explain it
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4437 or assist in its implementation may be prepared, copied, published
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4438 and distributed, in whole or in part, without restriction of any
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4439 kind, provided that the above copyright notice and this paragraph are
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4440 included on all such copies and derivative works. However, this
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4441 document itself may not be modified in any way, such as by removing
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4442 the copyright notice or references to the Internet Society or other
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4443 Internet organizations, except as needed for the purpose of
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4444 developing Internet standards in which case the procedures for
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4445 copyrights defined in the Internet Standards process must be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4446 followed, or as required to translate it into languages other than
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4447 English.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4448
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4449 The limited permissions granted above are perpetual and will not be
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4450 revoked by the Internet Society or its successors or assigns.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4451
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4452 This document and the information contained herein is provided on an
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4453 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4454 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4455 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4456 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4457 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4458
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4459
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4460
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4461
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4462
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4463
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4464
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4465
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4466
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4467
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4468
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4469
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4470
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4471
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4472
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4473
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4474
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4475
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4476
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4477
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4478
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4479
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4480
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4481
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4482 Dierks & Allen Standards Track [Page 80]
e60a6ec4aa85 2004-7-12 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4483