Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(383)

Side by Side Diff: net/quic/crypto/crypto_protocol.h

Issue 15937012: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small bug fixes Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 14 matching lines...) Expand all
25 25
26 namespace net { 26 namespace net {
27 27
28 typedef std::string ServerConfigID; 28 typedef std::string ServerConfigID;
29 typedef std::map<QuicTag, std::string> QuicTagValueMap; 29 typedef std::map<QuicTag, std::string> QuicTagValueMap;
30 30
31 const QuicTag kCHLO = TAG('C', 'H', 'L', 'O'); // Client hello 31 const QuicTag kCHLO = TAG('C', 'H', 'L', 'O'); // Client hello
32 const QuicTag kSHLO = TAG('S', 'H', 'L', 'O'); // Server hello 32 const QuicTag kSHLO = TAG('S', 'H', 'L', 'O'); // Server hello
33 const QuicTag kSCFG = TAG('S', 'C', 'F', 'G'); // Server config 33 const QuicTag kSCFG = TAG('S', 'C', 'F', 'G'); // Server config
34 const QuicTag kREJ = TAG('R', 'E', 'J', '\0'); // Reject 34 const QuicTag kREJ = TAG('R', 'E', 'J', '\0'); // Reject
35 const QuicTag kCETV = TAG('C', 'E', 'T', 'V'); // Client encrypted tag-value
36 // pairs
35 37
36 // Key exchange methods 38 // Key exchange methods
37 const QuicTag kP256 = TAG('P', '2', '5', '6'); // ECDH, Curve P-256 39 const QuicTag kP256 = TAG('P', '2', '5', '6'); // ECDH, Curve P-256
38 const QuicTag kC255 = TAG('C', '2', '5', '5'); // ECDH, Curve25519 40 const QuicTag kC255 = TAG('C', '2', '5', '5'); // ECDH, Curve25519
39 41
40 // AEAD algorithms 42 // AEAD algorithms
41 const QuicTag kNULL = TAG('N', 'U', 'L', 'L'); // null algorithm 43 const QuicTag kNULL = TAG('N', 'U', 'L', 'L'); // null algorithm
42 const QuicTag kAESG = TAG('A', 'E', 'S', 'G'); // AES128 + GCM-12 44 const QuicTag kAESG = TAG('A', 'E', 'S', 'G'); // AES128 + GCM-12
43 45
44 // Congestion control feedback types 46 // Congestion control feedback types
45 const QuicTag kQBIC = TAG('Q', 'B', 'I', 'C'); // TCP cubic 47 const QuicTag kQBIC = TAG('Q', 'B', 'I', 'C'); // TCP cubic
46 const QuicTag kINAR = TAG('I', 'N', 'A', 'R'); // Inter arrival 48 const QuicTag kINAR = TAG('I', 'N', 'A', 'R'); // Inter arrival
47 49
48 // Proof types (i.e. certificate types) 50 // Proof types (i.e. certificate types)
49 const QuicTag kX509 = TAG('X', '5', '0', '9'); // X.509 certificate 51 const QuicTag kX509 = TAG('X', '5', '0', '9'); // X.509 certificate
52 const QuicTag kCHID = TAG('C', 'H', 'I', 'D'); // Channel ID.
50 53
51 // Client hello tags 54 // Client hello tags
52 const QuicTag kVERS = TAG('V', 'E', 'R', 'S'); // Version 55 const QuicTag kVERS = TAG('V', 'E', 'R', 'S'); // Version
53 const QuicTag kNONC = TAG('N', 'O', 'N', 'C'); // The client's nonce 56 const QuicTag kNONC = TAG('N', 'O', 'N', 'C'); // The client's nonce
54 const QuicTag kSSID = TAG('S', 'S', 'I', 'D'); // Session ID 57 const QuicTag kSSID = TAG('S', 'S', 'I', 'D'); // Session ID
55 const QuicTag kKEXS = TAG('K', 'E', 'X', 'S'); // Key exchange methods 58 const QuicTag kKEXS = TAG('K', 'E', 'X', 'S'); // Key exchange methods
56 const QuicTag kAEAD = TAG('A', 'E', 'A', 'D'); // Authenticated 59 const QuicTag kAEAD = TAG('A', 'E', 'A', 'D'); // Authenticated
57 // encryption algorithms 60 // encryption algorithms
58 const QuicTag kCGST = TAG('C', 'G', 'S', 'T'); // Congestion control 61 const QuicTag kCGST = TAG('C', 'G', 'S', 'T'); // Congestion control
59 // feedback types 62 // feedback types
60 const QuicTag kICSL = TAG('I', 'C', 'S', 'L'); // Idle connection state 63 const QuicTag kICSL = TAG('I', 'C', 'S', 'L'); // Idle connection state
61 // lifetime 64 // lifetime
62 const QuicTag kKATO = TAG('K', 'A', 'T', 'O'); // Keepalive timeout 65 const QuicTag kKATO = TAG('K', 'A', 'T', 'O'); // Keepalive timeout
63 const QuicTag kMSPC = TAG('M', 'S', 'P', 'C'); // Max streams per connection. 66 const QuicTag kMSPC = TAG('M', 'S', 'P', 'C'); // Max streams per connection.
64 const QuicTag kSNI = TAG('S', 'N', 'I', '\0'); // Server name 67 const QuicTag kSNI = TAG('S', 'N', 'I', '\0'); // Server name
65 // indication 68 // indication
66 const QuicTag kPUBS = TAG('P', 'U', 'B', 'S'); // Public key values 69 const QuicTag kPUBS = TAG('P', 'U', 'B', 'S'); // Public key values
67 const QuicTag kSCID = TAG('S', 'C', 'I', 'D'); // Server config id 70 const QuicTag kSCID = TAG('S', 'C', 'I', 'D'); // Server config id
68 const QuicTag kORBT = TAG('O', 'B', 'I', 'T'); // Server orbit. 71 const QuicTag kORBT = TAG('O', 'B', 'I', 'T'); // Server orbit.
69 const QuicTag kPDMD = TAG('P', 'D', 'M', 'D'); // Proof demand. 72 const QuicTag kPDMD = TAG('P', 'D', 'M', 'D'); // Proof demand.
70 const QuicTag kPROF = TAG('P', 'R', 'O', 'F'); // Proof (signature). 73 const QuicTag kPROF = TAG('P', 'R', 'O', 'F'); // Proof (signature).
71 const QuicTag kCCS = TAG('C', 'C', 'S', 0); // Common certificate set 74 const QuicTag kCCS = TAG('C', 'C', 'S', 0); // Common certificate set
72 const QuicTag kCCRT = TAG('C', 'C', 'R', 'T'); // Cached certificate 75 const QuicTag kCCRT = TAG('C', 'C', 'R', 'T'); // Cached certificate
73 const QuicTag kEXPY = TAG('E', 'X', 'P', 'Y'); // Expiry 76 const QuicTag kEXPY = TAG('E', 'X', 'P', 'Y'); // Expiry
74 77
78 // CETV tags
79 const QuicTag kCIDK = TAG('C', 'I', 'D', 'K'); // ChannelID key
80 const QuicTag kCIDS = TAG('C', 'I', 'D', 'S'); // ChannelID signature
81
75 // Universal tags 82 // Universal tags
76 const QuicTag kPAD = TAG('P', 'A', 'D', '\0'); // Padding 83 const QuicTag kPAD = TAG('P', 'A', 'D', '\0'); // Padding
77 84
78 // These tags have a special form so that they appear either at the beginning 85 // These tags have a special form so that they appear either at the beginning
79 // or the end of a handshake message. Since handshake messages are sorted by 86 // or the end of a handshake message. Since handshake messages are sorted by
80 // tag value, the tags with 0 at the end will sort first and those with 255 at 87 // tag value, the tags with 0 at the end will sort first and those with 255 at
81 // the end will sort last. 88 // the end will sort last.
82 // 89 //
83 // The certificate chain should have a tag that will cause it to be sorted at 90 // The certificate chain should have a tag that will cause it to be sorted at
84 // the end of any handshake messages because it's likely to be large and the 91 // the end of any handshake messages because it's likely to be large and the
(...skipping 25 matching lines...) Expand all
110 117
111 // kClientHelloMinimumSize is the minimum size of a client hello. Client hellos 118 // kClientHelloMinimumSize is the minimum size of a client hello. Client hellos
112 // will have PAD tags added in order to ensure this minimum is met and client 119 // will have PAD tags added in order to ensure this minimum is met and client
113 // hellos smaller than this will be an error. This minimum size reduces the 120 // hellos smaller than this will be an error. This minimum size reduces the
114 // amplification factor of any mirror DoS attack. 121 // amplification factor of any mirror DoS attack.
115 const size_t kClientHelloMinimumSize = 512; 122 const size_t kClientHelloMinimumSize = 512;
116 123
117 } // namespace net 124 } // namespace net
118 125
119 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_ 126 #endif // NET_QUIC_CRYPTO_CRYPTO_PROTOCOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698