Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 1 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 2 | * All rights reserved. |
| 3 | * |
| 4 | * This package is an SSL implementation written |
| 5 | * by Eric Young (eay@cryptsoft.com). |
| 6 | * The implementation was written so as to conform with Netscapes SSL. |
| 7 | * |
| 8 | * This library is free for commercial and non-commercial use as long as |
| 9 | * the following conditions are aheared to. The following conditions |
| 10 | * apply to all code found in this distribution, be it the RC4, RSA, |
| 11 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation |
| 12 | * included with this distribution is covered by the same copyright terms |
| 13 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). |
| 14 | * |
| 15 | * Copyright remains Eric Young's, and as such any Copyright notices in |
| 16 | * the code are not to be removed. |
| 17 | * If this package is used in a product, Eric Young should be given attribution |
| 18 | * as the author of the parts of the library used. |
| 19 | * This can be in the form of a textual message at program startup or |
| 20 | * in documentation (online or textual) provided with the package. |
| 21 | * |
| 22 | * Redistribution and use in source and binary forms, with or without |
| 23 | * modification, are permitted provided that the following conditions |
| 24 | * are met: |
| 25 | * 1. Redistributions of source code must retain the copyright |
| 26 | * notice, this list of conditions and the following disclaimer. |
| 27 | * 2. Redistributions in binary form must reproduce the above copyright |
| 28 | * notice, this list of conditions and the following disclaimer in the |
| 29 | * documentation and/or other materials provided with the distribution. |
| 30 | * 3. All advertising materials mentioning features or use of this software |
| 31 | * must display the following acknowledgement: |
| 32 | * "This product includes cryptographic software written by |
| 33 | * Eric Young (eay@cryptsoft.com)" |
| 34 | * The word 'cryptographic' can be left out if the rouines from the library |
| 35 | * being used are not cryptographic related :-). |
| 36 | * 4. If you include any Windows specific code (or a derivative thereof) from |
| 37 | * the apps directory (application code) you must include an acknowledgement: |
| 38 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" |
| 39 | * |
| 40 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND |
| 41 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 42 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 43 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
| 44 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 45 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 46 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 48 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 49 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 50 | * SUCH DAMAGE. |
| 51 | * |
| 52 | * The licence and distribution terms for any publically available version or |
| 53 | * derivative of this code cannot be changed. i.e. this code cannot simply be |
| 54 | * copied and put under another distribution licence |
| 55 | * [including the GNU Public Licence.] |
| 56 | */ |
| 57 | /* ==================================================================== |
| 58 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. |
| 59 | * |
| 60 | * Redistribution and use in source and binary forms, with or without |
| 61 | * modification, are permitted provided that the following conditions |
| 62 | * are met: |
| 63 | * |
| 64 | * 1. Redistributions of source code must retain the above copyright |
| 65 | * notice, this list of conditions and the following disclaimer. |
| 66 | * |
| 67 | * 2. Redistributions in binary form must reproduce the above copyright |
| 68 | * notice, this list of conditions and the following disclaimer in |
| 69 | * the documentation and/or other materials provided with the |
| 70 | * distribution. |
| 71 | * |
| 72 | * 3. All advertising materials mentioning features or use of this |
| 73 | * software must display the following acknowledgment: |
| 74 | * "This product includes software developed by the OpenSSL Project |
| 75 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" |
| 76 | * |
| 77 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to |
| 78 | * endorse or promote products derived from this software without |
| 79 | * prior written permission. For written permission, please contact |
| 80 | * openssl-core@openssl.org. |
| 81 | * |
| 82 | * 5. Products derived from this software may not be called "OpenSSL" |
| 83 | * nor may "OpenSSL" appear in their names without prior written |
| 84 | * permission of the OpenSSL Project. |
| 85 | * |
| 86 | * 6. Redistributions of any form whatsoever must retain the following |
| 87 | * acknowledgment: |
| 88 | * "This product includes software developed by the OpenSSL Project |
| 89 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" |
| 90 | * |
| 91 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY |
| 92 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 93 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 94 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR |
| 95 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 96 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 97 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 98 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 99 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 100 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 101 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 102 | * OF THE POSSIBILITY OF SUCH DAMAGE. |
| 103 | * ==================================================================== |
| 104 | * |
| 105 | * This product includes cryptographic software written by Eric Young |
| 106 | * (eay@cryptsoft.com). This product includes software written by Tim |
| 107 | * Hudson (tjh@cryptsoft.com). |
| 108 | * |
| 109 | */ |
| 110 | /* ==================================================================== |
| 111 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
| 112 | * |
| 113 | * Portions of the attached software ("Contribution") are developed by |
| 114 | * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. |
| 115 | * |
| 116 | * The Contribution is licensed pursuant to the OpenSSL open source |
| 117 | * license provided above. |
| 118 | * |
| 119 | * ECC cipher suite support in OpenSSL originally written by |
| 120 | * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories. |
| 121 | * |
| 122 | */ |
| 123 | /* ==================================================================== |
| 124 | * Copyright 2005 Nokia. All rights reserved. |
| 125 | * |
| 126 | * The portions of the attached software ("Contribution") is developed by |
| 127 | * Nokia Corporation and is licensed pursuant to the OpenSSL open source |
| 128 | * license. |
| 129 | * |
| 130 | * The Contribution, originally written by Mika Kousa and Pasi Eronen of |
| 131 | * Nokia Corporation, consists of the "PSK" (Pre-Shared Key) ciphersuites |
| 132 | * support (see RFC 4279) to OpenSSL. |
| 133 | * |
| 134 | * No patent licenses or other rights except those expressly stated in |
| 135 | * the OpenSSL open source license shall be deemed granted or received |
| 136 | * expressly, by implication, estoppel, or otherwise. |
| 137 | * |
| 138 | * No assurances are provided by Nokia that the Contribution does not |
| 139 | * infringe the patent or other intellectual property rights of any third |
| 140 | * party or that the license provides you with all the necessary rights |
| 141 | * to make use of the Contribution. |
| 142 | * |
| 143 | * THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN |
| 144 | * ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA |
| 145 | * SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY |
| 146 | * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR |
| 147 | * OTHERWISE. |
| 148 | */ |
| 149 | |
Kenny Root | e99801b | 2015-11-06 15:31:15 -0800 | [diff] [blame] | 150 | #ifndef OPENSSL_HEADER_TLS1_H |
| 151 | #define OPENSSL_HEADER_TLS1_H |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 152 | |
Kenny Root | e99801b | 2015-11-06 15:31:15 -0800 | [diff] [blame] | 153 | #include <openssl/base.h> |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 154 | |
| 155 | #ifdef __cplusplus |
| 156 | extern "C" { |
| 157 | #endif |
| 158 | |
| 159 | |
David Benjamin | c895d6b | 2016-08-11 13:26:41 -0400 | [diff] [blame^] | 160 | #define TLS1_AD_END_OF_EARLY_DATA 1 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 161 | #define TLS1_AD_DECRYPTION_FAILED 21 |
| 162 | #define TLS1_AD_RECORD_OVERFLOW 22 |
| 163 | #define TLS1_AD_UNKNOWN_CA 48 /* fatal */ |
| 164 | #define TLS1_AD_ACCESS_DENIED 49 /* fatal */ |
| 165 | #define TLS1_AD_DECODE_ERROR 50 /* fatal */ |
| 166 | #define TLS1_AD_DECRYPT_ERROR 51 |
| 167 | #define TLS1_AD_EXPORT_RESTRICTION 60 /* fatal */ |
| 168 | #define TLS1_AD_PROTOCOL_VERSION 70 /* fatal */ |
| 169 | #define TLS1_AD_INSUFFICIENT_SECURITY 71 /* fatal */ |
| 170 | #define TLS1_AD_INTERNAL_ERROR 80 /* fatal */ |
| 171 | #define TLS1_AD_USER_CANCELLED 90 |
| 172 | #define TLS1_AD_NO_RENEGOTIATION 100 |
David Benjamin | c895d6b | 2016-08-11 13:26:41 -0400 | [diff] [blame^] | 173 | #define TLS1_AD_MISSING_EXTENSION 109 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 174 | /* codes 110-114 are from RFC3546 */ |
| 175 | #define TLS1_AD_UNSUPPORTED_EXTENSION 110 |
| 176 | #define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111 |
| 177 | #define TLS1_AD_UNRECOGNIZED_NAME 112 |
| 178 | #define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113 |
| 179 | #define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114 |
| 180 | #define TLS1_AD_UNKNOWN_PSK_IDENTITY 115 /* fatal */ |
| 181 | |
David Benjamin | c895d6b | 2016-08-11 13:26:41 -0400 | [diff] [blame^] | 182 | /* ExtensionType values from RFC6066 */ |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 183 | #define TLSEXT_TYPE_server_name 0 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 184 | #define TLSEXT_TYPE_status_request 5 |
David Benjamin | d316cba | 2016-06-02 16:17:39 -0400 | [diff] [blame] | 185 | |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 186 | /* ExtensionType values from RFC4492 */ |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 187 | #define TLSEXT_TYPE_ec_point_formats 11 |
| 188 | |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 189 | /* ExtensionType values from RFC5246 */ |
| 190 | #define TLSEXT_TYPE_signature_algorithms 13 |
| 191 | |
| 192 | /* ExtensionType value from RFC5764 */ |
Kenny Root | b849459 | 2015-09-25 02:29:14 +0000 | [diff] [blame] | 193 | #define TLSEXT_TYPE_srtp 14 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 194 | |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 195 | /* ExtensionType value from RFC7301 */ |
| 196 | #define TLSEXT_TYPE_application_layer_protocol_negotiation 16 |
| 197 | |
Kenny Root | e99801b | 2015-11-06 15:31:15 -0800 | [diff] [blame] | 198 | /* ExtensionType value from RFC7685 */ |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 199 | #define TLSEXT_TYPE_padding 21 |
| 200 | |
David Benjamin | 4969cc9 | 2016-04-22 15:02:23 -0400 | [diff] [blame] | 201 | /* ExtensionType value from RFC7627 */ |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 202 | #define TLSEXT_TYPE_extended_master_secret 23 |
| 203 | |
| 204 | /* ExtensionType value from RFC4507 */ |
| 205 | #define TLSEXT_TYPE_session_ticket 35 |
| 206 | |
David Benjamin | c895d6b | 2016-08-11 13:26:41 -0400 | [diff] [blame^] | 207 | /* ExtensionType values from draft-ietf-tls-tls13-13 */ |
| 208 | #define TLSEXT_TYPE_supported_groups 10 |
| 209 | #define TLSEXT_TYPE_key_share 40 |
| 210 | #define TLSEXT_TYPE_pre_shared_key 41 |
| 211 | #define TLSEXT_TYPE_early_data 42 |
| 212 | #define TLSEXT_TYPE_cookie 44 |
| 213 | |
| 214 | /* TLSEXT_TYPE_draft_version is the extension used to advertise the TLS 1.3 |
| 215 | * draft implemented. |
| 216 | * |
| 217 | * See |
| 218 | * https://github.com/tlswg/tls13-spec/wiki/Implementations#version-negotiation |
| 219 | */ |
| 220 | #define TLSEXT_TYPE_draft_version 0xff02 |
| 221 | |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 222 | /* ExtensionType value from RFC5746 */ |
| 223 | #define TLSEXT_TYPE_renegotiate 0xff01 |
| 224 | |
| 225 | /* ExtensionType value from RFC6962 */ |
| 226 | #define TLSEXT_TYPE_certificate_timestamp 18 |
| 227 | |
| 228 | /* This is not an IANA defined extension number */ |
| 229 | #define TLSEXT_TYPE_next_proto_neg 13172 |
| 230 | |
| 231 | /* This is not an IANA defined extension number */ |
Kenny Root | b849459 | 2015-09-25 02:29:14 +0000 | [diff] [blame] | 232 | #define TLSEXT_TYPE_channel_id 30032 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 233 | |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 234 | /* status request value from RFC 3546 */ |
| 235 | #define TLSEXT_STATUSTYPE_ocsp 1 |
| 236 | |
| 237 | /* ECPointFormat values from RFC 4492 */ |
| 238 | #define TLSEXT_ECPOINTFORMAT_uncompressed 0 |
| 239 | #define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime 1 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 240 | |
| 241 | /* Signature and hash algorithms from RFC 5246 */ |
| 242 | |
| 243 | #define TLSEXT_signature_anonymous 0 |
| 244 | #define TLSEXT_signature_rsa 1 |
| 245 | #define TLSEXT_signature_dsa 2 |
| 246 | #define TLSEXT_signature_ecdsa 3 |
| 247 | |
| 248 | #define TLSEXT_hash_none 0 |
| 249 | #define TLSEXT_hash_md5 1 |
| 250 | #define TLSEXT_hash_sha1 2 |
| 251 | #define TLSEXT_hash_sha224 3 |
| 252 | #define TLSEXT_hash_sha256 4 |
| 253 | #define TLSEXT_hash_sha384 5 |
| 254 | #define TLSEXT_hash_sha512 6 |
| 255 | |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 256 | #define TLSEXT_MAXLEN_host_name 255 |
| 257 | |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 258 | /* PSK ciphersuites from 4279 */ |
| 259 | #define TLS1_CK_PSK_WITH_RC4_128_SHA 0x0300008A |
| 260 | #define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA 0x0300008B |
| 261 | #define TLS1_CK_PSK_WITH_AES_128_CBC_SHA 0x0300008C |
| 262 | #define TLS1_CK_PSK_WITH_AES_256_CBC_SHA 0x0300008D |
| 263 | |
Adam Langley | 0e6bb1c | 2015-06-15 13:52:15 -0700 | [diff] [blame] | 264 | /* PSK ciphersuites from RFC 5489 */ |
| 265 | #define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA 0x0300C035 |
| 266 | #define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA 0x0300C036 |
| 267 | |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 268 | /* Additional TLS ciphersuites from expired Internet Draft |
| 269 | * draft-ietf-tls-56-bit-ciphersuites-01.txt |
| 270 | * (available if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES is defined, see |
| 271 | * s3_lib.c). We actually treat them like SSL 3.0 ciphers, which we probably |
| 272 | * shouldn't. Note that the first two are actually not in the IDs. */ |
| 273 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5 0x03000060 /* not in ID */ |
| 274 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 0x03000061 /* not in ID */ |
| 275 | #define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA 0x03000062 |
| 276 | #define TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA 0x03000063 |
| 277 | #define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA 0x03000064 |
| 278 | #define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA 0x03000065 |
| 279 | #define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA 0x03000066 |
| 280 | |
| 281 | /* AES ciphersuites from RFC3268 */ |
| 282 | |
| 283 | #define TLS1_CK_RSA_WITH_AES_128_SHA 0x0300002F |
| 284 | #define TLS1_CK_DH_DSS_WITH_AES_128_SHA 0x03000030 |
| 285 | #define TLS1_CK_DH_RSA_WITH_AES_128_SHA 0x03000031 |
| 286 | #define TLS1_CK_DHE_DSS_WITH_AES_128_SHA 0x03000032 |
| 287 | #define TLS1_CK_DHE_RSA_WITH_AES_128_SHA 0x03000033 |
| 288 | #define TLS1_CK_ADH_WITH_AES_128_SHA 0x03000034 |
| 289 | |
| 290 | #define TLS1_CK_RSA_WITH_AES_256_SHA 0x03000035 |
| 291 | #define TLS1_CK_DH_DSS_WITH_AES_256_SHA 0x03000036 |
| 292 | #define TLS1_CK_DH_RSA_WITH_AES_256_SHA 0x03000037 |
| 293 | #define TLS1_CK_DHE_DSS_WITH_AES_256_SHA 0x03000038 |
| 294 | #define TLS1_CK_DHE_RSA_WITH_AES_256_SHA 0x03000039 |
| 295 | #define TLS1_CK_ADH_WITH_AES_256_SHA 0x0300003A |
| 296 | |
| 297 | /* TLS v1.2 ciphersuites */ |
| 298 | #define TLS1_CK_RSA_WITH_NULL_SHA256 0x0300003B |
| 299 | #define TLS1_CK_RSA_WITH_AES_128_SHA256 0x0300003C |
| 300 | #define TLS1_CK_RSA_WITH_AES_256_SHA256 0x0300003D |
| 301 | #define TLS1_CK_DH_DSS_WITH_AES_128_SHA256 0x0300003E |
| 302 | #define TLS1_CK_DH_RSA_WITH_AES_128_SHA256 0x0300003F |
| 303 | #define TLS1_CK_DHE_DSS_WITH_AES_128_SHA256 0x03000040 |
| 304 | |
| 305 | /* Camellia ciphersuites from RFC4132 */ |
| 306 | #define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000041 |
| 307 | #define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000042 |
| 308 | #define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000043 |
| 309 | #define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000044 |
| 310 | #define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000045 |
| 311 | #define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA 0x03000046 |
| 312 | |
| 313 | /* TLS v1.2 ciphersuites */ |
| 314 | #define TLS1_CK_DHE_RSA_WITH_AES_128_SHA256 0x03000067 |
| 315 | #define TLS1_CK_DH_DSS_WITH_AES_256_SHA256 0x03000068 |
| 316 | #define TLS1_CK_DH_RSA_WITH_AES_256_SHA256 0x03000069 |
| 317 | #define TLS1_CK_DHE_DSS_WITH_AES_256_SHA256 0x0300006A |
| 318 | #define TLS1_CK_DHE_RSA_WITH_AES_256_SHA256 0x0300006B |
| 319 | #define TLS1_CK_ADH_WITH_AES_128_SHA256 0x0300006C |
| 320 | #define TLS1_CK_ADH_WITH_AES_256_SHA256 0x0300006D |
| 321 | |
| 322 | /* Camellia ciphersuites from RFC4132 */ |
| 323 | #define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000084 |
| 324 | #define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000085 |
| 325 | #define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000086 |
| 326 | #define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000087 |
| 327 | #define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000088 |
| 328 | #define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA 0x03000089 |
| 329 | |
| 330 | /* SEED ciphersuites from RFC4162 */ |
| 331 | #define TLS1_CK_RSA_WITH_SEED_SHA 0x03000096 |
| 332 | #define TLS1_CK_DH_DSS_WITH_SEED_SHA 0x03000097 |
| 333 | #define TLS1_CK_DH_RSA_WITH_SEED_SHA 0x03000098 |
| 334 | #define TLS1_CK_DHE_DSS_WITH_SEED_SHA 0x03000099 |
| 335 | #define TLS1_CK_DHE_RSA_WITH_SEED_SHA 0x0300009A |
| 336 | #define TLS1_CK_ADH_WITH_SEED_SHA 0x0300009B |
| 337 | |
| 338 | /* TLS v1.2 GCM ciphersuites from RFC5288 */ |
| 339 | #define TLS1_CK_RSA_WITH_AES_128_GCM_SHA256 0x0300009C |
| 340 | #define TLS1_CK_RSA_WITH_AES_256_GCM_SHA384 0x0300009D |
| 341 | #define TLS1_CK_DHE_RSA_WITH_AES_128_GCM_SHA256 0x0300009E |
| 342 | #define TLS1_CK_DHE_RSA_WITH_AES_256_GCM_SHA384 0x0300009F |
| 343 | #define TLS1_CK_DH_RSA_WITH_AES_128_GCM_SHA256 0x030000A0 |
| 344 | #define TLS1_CK_DH_RSA_WITH_AES_256_GCM_SHA384 0x030000A1 |
| 345 | #define TLS1_CK_DHE_DSS_WITH_AES_128_GCM_SHA256 0x030000A2 |
| 346 | #define TLS1_CK_DHE_DSS_WITH_AES_256_GCM_SHA384 0x030000A3 |
| 347 | #define TLS1_CK_DH_DSS_WITH_AES_128_GCM_SHA256 0x030000A4 |
| 348 | #define TLS1_CK_DH_DSS_WITH_AES_256_GCM_SHA384 0x030000A5 |
| 349 | #define TLS1_CK_ADH_WITH_AES_128_GCM_SHA256 0x030000A6 |
| 350 | #define TLS1_CK_ADH_WITH_AES_256_GCM_SHA384 0x030000A7 |
| 351 | |
| 352 | /* ECC ciphersuites from RFC4492 */ |
| 353 | #define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA 0x0300C001 |
| 354 | #define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA 0x0300C002 |
| 355 | #define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C003 |
| 356 | #define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0x0300C004 |
| 357 | #define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0x0300C005 |
| 358 | |
| 359 | #define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA 0x0300C006 |
| 360 | #define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA 0x0300C007 |
| 361 | #define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C008 |
| 362 | #define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0x0300C009 |
| 363 | #define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0x0300C00A |
| 364 | |
| 365 | #define TLS1_CK_ECDH_RSA_WITH_NULL_SHA 0x0300C00B |
| 366 | #define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA 0x0300C00C |
| 367 | #define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA 0x0300C00D |
| 368 | #define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA 0x0300C00E |
| 369 | #define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA 0x0300C00F |
| 370 | |
| 371 | #define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA 0x0300C010 |
| 372 | #define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA 0x0300C011 |
| 373 | #define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA 0x0300C012 |
| 374 | #define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA 0x0300C013 |
| 375 | #define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA 0x0300C014 |
| 376 | |
| 377 | #define TLS1_CK_ECDH_anon_WITH_NULL_SHA 0x0300C015 |
| 378 | #define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA 0x0300C016 |
| 379 | #define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA 0x0300C017 |
| 380 | #define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA 0x0300C018 |
| 381 | #define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA 0x0300C019 |
| 382 | |
| 383 | /* SRP ciphersuites from RFC 5054 */ |
| 384 | #define TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA 0x0300C01A |
| 385 | #define TLS1_CK_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA 0x0300C01B |
| 386 | #define TLS1_CK_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA 0x0300C01C |
| 387 | #define TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA 0x0300C01D |
| 388 | #define TLS1_CK_SRP_SHA_RSA_WITH_AES_128_CBC_SHA 0x0300C01E |
| 389 | #define TLS1_CK_SRP_SHA_DSS_WITH_AES_128_CBC_SHA 0x0300C01F |
| 390 | #define TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA 0x0300C020 |
| 391 | #define TLS1_CK_SRP_SHA_RSA_WITH_AES_256_CBC_SHA 0x0300C021 |
| 392 | #define TLS1_CK_SRP_SHA_DSS_WITH_AES_256_CBC_SHA 0x0300C022 |
| 393 | |
| 394 | /* ECDH HMAC based ciphersuites from RFC5289 */ |
| 395 | |
| 396 | #define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_SHA256 0x0300C023 |
| 397 | #define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_SHA384 0x0300C024 |
| 398 | #define TLS1_CK_ECDH_ECDSA_WITH_AES_128_SHA256 0x0300C025 |
| 399 | #define TLS1_CK_ECDH_ECDSA_WITH_AES_256_SHA384 0x0300C026 |
| 400 | #define TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256 0x0300C027 |
| 401 | #define TLS1_CK_ECDHE_RSA_WITH_AES_256_SHA384 0x0300C028 |
| 402 | #define TLS1_CK_ECDH_RSA_WITH_AES_128_SHA256 0x0300C029 |
| 403 | #define TLS1_CK_ECDH_RSA_WITH_AES_256_SHA384 0x0300C02A |
| 404 | |
| 405 | /* ECDH GCM based ciphersuites from RFC5289 */ |
| 406 | #define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02B |
| 407 | #define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02C |
| 408 | #define TLS1_CK_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02D |
| 409 | #define TLS1_CK_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02E |
| 410 | #define TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0x0300C02F |
| 411 | #define TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0x0300C030 |
| 412 | #define TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256 0x0300C031 |
| 413 | #define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384 0x0300C032 |
| 414 | |
Kenny Root | e99801b | 2015-11-06 15:31:15 -0800 | [diff] [blame] | 415 | #define TLS1_CK_ECDHE_RSA_CHACHA20_POLY1305_OLD 0x0300CC13 |
| 416 | #define TLS1_CK_ECDHE_ECDSA_CHACHA20_POLY1305_OLD 0x0300CC14 |
| 417 | |
David Benjamin | c895d6b | 2016-08-11 13:26:41 -0400 | [diff] [blame^] | 418 | /* ChaCha20-Poly1305 cipher suites from RFC 7905. */ |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 419 | #define TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 0x0300CCA8 |
| 420 | #define TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 0x0300CCA9 |
| 421 | #define TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 0x0300CCAC |
| 422 | |
David Benjamin | 6e899c7 | 2016-06-09 18:02:18 -0400 | [diff] [blame] | 423 | /* PSK ciphersuites from mattsson-tls-ecdhe-psk-aead */ |
| 424 | #define TLS1_CK_ECDHE_PSK_WITH_AES_128_GCM_SHA256 0x0300D001 |
| 425 | #define TLS1_CK_ECDHE_PSK_WITH_AES_256_GCM_SHA384 0x0300D002 |
| 426 | |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 427 | /* TODO(davidben): Remove this. Historically, the CK names for CHACHA20_POLY1305 |
| 428 | * were missing 'WITH' and 'SHA256'. */ |
Kenny Root | e99801b | 2015-11-06 15:31:15 -0800 | [diff] [blame] | 429 | #define TLS1_CK_ECDHE_RSA_CHACHA20_POLY1305 \ |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 430 | TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 431 | |
David Benjamin | d316cba | 2016-06-02 16:17:39 -0400 | [diff] [blame] | 432 | /* CECPQ1 ciphersuites. These are specific to BoringSSL and not standard. */ |
| 433 | #define TLS1_CK_CECPQ1_RSA_WITH_CHACHA20_POLY1305_SHA256 0x030016B7 |
| 434 | #define TLS1_CK_CECPQ1_ECDSA_WITH_CHACHA20_POLY1305_SHA256 0x030016B8 |
| 435 | #define TLS1_CK_CECPQ1_RSA_WITH_AES_256_GCM_SHA384 0x030016B9 |
| 436 | #define TLS1_CK_CECPQ1_ECDSA_WITH_AES_256_GCM_SHA384 0x030016BA |
| 437 | |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 438 | /* XXX |
| 439 | * Inconsistency alert: |
| 440 | * The OpenSSL names of ciphers with ephemeral DH here include the string |
| 441 | * "DHE", while elsewhere it has always been "EDH". |
| 442 | * (The alias for the list of all such ciphers also is "EDH".) |
| 443 | * The specifications speak of "EDH"; maybe we should allow both forms |
| 444 | * for everything. */ |
| 445 | #define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5 "EXP1024-RC4-MD5" |
| 446 | #define TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5 "EXP1024-RC2-CBC-MD5" |
| 447 | #define TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA "EXP1024-DES-CBC-SHA" |
| 448 | #define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA \ |
| 449 | "EXP1024-DHE-DSS-DES-CBC-SHA" |
| 450 | #define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_SHA "EXP1024-RC4-SHA" |
| 451 | #define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA "EXP1024-DHE-DSS-RC4-SHA" |
| 452 | #define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA "DHE-DSS-RC4-SHA" |
| 453 | |
| 454 | /* AES ciphersuites from RFC3268 */ |
| 455 | #define TLS1_TXT_RSA_WITH_AES_128_SHA "AES128-SHA" |
| 456 | #define TLS1_TXT_DH_DSS_WITH_AES_128_SHA "DH-DSS-AES128-SHA" |
| 457 | #define TLS1_TXT_DH_RSA_WITH_AES_128_SHA "DH-RSA-AES128-SHA" |
| 458 | #define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA "DHE-DSS-AES128-SHA" |
| 459 | #define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA "DHE-RSA-AES128-SHA" |
| 460 | #define TLS1_TXT_ADH_WITH_AES_128_SHA "ADH-AES128-SHA" |
| 461 | |
| 462 | #define TLS1_TXT_RSA_WITH_AES_256_SHA "AES256-SHA" |
| 463 | #define TLS1_TXT_DH_DSS_WITH_AES_256_SHA "DH-DSS-AES256-SHA" |
| 464 | #define TLS1_TXT_DH_RSA_WITH_AES_256_SHA "DH-RSA-AES256-SHA" |
| 465 | #define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA "DHE-DSS-AES256-SHA" |
| 466 | #define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA "DHE-RSA-AES256-SHA" |
| 467 | #define TLS1_TXT_ADH_WITH_AES_256_SHA "ADH-AES256-SHA" |
| 468 | |
| 469 | /* ECC ciphersuites from RFC4492 */ |
| 470 | #define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA "ECDH-ECDSA-NULL-SHA" |
| 471 | #define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA "ECDH-ECDSA-RC4-SHA" |
| 472 | #define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA "ECDH-ECDSA-DES-CBC3-SHA" |
| 473 | #define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA "ECDH-ECDSA-AES128-SHA" |
| 474 | #define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA "ECDH-ECDSA-AES256-SHA" |
| 475 | |
| 476 | #define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA "ECDHE-ECDSA-NULL-SHA" |
| 477 | #define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA "ECDHE-ECDSA-RC4-SHA" |
| 478 | #define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA "ECDHE-ECDSA-DES-CBC3-SHA" |
| 479 | #define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "ECDHE-ECDSA-AES128-SHA" |
| 480 | #define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA "ECDHE-ECDSA-AES256-SHA" |
| 481 | |
| 482 | #define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA "ECDH-RSA-NULL-SHA" |
| 483 | #define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA "ECDH-RSA-RC4-SHA" |
| 484 | #define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA "ECDH-RSA-DES-CBC3-SHA" |
| 485 | #define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA "ECDH-RSA-AES128-SHA" |
| 486 | #define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA "ECDH-RSA-AES256-SHA" |
| 487 | |
| 488 | #define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA "ECDHE-RSA-NULL-SHA" |
| 489 | #define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA "ECDHE-RSA-RC4-SHA" |
| 490 | #define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA "ECDHE-RSA-DES-CBC3-SHA" |
| 491 | #define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA "ECDHE-RSA-AES128-SHA" |
| 492 | #define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA "ECDHE-RSA-AES256-SHA" |
| 493 | |
| 494 | #define TLS1_TXT_ECDH_anon_WITH_NULL_SHA "AECDH-NULL-SHA" |
| 495 | #define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA "AECDH-RC4-SHA" |
| 496 | #define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA "AECDH-DES-CBC3-SHA" |
| 497 | #define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA "AECDH-AES128-SHA" |
| 498 | #define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA "AECDH-AES256-SHA" |
| 499 | |
| 500 | /* PSK ciphersuites from RFC 4279 */ |
| 501 | #define TLS1_TXT_PSK_WITH_RC4_128_SHA "PSK-RC4-SHA" |
| 502 | #define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA "PSK-3DES-EDE-CBC-SHA" |
| 503 | #define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA "PSK-AES128-CBC-SHA" |
| 504 | #define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA "PSK-AES256-CBC-SHA" |
| 505 | |
Adam Langley | 0e6bb1c | 2015-06-15 13:52:15 -0700 | [diff] [blame] | 506 | /* PSK ciphersuites from RFC 5489 */ |
| 507 | #define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA "ECDHE-PSK-AES128-CBC-SHA" |
| 508 | #define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA "ECDHE-PSK-AES256-CBC-SHA" |
| 509 | |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 510 | /* SRP ciphersuite from RFC 5054 */ |
| 511 | #define TLS1_TXT_SRP_SHA_WITH_3DES_EDE_CBC_SHA "SRP-3DES-EDE-CBC-SHA" |
| 512 | #define TLS1_TXT_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA "SRP-RSA-3DES-EDE-CBC-SHA" |
| 513 | #define TLS1_TXT_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA "SRP-DSS-3DES-EDE-CBC-SHA" |
| 514 | #define TLS1_TXT_SRP_SHA_WITH_AES_128_CBC_SHA "SRP-AES-128-CBC-SHA" |
| 515 | #define TLS1_TXT_SRP_SHA_RSA_WITH_AES_128_CBC_SHA "SRP-RSA-AES-128-CBC-SHA" |
| 516 | #define TLS1_TXT_SRP_SHA_DSS_WITH_AES_128_CBC_SHA "SRP-DSS-AES-128-CBC-SHA" |
| 517 | #define TLS1_TXT_SRP_SHA_WITH_AES_256_CBC_SHA "SRP-AES-256-CBC-SHA" |
| 518 | #define TLS1_TXT_SRP_SHA_RSA_WITH_AES_256_CBC_SHA "SRP-RSA-AES-256-CBC-SHA" |
| 519 | #define TLS1_TXT_SRP_SHA_DSS_WITH_AES_256_CBC_SHA "SRP-DSS-AES-256-CBC-SHA" |
| 520 | |
| 521 | /* Camellia ciphersuites from RFC4132 */ |
| 522 | #define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA "CAMELLIA128-SHA" |
| 523 | #define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA "DH-DSS-CAMELLIA128-SHA" |
| 524 | #define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA "DH-RSA-CAMELLIA128-SHA" |
| 525 | #define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA "DHE-DSS-CAMELLIA128-SHA" |
| 526 | #define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA "DHE-RSA-CAMELLIA128-SHA" |
| 527 | #define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA "ADH-CAMELLIA128-SHA" |
| 528 | |
| 529 | #define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA "CAMELLIA256-SHA" |
| 530 | #define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA "DH-DSS-CAMELLIA256-SHA" |
| 531 | #define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA "DH-RSA-CAMELLIA256-SHA" |
| 532 | #define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA "DHE-DSS-CAMELLIA256-SHA" |
| 533 | #define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA "DHE-RSA-CAMELLIA256-SHA" |
| 534 | #define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA "ADH-CAMELLIA256-SHA" |
| 535 | |
| 536 | /* SEED ciphersuites from RFC4162 */ |
| 537 | #define TLS1_TXT_RSA_WITH_SEED_SHA "SEED-SHA" |
| 538 | #define TLS1_TXT_DH_DSS_WITH_SEED_SHA "DH-DSS-SEED-SHA" |
| 539 | #define TLS1_TXT_DH_RSA_WITH_SEED_SHA "DH-RSA-SEED-SHA" |
| 540 | #define TLS1_TXT_DHE_DSS_WITH_SEED_SHA "DHE-DSS-SEED-SHA" |
| 541 | #define TLS1_TXT_DHE_RSA_WITH_SEED_SHA "DHE-RSA-SEED-SHA" |
| 542 | #define TLS1_TXT_ADH_WITH_SEED_SHA "ADH-SEED-SHA" |
| 543 | |
| 544 | /* TLS v1.2 ciphersuites */ |
| 545 | #define TLS1_TXT_RSA_WITH_NULL_SHA256 "NULL-SHA256" |
| 546 | #define TLS1_TXT_RSA_WITH_AES_128_SHA256 "AES128-SHA256" |
| 547 | #define TLS1_TXT_RSA_WITH_AES_256_SHA256 "AES256-SHA256" |
| 548 | #define TLS1_TXT_DH_DSS_WITH_AES_128_SHA256 "DH-DSS-AES128-SHA256" |
| 549 | #define TLS1_TXT_DH_RSA_WITH_AES_128_SHA256 "DH-RSA-AES128-SHA256" |
| 550 | #define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA256 "DHE-DSS-AES128-SHA256" |
| 551 | #define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA256 "DHE-RSA-AES128-SHA256" |
| 552 | #define TLS1_TXT_DH_DSS_WITH_AES_256_SHA256 "DH-DSS-AES256-SHA256" |
| 553 | #define TLS1_TXT_DH_RSA_WITH_AES_256_SHA256 "DH-RSA-AES256-SHA256" |
| 554 | #define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256 "DHE-DSS-AES256-SHA256" |
| 555 | #define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256 "DHE-RSA-AES256-SHA256" |
| 556 | #define TLS1_TXT_ADH_WITH_AES_128_SHA256 "ADH-AES128-SHA256" |
| 557 | #define TLS1_TXT_ADH_WITH_AES_256_SHA256 "ADH-AES256-SHA256" |
| 558 | |
| 559 | /* TLS v1.2 GCM ciphersuites from RFC5288 */ |
| 560 | #define TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256 "AES128-GCM-SHA256" |
| 561 | #define TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384 "AES256-GCM-SHA384" |
| 562 | #define TLS1_TXT_DHE_RSA_WITH_AES_128_GCM_SHA256 "DHE-RSA-AES128-GCM-SHA256" |
| 563 | #define TLS1_TXT_DHE_RSA_WITH_AES_256_GCM_SHA384 "DHE-RSA-AES256-GCM-SHA384" |
| 564 | #define TLS1_TXT_DH_RSA_WITH_AES_128_GCM_SHA256 "DH-RSA-AES128-GCM-SHA256" |
| 565 | #define TLS1_TXT_DH_RSA_WITH_AES_256_GCM_SHA384 "DH-RSA-AES256-GCM-SHA384" |
| 566 | #define TLS1_TXT_DHE_DSS_WITH_AES_128_GCM_SHA256 "DHE-DSS-AES128-GCM-SHA256" |
| 567 | #define TLS1_TXT_DHE_DSS_WITH_AES_256_GCM_SHA384 "DHE-DSS-AES256-GCM-SHA384" |
| 568 | #define TLS1_TXT_DH_DSS_WITH_AES_128_GCM_SHA256 "DH-DSS-AES128-GCM-SHA256" |
| 569 | #define TLS1_TXT_DH_DSS_WITH_AES_256_GCM_SHA384 "DH-DSS-AES256-GCM-SHA384" |
| 570 | #define TLS1_TXT_ADH_WITH_AES_128_GCM_SHA256 "ADH-AES128-GCM-SHA256" |
| 571 | #define TLS1_TXT_ADH_WITH_AES_256_GCM_SHA384 "ADH-AES256-GCM-SHA384" |
| 572 | |
| 573 | /* ECDH HMAC based ciphersuites from RFC5289 */ |
| 574 | |
| 575 | #define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_SHA256 "ECDHE-ECDSA-AES128-SHA256" |
| 576 | #define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384 "ECDHE-ECDSA-AES256-SHA384" |
| 577 | #define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_SHA256 "ECDH-ECDSA-AES128-SHA256" |
| 578 | #define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_SHA384 "ECDH-ECDSA-AES256-SHA384" |
| 579 | #define TLS1_TXT_ECDHE_RSA_WITH_AES_128_SHA256 "ECDHE-RSA-AES128-SHA256" |
| 580 | #define TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384 "ECDHE-RSA-AES256-SHA384" |
| 581 | #define TLS1_TXT_ECDH_RSA_WITH_AES_128_SHA256 "ECDH-RSA-AES128-SHA256" |
| 582 | #define TLS1_TXT_ECDH_RSA_WITH_AES_256_SHA384 "ECDH-RSA-AES256-SHA384" |
| 583 | |
| 584 | /* ECDH GCM based ciphersuites from RFC5289 */ |
| 585 | #define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 \ |
| 586 | "ECDHE-ECDSA-AES128-GCM-SHA256" |
| 587 | #define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 \ |
| 588 | "ECDHE-ECDSA-AES256-GCM-SHA384" |
| 589 | #define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 \ |
| 590 | "ECDH-ECDSA-AES128-GCM-SHA256" |
| 591 | #define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 \ |
| 592 | "ECDH-ECDSA-AES256-GCM-SHA384" |
| 593 | #define TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256 "ECDHE-RSA-AES128-GCM-SHA256" |
| 594 | #define TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384 "ECDHE-RSA-AES256-GCM-SHA384" |
| 595 | #define TLS1_TXT_ECDH_RSA_WITH_AES_128_GCM_SHA256 "ECDH-RSA-AES128-GCM-SHA256" |
| 596 | #define TLS1_TXT_ECDH_RSA_WITH_AES_256_GCM_SHA384 "ECDH-RSA-AES256-GCM-SHA384" |
| 597 | |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 598 | /* For convenience, the old and new CHACHA20_POLY1305 ciphers have the same |
| 599 | * name. In cipher strings, both will be selected. This is temporary and will be |
| 600 | * removed when the pre-standard construction is removed. */ |
Kenny Root | e99801b | 2015-11-06 15:31:15 -0800 | [diff] [blame] | 601 | #define TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_OLD \ |
| 602 | "ECDHE-RSA-CHACHA20-POLY1305" |
| 603 | #define TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_OLD \ |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 604 | "ECDHE-ECDSA-CHACHA20-POLY1305" |
Kenny Root | e99801b | 2015-11-06 15:31:15 -0800 | [diff] [blame] | 605 | |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 606 | #define TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 \ |
| 607 | "ECDHE-RSA-CHACHA20-POLY1305" |
| 608 | #define TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 \ |
| 609 | "ECDHE-ECDSA-CHACHA20-POLY1305" |
| 610 | #define TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 \ |
| 611 | "ECDHE-PSK-CHACHA20-POLY1305" |
| 612 | |
| 613 | /* TODO(davidben): Remove this. Historically, the TXT names for CHACHA20_POLY1305 |
| 614 | * were missing 'SHA256'. */ |
Kenny Root | e99801b | 2015-11-06 15:31:15 -0800 | [diff] [blame] | 615 | #define TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 \ |
Adam Langley | 4139edb | 2016-01-13 15:00:54 -0800 | [diff] [blame] | 616 | TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 617 | |
David Benjamin | 6e899c7 | 2016-06-09 18:02:18 -0400 | [diff] [blame] | 618 | /* PSK ciphersuites from mattsson-tls-ecdhe-psk-aead */ |
| 619 | #define TLS1_TXT_ECDHE_PSK_WITH_AES_128_GCM_SHA256 "ECDHE-PSK-AES128-GCM-SHA256" |
| 620 | #define TLS1_TXT_ECDHE_PSK_WITH_AES_256_GCM_SHA384 "ECDHE-PSK-AES256-GCM-SHA384" |
| 621 | |
David Benjamin | d316cba | 2016-06-02 16:17:39 -0400 | [diff] [blame] | 622 | /* CECPQ1 ciphersuites. These are specific to BoringSSL and not standard. */ |
| 623 | #define TLS1_TXT_CECPQ1_RSA_WITH_CHACHA20_POLY1305_SHA256 \ |
| 624 | "CECPQ1-RSA-CHACHA20-POLY1305-SHA256" |
| 625 | #define TLS1_TXT_CECPQ1_ECDSA_WITH_CHACHA20_POLY1305_SHA256 \ |
| 626 | "CECPQ1-ECDSA-CHACHA20-POLY1305-SHA256" |
| 627 | #define TLS1_TXT_CECPQ1_RSA_WITH_AES_256_GCM_SHA384 \ |
| 628 | "CECPQ1-RSA-AES256-GCM-SHA384" |
| 629 | #define TLS1_TXT_CECPQ1_ECDSA_WITH_AES_256_GCM_SHA384 \ |
| 630 | "CECPQ1-ECDSA-AES256-GCM-SHA384" |
| 631 | |
| 632 | |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 633 | #define TLS_CT_RSA_SIGN 1 |
| 634 | #define TLS_CT_DSS_SIGN 2 |
| 635 | #define TLS_CT_RSA_FIXED_DH 3 |
| 636 | #define TLS_CT_DSS_FIXED_DH 4 |
| 637 | #define TLS_CT_ECDSA_SIGN 64 |
| 638 | #define TLS_CT_RSA_FIXED_ECDH 65 |
| 639 | #define TLS_CT_ECDSA_FIXED_ECDH 66 |
| 640 | |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 641 | #define TLS_MD_MAX_CONST_SIZE 20 |
| 642 | #define TLS_MD_CLIENT_FINISH_CONST "client finished" |
| 643 | #define TLS_MD_CLIENT_FINISH_CONST_SIZE 15 |
| 644 | #define TLS_MD_SERVER_FINISH_CONST "server finished" |
| 645 | #define TLS_MD_SERVER_FINISH_CONST_SIZE 15 |
| 646 | #define TLS_MD_KEY_EXPANSION_CONST "key expansion" |
| 647 | #define TLS_MD_KEY_EXPANSION_CONST_SIZE 13 |
| 648 | #define TLS_MD_CLIENT_WRITE_KEY_CONST "client write key" |
| 649 | #define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE 16 |
| 650 | #define TLS_MD_SERVER_WRITE_KEY_CONST "server write key" |
| 651 | #define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE 16 |
| 652 | #define TLS_MD_IV_BLOCK_CONST "IV block" |
| 653 | #define TLS_MD_IV_BLOCK_CONST_SIZE 8 |
| 654 | #define TLS_MD_MASTER_SECRET_CONST "master secret" |
| 655 | #define TLS_MD_MASTER_SECRET_CONST_SIZE 13 |
| 656 | #define TLS_MD_EXTENDED_MASTER_SECRET_CONST "extended master secret" |
| 657 | #define TLS_MD_EXTENDED_MASTER_SECRET_CONST_SIZE 22 |
| 658 | |
| 659 | |
| 660 | #ifdef __cplusplus |
Kenny Root | e99801b | 2015-11-06 15:31:15 -0800 | [diff] [blame] | 661 | } /* extern C */ |
Adam Langley | d9e397b | 2015-01-22 14:27:53 -0800 | [diff] [blame] | 662 | #endif |
Kenny Root | e99801b | 2015-11-06 15:31:15 -0800 | [diff] [blame] | 663 | |
| 664 | #endif /* OPENSSL_HEADER_TLS1_H */ |