OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ | 5 #ifndef NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ |
6 #define NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ | 6 #define NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // tolerating out of order. | 99 // tolerating out of order. |
100 const QuicTag kSSLR = TAG('S', 'S', 'L', 'R'); // Slow Start Large Reduction. | 100 const QuicTag kSSLR = TAG('S', 'S', 'L', 'R'); // Slow Start Large Reduction. |
101 const QuicTag kNPRR = TAG('N', 'P', 'R', 'R'); // Pace at unity instead of PRR | 101 const QuicTag kNPRR = TAG('N', 'P', 'R', 'R'); // Pace at unity instead of PRR |
102 const QuicTag k5RTO = TAG('5', 'R', 'T', 'O'); // Close connection on 5 RTOs | 102 const QuicTag k5RTO = TAG('5', 'R', 'T', 'O'); // Close connection on 5 RTOs |
103 const QuicTag kCTIM = TAG('C', 'T', 'I', 'M'); // Client timestamp in seconds | 103 const QuicTag kCTIM = TAG('C', 'T', 'I', 'M'); // Client timestamp in seconds |
104 // since UNIX epoch. | 104 // since UNIX epoch. |
105 const QuicTag kDHDT = TAG('D', 'H', 'D', 'T'); // Disable HPACK dynamic table. | 105 const QuicTag kDHDT = TAG('D', 'H', 'D', 'T'); // Disable HPACK dynamic table. |
106 const QuicTag kIPFS = TAG('I', 'P', 'F', 'S'); // No Immediate Forward Secrecy | 106 const QuicTag kIPFS = TAG('I', 'P', 'F', 'S'); // No Immediate Forward Secrecy |
107 const QuicTag kCONH = TAG('C', 'O', 'N', 'H'); // Conservative Handshake | 107 const QuicTag kCONH = TAG('C', 'O', 'N', 'H'); // Conservative Handshake |
108 // Retransmissions. | 108 // Retransmissions. |
| 109 const QuicTag kLFAK = TAG('L', 'F', 'A', 'K'); // Don't invoke FACK on the |
| 110 // first ack. |
109 | 111 |
110 // Optional support of truncated Connection IDs. If sent by a peer, the value | 112 // Optional support of truncated Connection IDs. If sent by a peer, the value |
111 // is the minimum number of bytes allowed for the connection ID sent to the | 113 // is the minimum number of bytes allowed for the connection ID sent to the |
112 // peer. | 114 // peer. |
113 const QuicTag kTCID = TAG('T', 'C', 'I', 'D'); // Connection ID truncation. | 115 const QuicTag kTCID = TAG('T', 'C', 'I', 'D'); // Connection ID truncation. |
114 | 116 |
115 // Multipath option. | 117 // Multipath option. |
116 const QuicTag kMPTH = TAG('M', 'P', 'T', 'H'); // Enable multipath. | 118 const QuicTag kMPTH = TAG('M', 'P', 'T', 'H'); // Enable multipath. |
117 | 119 |
118 const QuicTag kNCMR = TAG('N', 'C', 'M', 'R'); // Do not attempt connection | 120 const QuicTag kNCMR = TAG('N', 'C', 'M', 'R'); // Do not attempt connection |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 TAG('C', 'S', 'C', 'T'); // Signed cert timestamp (RFC6962) of leaf cert. | 229 TAG('C', 'S', 'C', 'T'); // Signed cert timestamp (RFC6962) of leaf cert. |
228 | 230 |
229 #undef TAG | 231 #undef TAG |
230 | 232 |
231 const size_t kMaxEntries = 128; // Max number of entries in a message. | 233 const size_t kMaxEntries = 128; // Max number of entries in a message. |
232 | 234 |
233 const size_t kNonceSize = 32; // Size in bytes of the connection nonce. | 235 const size_t kNonceSize = 32; // Size in bytes of the connection nonce. |
234 | 236 |
235 const size_t kOrbitSize = 8; // Number of bytes in an orbit value. | 237 const size_t kOrbitSize = 8; // Number of bytes in an orbit value. |
236 | 238 |
237 // kProofSignatureLabel is prepended to server configs before signing to avoid | |
238 // any cross-protocol attacks on the signature. | |
239 // TODO(rch): Remove this when QUIC_VERSION_30 is removed. | |
240 const char kProofSignatureLabelOld[] = "QUIC server config signature"; | |
241 | |
242 // kProofSignatureLabel is prepended to the CHLO hash and server configs before | 239 // kProofSignatureLabel is prepended to the CHLO hash and server configs before |
243 // signing to avoid any cross-protocol attacks on the signature. | 240 // signing to avoid any cross-protocol attacks on the signature. |
244 const char kProofSignatureLabel[] = "QUIC CHLO and server config signature"; | 241 const char kProofSignatureLabel[] = "QUIC CHLO and server config signature"; |
245 | 242 |
246 // kClientHelloMinimumSize is the minimum size of a client hello. Client hellos | 243 // kClientHelloMinimumSize is the minimum size of a client hello. Client hellos |
247 // will have PAD tags added in order to ensure this minimum is met and client | 244 // will have PAD tags added in order to ensure this minimum is met and client |
248 // hellos smaller than this will be an error. This minimum size reduces the | 245 // hellos smaller than this will be an error. This minimum size reduces the |
249 // amplification factor of any mirror DoS attack. | 246 // amplification factor of any mirror DoS attack. |
250 // | 247 // |
251 // A client may pad an inchoate client hello to a size larger than | 248 // A client may pad an inchoate client hello to a size larger than |
252 // kClientHelloMinimumSize to make it more likely to receive a complete | 249 // kClientHelloMinimumSize to make it more likely to receive a complete |
253 // rejection message. | 250 // rejection message. |
254 const size_t kClientHelloMinimumSize = 1024; | 251 const size_t kClientHelloMinimumSize = 1024; |
255 | 252 |
256 } // namespace net | 253 } // namespace net |
257 | 254 |
258 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ | 255 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ |
OLD | NEW |