Hannes Tschofenig
/
aes-gcm-test-program
Example program to test AES-GCM functionality. Used for a workshop
SSL/include/polarssl/ssl_ciphersuites.h@0:796d0f61a05b, 2018-09-27 (annotated)
- Committer:
- HannesTschofenig
- Date:
- Thu Sep 27 06:34:22 2018 +0000
- Revision:
- 0:796d0f61a05b
Example AES-GCM test program
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
HannesTschofenig | 0:796d0f61a05b | 1 | /** |
HannesTschofenig | 0:796d0f61a05b | 2 | * \file ssl_ciphersuites.h |
HannesTschofenig | 0:796d0f61a05b | 3 | * |
HannesTschofenig | 0:796d0f61a05b | 4 | * \brief SSL Ciphersuites for PolarSSL |
HannesTschofenig | 0:796d0f61a05b | 5 | * |
HannesTschofenig | 0:796d0f61a05b | 6 | * Copyright (C) 2006-2013, Brainspark B.V. |
HannesTschofenig | 0:796d0f61a05b | 7 | * |
HannesTschofenig | 0:796d0f61a05b | 8 | * This file is part of PolarSSL (http://www.polarssl.org) |
HannesTschofenig | 0:796d0f61a05b | 9 | * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> |
HannesTschofenig | 0:796d0f61a05b | 10 | * |
HannesTschofenig | 0:796d0f61a05b | 11 | * All rights reserved. |
HannesTschofenig | 0:796d0f61a05b | 12 | * |
HannesTschofenig | 0:796d0f61a05b | 13 | * This program is free software; you can redistribute it and/or modify |
HannesTschofenig | 0:796d0f61a05b | 14 | * it under the terms of the GNU General Public License as published by |
HannesTschofenig | 0:796d0f61a05b | 15 | * the Free Software Foundation; either version 2 of the License, or |
HannesTschofenig | 0:796d0f61a05b | 16 | * (at your option) any later version. |
HannesTschofenig | 0:796d0f61a05b | 17 | * |
HannesTschofenig | 0:796d0f61a05b | 18 | * This program is distributed in the hope that it will be useful, |
HannesTschofenig | 0:796d0f61a05b | 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
HannesTschofenig | 0:796d0f61a05b | 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
HannesTschofenig | 0:796d0f61a05b | 21 | * GNU General Public License for more details. |
HannesTschofenig | 0:796d0f61a05b | 22 | * |
HannesTschofenig | 0:796d0f61a05b | 23 | * You should have received a copy of the GNU General Public License along |
HannesTschofenig | 0:796d0f61a05b | 24 | * with this program; if not, write to the Free Software Foundation, Inc., |
HannesTschofenig | 0:796d0f61a05b | 25 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
HannesTschofenig | 0:796d0f61a05b | 26 | */ |
HannesTschofenig | 0:796d0f61a05b | 27 | #ifndef POLARSSL_SSL_CIPHERSUITES_H |
HannesTschofenig | 0:796d0f61a05b | 28 | #define POLARSSL_SSL_CIPHERSUITES_H |
HannesTschofenig | 0:796d0f61a05b | 29 | |
HannesTschofenig | 0:796d0f61a05b | 30 | #include "pk.h" |
HannesTschofenig | 0:796d0f61a05b | 31 | #include "cipher.h" |
HannesTschofenig | 0:796d0f61a05b | 32 | #include "md.h" |
HannesTschofenig | 0:796d0f61a05b | 33 | |
HannesTschofenig | 0:796d0f61a05b | 34 | #ifdef __cplusplus |
HannesTschofenig | 0:796d0f61a05b | 35 | extern "C" { |
HannesTschofenig | 0:796d0f61a05b | 36 | #endif |
HannesTschofenig | 0:796d0f61a05b | 37 | |
HannesTschofenig | 0:796d0f61a05b | 38 | /* |
HannesTschofenig | 0:796d0f61a05b | 39 | * Supported ciphersuites (Official IANA names) |
HannesTschofenig | 0:796d0f61a05b | 40 | */ |
HannesTschofenig | 0:796d0f61a05b | 41 | #define TLS_RSA_WITH_NULL_MD5 0x01 /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 42 | #define TLS_RSA_WITH_NULL_SHA 0x02 /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 43 | |
HannesTschofenig | 0:796d0f61a05b | 44 | #define TLS_RSA_WITH_RC4_128_MD5 0x04 |
HannesTschofenig | 0:796d0f61a05b | 45 | #define TLS_RSA_WITH_RC4_128_SHA 0x05 |
HannesTschofenig | 0:796d0f61a05b | 46 | #define TLS_RSA_WITH_DES_CBC_SHA 0x09 /**< Weak! Not in TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 47 | |
HannesTschofenig | 0:796d0f61a05b | 48 | #define TLS_RSA_WITH_3DES_EDE_CBC_SHA 0x0A |
HannesTschofenig | 0:796d0f61a05b | 49 | |
HannesTschofenig | 0:796d0f61a05b | 50 | #define TLS_DHE_RSA_WITH_DES_CBC_SHA 0x15 /**< Weak! Not in TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 51 | #define TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA 0x16 |
HannesTschofenig | 0:796d0f61a05b | 52 | |
HannesTschofenig | 0:796d0f61a05b | 53 | #define TLS_PSK_WITH_NULL_SHA 0x2C /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 54 | #define TLS_DHE_PSK_WITH_NULL_SHA 0x2D /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 55 | #define TLS_RSA_PSK_WITH_NULL_SHA 0x2E /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 56 | #define TLS_RSA_WITH_AES_128_CBC_SHA 0x2F |
HannesTschofenig | 0:796d0f61a05b | 57 | |
HannesTschofenig | 0:796d0f61a05b | 58 | #define TLS_DHE_RSA_WITH_AES_128_CBC_SHA 0x33 |
HannesTschofenig | 0:796d0f61a05b | 59 | #define TLS_RSA_WITH_AES_256_CBC_SHA 0x35 |
HannesTschofenig | 0:796d0f61a05b | 60 | #define TLS_DHE_RSA_WITH_AES_256_CBC_SHA 0x39 |
HannesTschofenig | 0:796d0f61a05b | 61 | |
HannesTschofenig | 0:796d0f61a05b | 62 | #define TLS_RSA_WITH_NULL_SHA256 0x3B /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 63 | #define TLS_RSA_WITH_AES_128_CBC_SHA256 0x3C /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 64 | #define TLS_RSA_WITH_AES_256_CBC_SHA256 0x3D /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 65 | |
HannesTschofenig | 0:796d0f61a05b | 66 | #define TLS_RSA_WITH_CAMELLIA_128_CBC_SHA 0x41 |
HannesTschofenig | 0:796d0f61a05b | 67 | #define TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA 0x45 |
HannesTschofenig | 0:796d0f61a05b | 68 | |
HannesTschofenig | 0:796d0f61a05b | 69 | #define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 0x67 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 70 | #define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 0x6B /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 71 | |
HannesTschofenig | 0:796d0f61a05b | 72 | #define TLS_RSA_WITH_CAMELLIA_256_CBC_SHA 0x84 |
HannesTschofenig | 0:796d0f61a05b | 73 | #define TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA 0x88 |
HannesTschofenig | 0:796d0f61a05b | 74 | |
HannesTschofenig | 0:796d0f61a05b | 75 | #define TLS_PSK_WITH_RC4_128_SHA 0x8A |
HannesTschofenig | 0:796d0f61a05b | 76 | #define TLS_PSK_WITH_3DES_EDE_CBC_SHA 0x8B |
HannesTschofenig | 0:796d0f61a05b | 77 | #define TLS_PSK_WITH_AES_128_CBC_SHA 0x8C |
HannesTschofenig | 0:796d0f61a05b | 78 | #define TLS_PSK_WITH_AES_256_CBC_SHA 0x8D |
HannesTschofenig | 0:796d0f61a05b | 79 | |
HannesTschofenig | 0:796d0f61a05b | 80 | #define TLS_DHE_PSK_WITH_RC4_128_SHA 0x8E |
HannesTschofenig | 0:796d0f61a05b | 81 | #define TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA 0x8F |
HannesTschofenig | 0:796d0f61a05b | 82 | #define TLS_DHE_PSK_WITH_AES_128_CBC_SHA 0x90 |
HannesTschofenig | 0:796d0f61a05b | 83 | #define TLS_DHE_PSK_WITH_AES_256_CBC_SHA 0x91 |
HannesTschofenig | 0:796d0f61a05b | 84 | |
HannesTschofenig | 0:796d0f61a05b | 85 | #define TLS_RSA_PSK_WITH_RC4_128_SHA 0x92 |
HannesTschofenig | 0:796d0f61a05b | 86 | #define TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA 0x93 |
HannesTschofenig | 0:796d0f61a05b | 87 | #define TLS_RSA_PSK_WITH_AES_128_CBC_SHA 0x94 |
HannesTschofenig | 0:796d0f61a05b | 88 | #define TLS_RSA_PSK_WITH_AES_256_CBC_SHA 0x95 |
HannesTschofenig | 0:796d0f61a05b | 89 | |
HannesTschofenig | 0:796d0f61a05b | 90 | #define TLS_RSA_WITH_AES_128_GCM_SHA256 0x9C /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 91 | #define TLS_RSA_WITH_AES_256_GCM_SHA384 0x9D /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 92 | #define TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 0x9E /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 93 | #define TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 0x9F /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 94 | |
HannesTschofenig | 0:796d0f61a05b | 95 | #define TLS_PSK_WITH_AES_128_GCM_SHA256 0xA8 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 96 | #define TLS_PSK_WITH_AES_256_GCM_SHA384 0xA9 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 97 | #define TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 0xAA /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 98 | #define TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 0xAB /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 99 | #define TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 0xAC /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 100 | #define TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 0xAD /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 101 | |
HannesTschofenig | 0:796d0f61a05b | 102 | #define TLS_PSK_WITH_AES_128_CBC_SHA256 0xAE |
HannesTschofenig | 0:796d0f61a05b | 103 | #define TLS_PSK_WITH_AES_256_CBC_SHA384 0xAF |
HannesTschofenig | 0:796d0f61a05b | 104 | #define TLS_PSK_WITH_NULL_SHA256 0xB0 /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 105 | #define TLS_PSK_WITH_NULL_SHA384 0xB1 /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 106 | |
HannesTschofenig | 0:796d0f61a05b | 107 | #define TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 0xB2 |
HannesTschofenig | 0:796d0f61a05b | 108 | #define TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 0xB3 |
HannesTschofenig | 0:796d0f61a05b | 109 | #define TLS_DHE_PSK_WITH_NULL_SHA256 0xB4 /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 110 | #define TLS_DHE_PSK_WITH_NULL_SHA384 0xB5 /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 111 | |
HannesTschofenig | 0:796d0f61a05b | 112 | #define TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 0xB6 |
HannesTschofenig | 0:796d0f61a05b | 113 | #define TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 0xB7 |
HannesTschofenig | 0:796d0f61a05b | 114 | #define TLS_RSA_PSK_WITH_NULL_SHA256 0xB8 /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 115 | #define TLS_RSA_PSK_WITH_NULL_SHA384 0xB9 /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 116 | |
HannesTschofenig | 0:796d0f61a05b | 117 | #define TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 0xBA /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 118 | #define TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0xBE /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 119 | |
HannesTschofenig | 0:796d0f61a05b | 120 | #define TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 0xC0 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 121 | #define TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 0xC4 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 122 | |
HannesTschofenig | 0:796d0f61a05b | 123 | #define TLS_ECDH_ECDSA_WITH_NULL_SHA 0xC001 /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 124 | #define TLS_ECDH_ECDSA_WITH_RC4_128_SHA 0xC002 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 125 | #define TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 0xC003 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 126 | #define TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0xC004 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 127 | #define TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0xC005 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 128 | |
HannesTschofenig | 0:796d0f61a05b | 129 | #define TLS_ECDHE_ECDSA_WITH_NULL_SHA 0xC006 /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 130 | #define TLS_ECDHE_ECDSA_WITH_RC4_128_SHA 0xC007 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 131 | #define TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA 0xC008 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 132 | #define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0xC009 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 133 | #define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0xC00A /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 134 | |
HannesTschofenig | 0:796d0f61a05b | 135 | #define TLS_ECDH_RSA_WITH_NULL_SHA 0xC00B /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 136 | #define TLS_ECDH_RSA_WITH_RC4_128_SHA 0xC00C /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 137 | #define TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA 0xC00D /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 138 | #define TLS_ECDH_RSA_WITH_AES_128_CBC_SHA 0xC00E /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 139 | #define TLS_ECDH_RSA_WITH_AES_256_CBC_SHA 0xC00F /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 140 | |
HannesTschofenig | 0:796d0f61a05b | 141 | #define TLS_ECDHE_RSA_WITH_NULL_SHA 0xC010 /**< Weak! */ |
HannesTschofenig | 0:796d0f61a05b | 142 | #define TLS_ECDHE_RSA_WITH_RC4_128_SHA 0xC011 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 143 | #define TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 0xC012 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 144 | #define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 0xC013 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 145 | #define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 0xC014 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 146 | |
HannesTschofenig | 0:796d0f61a05b | 147 | #define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 0xC023 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 148 | #define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 0xC024 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 149 | #define TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 0xC025 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 150 | #define TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 0xC026 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 151 | #define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 0xC027 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 152 | #define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 0xC028 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 153 | #define TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 0xC029 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 154 | #define TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 0xC02A /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 155 | |
HannesTschofenig | 0:796d0f61a05b | 156 | #define TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0xC02B /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 157 | #define TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0xC02C /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 158 | #define TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 0xC02D /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 159 | #define TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 0xC02E /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 160 | #define TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0xC02F /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 161 | #define TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0xC030 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 162 | #define TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 0xC031 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 163 | #define TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 0xC032 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 164 | |
HannesTschofenig | 0:796d0f61a05b | 165 | #define TLS_ECDHE_PSK_WITH_RC4_128_SHA 0xC033 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 166 | #define TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA 0xC034 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 167 | #define TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA 0xC035 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 168 | #define TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA 0xC036 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 169 | #define TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 0xC037 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 170 | #define TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 0xC038 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 171 | #define TLS_ECDHE_PSK_WITH_NULL_SHA 0xC039 /**< Weak! No SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 172 | #define TLS_ECDHE_PSK_WITH_NULL_SHA256 0xC03A /**< Weak! No SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 173 | #define TLS_ECDHE_PSK_WITH_NULL_SHA384 0xC03B /**< Weak! No SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 174 | |
HannesTschofenig | 0:796d0f61a05b | 175 | #define TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0xC072 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 176 | #define TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0xC073 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 177 | #define TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0xC074 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 178 | #define TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0xC075 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 179 | #define TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0xC076 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 180 | #define TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 0xC077 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 181 | #define TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 0xC078 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 182 | #define TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 0xC079 /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 183 | |
HannesTschofenig | 0:796d0f61a05b | 184 | #define TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 0xC07A /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 185 | #define TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 0xC07B /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 186 | #define TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 0xC07C /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 187 | #define TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 0xC07D /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 188 | #define TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 0xC086 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 189 | #define TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 0xC087 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 190 | #define TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 0xC088 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 191 | #define TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 0xC089 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 192 | #define TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 0xC08A /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 193 | #define TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 0xC08B /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 194 | #define TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 0xC08C /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 195 | #define TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 0xC08D /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 196 | |
HannesTschofenig | 0:796d0f61a05b | 197 | #define TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 0xC08E /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 198 | #define TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 0xC08F /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 199 | #define TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 0xC090 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 200 | #define TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 0xC091 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 201 | #define TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 0xC092 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 202 | #define TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 0xC093 /**< TLS 1.2 */ |
HannesTschofenig | 0:796d0f61a05b | 203 | |
HannesTschofenig | 0:796d0f61a05b | 204 | #define TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 0xC094 |
HannesTschofenig | 0:796d0f61a05b | 205 | #define TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 0xC095 |
HannesTschofenig | 0:796d0f61a05b | 206 | #define TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0xC096 |
HannesTschofenig | 0:796d0f61a05b | 207 | #define TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0xC097 |
HannesTschofenig | 0:796d0f61a05b | 208 | #define TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 0xC098 |
HannesTschofenig | 0:796d0f61a05b | 209 | #define TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 0xC099 |
HannesTschofenig | 0:796d0f61a05b | 210 | #define TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0xC09A /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 211 | #define TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0xC09B /**< Not in SSL3! */ |
HannesTschofenig | 0:796d0f61a05b | 212 | |
HannesTschofenig | 0:796d0f61a05b | 213 | typedef enum { |
HannesTschofenig | 0:796d0f61a05b | 214 | POLARSSL_KEY_EXCHANGE_NONE = 0, |
HannesTschofenig | 0:796d0f61a05b | 215 | POLARSSL_KEY_EXCHANGE_RSA, |
HannesTschofenig | 0:796d0f61a05b | 216 | POLARSSL_KEY_EXCHANGE_DHE_RSA, |
HannesTschofenig | 0:796d0f61a05b | 217 | POLARSSL_KEY_EXCHANGE_ECDHE_RSA, |
HannesTschofenig | 0:796d0f61a05b | 218 | POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, |
HannesTschofenig | 0:796d0f61a05b | 219 | POLARSSL_KEY_EXCHANGE_PSK, |
HannesTschofenig | 0:796d0f61a05b | 220 | POLARSSL_KEY_EXCHANGE_DHE_PSK, |
HannesTschofenig | 0:796d0f61a05b | 221 | POLARSSL_KEY_EXCHANGE_RSA_PSK, |
HannesTschofenig | 0:796d0f61a05b | 222 | POLARSSL_KEY_EXCHANGE_ECDHE_PSK, |
HannesTschofenig | 0:796d0f61a05b | 223 | POLARSSL_KEY_EXCHANGE_ECDH_RSA, |
HannesTschofenig | 0:796d0f61a05b | 224 | POLARSSL_KEY_EXCHANGE_ECDH_ECDSA, |
HannesTschofenig | 0:796d0f61a05b | 225 | } key_exchange_type_t; |
HannesTschofenig | 0:796d0f61a05b | 226 | |
HannesTschofenig | 0:796d0f61a05b | 227 | typedef struct _ssl_ciphersuite_t ssl_ciphersuite_t; |
HannesTschofenig | 0:796d0f61a05b | 228 | |
HannesTschofenig | 0:796d0f61a05b | 229 | #define POLARSSL_CIPHERSUITE_WEAK 0x01 /**< Weak ciphersuite flag */ |
HannesTschofenig | 0:796d0f61a05b | 230 | |
HannesTschofenig | 0:796d0f61a05b | 231 | /** |
HannesTschofenig | 0:796d0f61a05b | 232 | * \brief This structure is used for storing ciphersuite information |
HannesTschofenig | 0:796d0f61a05b | 233 | */ |
HannesTschofenig | 0:796d0f61a05b | 234 | struct _ssl_ciphersuite_t |
HannesTschofenig | 0:796d0f61a05b | 235 | { |
HannesTschofenig | 0:796d0f61a05b | 236 | int id; |
HannesTschofenig | 0:796d0f61a05b | 237 | const char * name; |
HannesTschofenig | 0:796d0f61a05b | 238 | |
HannesTschofenig | 0:796d0f61a05b | 239 | cipher_type_t cipher; |
HannesTschofenig | 0:796d0f61a05b | 240 | md_type_t mac; |
HannesTschofenig | 0:796d0f61a05b | 241 | key_exchange_type_t key_exchange; |
HannesTschofenig | 0:796d0f61a05b | 242 | |
HannesTschofenig | 0:796d0f61a05b | 243 | int min_major_ver; |
HannesTschofenig | 0:796d0f61a05b | 244 | int min_minor_ver; |
HannesTschofenig | 0:796d0f61a05b | 245 | int max_major_ver; |
HannesTschofenig | 0:796d0f61a05b | 246 | int max_minor_ver; |
HannesTschofenig | 0:796d0f61a05b | 247 | |
HannesTschofenig | 0:796d0f61a05b | 248 | unsigned char flags; |
HannesTschofenig | 0:796d0f61a05b | 249 | }; |
HannesTschofenig | 0:796d0f61a05b | 250 | |
HannesTschofenig | 0:796d0f61a05b | 251 | const int *ssl_list_ciphersuites( void ); |
HannesTschofenig | 0:796d0f61a05b | 252 | |
HannesTschofenig | 0:796d0f61a05b | 253 | const ssl_ciphersuite_t *ssl_ciphersuite_from_string( const char *ciphersuite_name ); |
HannesTschofenig | 0:796d0f61a05b | 254 | const ssl_ciphersuite_t *ssl_ciphersuite_from_id( int ciphersuite_id ); |
HannesTschofenig | 0:796d0f61a05b | 255 | |
HannesTschofenig | 0:796d0f61a05b | 256 | #if defined(POLARSSL_PK_C) |
HannesTschofenig | 0:796d0f61a05b | 257 | pk_type_t ssl_get_ciphersuite_sig_pk_alg( const ssl_ciphersuite_t *info ); |
HannesTschofenig | 0:796d0f61a05b | 258 | #endif |
HannesTschofenig | 0:796d0f61a05b | 259 | |
HannesTschofenig | 0:796d0f61a05b | 260 | int ssl_ciphersuite_uses_ec( const ssl_ciphersuite_t *info ); |
HannesTschofenig | 0:796d0f61a05b | 261 | int ssl_ciphersuite_uses_psk( const ssl_ciphersuite_t *info ); |
HannesTschofenig | 0:796d0f61a05b | 262 | |
HannesTschofenig | 0:796d0f61a05b | 263 | #ifdef __cplusplus |
HannesTschofenig | 0:796d0f61a05b | 264 | } |
HannesTschofenig | 0:796d0f61a05b | 265 | #endif |
HannesTschofenig | 0:796d0f61a05b | 266 | |
HannesTschofenig | 0:796d0f61a05b | 267 | #endif /* ssl_ciphersuites.h */ |
HannesTschofenig | 0:796d0f61a05b | 268 | |
HannesTschofenig | 0:796d0f61a05b | 269 |