| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 #undef TAG | 206 #undef TAG |
| 207 | 207 |
| 208 const size_t kMaxEntries = 128; // Max number of entries in a message. | 208 const size_t kMaxEntries = 128; // Max number of entries in a message. |
| 209 | 209 |
| 210 const size_t kNonceSize = 32; // Size in bytes of the connection nonce. | 210 const size_t kNonceSize = 32; // Size in bytes of the connection nonce. |
| 211 | 211 |
| 212 const size_t kOrbitSize = 8; // Number of bytes in an orbit value. | 212 const size_t kOrbitSize = 8; // Number of bytes in an orbit value. |
| 213 | 213 |
| 214 // kProofSignatureLabel is prepended to server configs before signing to avoid | 214 // kProofSignatureLabel is prepended to server configs before signing to avoid |
| 215 // any cross-protocol attacks on the signature. | 215 // any cross-protocol attacks on the signature. |
| 216 const char kProofSignatureLabel[] = "QUIC server config signature"; | 216 // TODO(rch): Remove this when QUIC_VERSION_30 is removed. |
| 217 const char kProofSignatureLabelOld[] = "QUIC server config signature"; |
| 218 |
| 219 // kProofSignatureLabel is prepended to the CHLO hash and server configs before |
| 220 // signing to avoid any cross-protocol attacks on the signature. |
| 221 const char kProofSignatureLabel[] = "QUIC CHLO and server config signature"; |
| 217 | 222 |
| 218 // kClientHelloMinimumSize is the minimum size of a client hello. Client hellos | 223 // kClientHelloMinimumSize is the minimum size of a client hello. Client hellos |
| 219 // will have PAD tags added in order to ensure this minimum is met and client | 224 // will have PAD tags added in order to ensure this minimum is met and client |
| 220 // hellos smaller than this will be an error. This minimum size reduces the | 225 // hellos smaller than this will be an error. This minimum size reduces the |
| 221 // amplification factor of any mirror DoS attack. | 226 // amplification factor of any mirror DoS attack. |
| 222 // | 227 // |
| 223 // A client may pad an inchoate client hello to a size larger than | 228 // A client may pad an inchoate client hello to a size larger than |
| 224 // kClientHelloMinimumSize to make it more likely to receive a complete | 229 // kClientHelloMinimumSize to make it more likely to receive a complete |
| 225 // rejection message. | 230 // rejection message. |
| 226 const size_t kClientHelloMinimumSize = 1024; | 231 const size_t kClientHelloMinimumSize = 1024; |
| 227 | 232 |
| 228 } // namespace net | 233 } // namespace net |
| 229 | 234 |
| 230 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ | 235 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ |
| OLD | NEW |