wolfSSL 3.11.1 for TLS1.3 beta

Fork of wolfSSL by wolf SSL

Committer:
wolfSSL
Date:
Thu Apr 28 00:56:55 2016 +0000
Revision:
3:6f956bdb3073
wolfSSL 3.9.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wolfSSL 3:6f956bdb3073 1 /* evp.h
wolfSSL 3:6f956bdb3073 2 *
wolfSSL 3:6f956bdb3073 3 * Copyright (C) 2006-2016 wolfSSL Inc.
wolfSSL 3:6f956bdb3073 4 *
wolfSSL 3:6f956bdb3073 5 * This file is part of wolfSSL.
wolfSSL 3:6f956bdb3073 6 *
wolfSSL 3:6f956bdb3073 7 * wolfSSL is free software; you can redistribute it and/or modify
wolfSSL 3:6f956bdb3073 8 * it under the terms of the GNU General Public License as published by
wolfSSL 3:6f956bdb3073 9 * the Free Software Foundation; either version 2 of the License, or
wolfSSL 3:6f956bdb3073 10 * (at your option) any later version.
wolfSSL 3:6f956bdb3073 11 *
wolfSSL 3:6f956bdb3073 12 * wolfSSL is distributed in the hope that it will be useful,
wolfSSL 3:6f956bdb3073 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
wolfSSL 3:6f956bdb3073 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
wolfSSL 3:6f956bdb3073 15 * GNU General Public License for more details.
wolfSSL 3:6f956bdb3073 16 *
wolfSSL 3:6f956bdb3073 17 * You should have received a copy of the GNU General Public License
wolfSSL 3:6f956bdb3073 18 * along with this program; if not, write to the Free Software
wolfSSL 3:6f956bdb3073 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
wolfSSL 3:6f956bdb3073 20 */
wolfSSL 3:6f956bdb3073 21
wolfSSL 3:6f956bdb3073 22
wolfSSL 3:6f956bdb3073 23
wolfSSL 3:6f956bdb3073 24 /* evp.h defines mini evp openssl compatibility layer
wolfSSL 3:6f956bdb3073 25 *
wolfSSL 3:6f956bdb3073 26 */
wolfSSL 3:6f956bdb3073 27
wolfSSL 3:6f956bdb3073 28
wolfSSL 3:6f956bdb3073 29 #ifndef WOLFSSL_EVP_H_
wolfSSL 3:6f956bdb3073 30 #define WOLFSSL_EVP_H_
wolfSSL 3:6f956bdb3073 31
wolfSSL 3:6f956bdb3073 32 #include <wolfssl/wolfcrypt/settings.h>
wolfSSL 3:6f956bdb3073 33
wolfSSL 3:6f956bdb3073 34 #ifdef WOLFSSL_PREFIX
wolfSSL 3:6f956bdb3073 35 #include "prefix_evp.h"
wolfSSL 3:6f956bdb3073 36 #endif
wolfSSL 3:6f956bdb3073 37
wolfSSL 3:6f956bdb3073 38 #ifndef NO_MD5
wolfSSL 3:6f956bdb3073 39 #include <wolfssl/openssl/md5.h>
wolfSSL 3:6f956bdb3073 40 #endif
wolfSSL 3:6f956bdb3073 41 #include <wolfssl/openssl/sha.h>
wolfSSL 3:6f956bdb3073 42 #include <wolfssl/openssl/ripemd.h>
wolfSSL 3:6f956bdb3073 43 #include <wolfssl/openssl/rsa.h>
wolfSSL 3:6f956bdb3073 44 #include <wolfssl/openssl/dsa.h>
wolfSSL 3:6f956bdb3073 45 #include <wolfssl/openssl/ec.h>
wolfSSL 3:6f956bdb3073 46
wolfSSL 3:6f956bdb3073 47 #include <wolfssl/wolfcrypt/aes.h>
wolfSSL 3:6f956bdb3073 48 #include <wolfssl/wolfcrypt/des3.h>
wolfSSL 3:6f956bdb3073 49 #include <wolfssl/wolfcrypt/arc4.h>
wolfSSL 3:6f956bdb3073 50
wolfSSL 3:6f956bdb3073 51
wolfSSL 3:6f956bdb3073 52 #ifdef __cplusplus
wolfSSL 3:6f956bdb3073 53 extern "C" {
wolfSSL 3:6f956bdb3073 54 #endif
wolfSSL 3:6f956bdb3073 55
wolfSSL 3:6f956bdb3073 56 typedef char WOLFSSL_EVP_MD;
wolfSSL 3:6f956bdb3073 57 typedef char WOLFSSL_EVP_CIPHER;
wolfSSL 3:6f956bdb3073 58
wolfSSL 3:6f956bdb3073 59 #ifndef NO_MD5
wolfSSL 3:6f956bdb3073 60 WOLFSSL_API const WOLFSSL_EVP_MD* wolfSSL_EVP_md5(void);
wolfSSL 3:6f956bdb3073 61 #endif
wolfSSL 3:6f956bdb3073 62 WOLFSSL_API const WOLFSSL_EVP_MD* wolfSSL_EVP_sha1(void);
wolfSSL 3:6f956bdb3073 63 WOLFSSL_API const WOLFSSL_EVP_MD* wolfSSL_EVP_sha256(void);
wolfSSL 3:6f956bdb3073 64 WOLFSSL_API const WOLFSSL_EVP_MD* wolfSSL_EVP_sha384(void);
wolfSSL 3:6f956bdb3073 65 WOLFSSL_API const WOLFSSL_EVP_MD* wolfSSL_EVP_sha512(void);
wolfSSL 3:6f956bdb3073 66 WOLFSSL_API const WOLFSSL_EVP_MD* wolfSSL_EVP_ripemd160(void);
wolfSSL 3:6f956bdb3073 67
wolfSSL 3:6f956bdb3073 68 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_128_cbc(void);
wolfSSL 3:6f956bdb3073 69 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_192_cbc(void);
wolfSSL 3:6f956bdb3073 70 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_256_cbc(void);
wolfSSL 3:6f956bdb3073 71 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_128_ctr(void);
wolfSSL 3:6f956bdb3073 72 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_192_ctr(void);
wolfSSL 3:6f956bdb3073 73 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_aes_256_ctr(void);
wolfSSL 3:6f956bdb3073 74 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_des_cbc(void);
wolfSSL 3:6f956bdb3073 75 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_des_ede3_cbc(void);
wolfSSL 3:6f956bdb3073 76 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_rc4(void);
wolfSSL 3:6f956bdb3073 77 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_idea_cbc(void);
wolfSSL 3:6f956bdb3073 78 WOLFSSL_API const WOLFSSL_EVP_CIPHER* wolfSSL_EVP_enc_null(void);
wolfSSL 3:6f956bdb3073 79
wolfSSL 3:6f956bdb3073 80
wolfSSL 3:6f956bdb3073 81 typedef union {
wolfSSL 3:6f956bdb3073 82 #ifndef NO_MD5
wolfSSL 3:6f956bdb3073 83 WOLFSSL_MD5_CTX md5;
wolfSSL 3:6f956bdb3073 84 #endif
wolfSSL 3:6f956bdb3073 85 WOLFSSL_SHA_CTX sha;
wolfSSL 3:6f956bdb3073 86 WOLFSSL_SHA256_CTX sha256;
wolfSSL 3:6f956bdb3073 87 #ifdef WOLFSSL_SHA384
wolfSSL 3:6f956bdb3073 88 WOLFSSL_SHA384_CTX sha384;
wolfSSL 3:6f956bdb3073 89 #endif
wolfSSL 3:6f956bdb3073 90 #ifdef WOLFSSL_SHA512
wolfSSL 3:6f956bdb3073 91 WOLFSSL_SHA512_CTX sha512;
wolfSSL 3:6f956bdb3073 92 #endif
wolfSSL 3:6f956bdb3073 93 #ifdef WOLFSSL_RIPEMD
wolfSSL 3:6f956bdb3073 94 WOLFSSL_RIPEMD_CTX ripemd;
wolfSSL 3:6f956bdb3073 95 #endif
wolfSSL 3:6f956bdb3073 96 } WOLFSSL_Hasher;
wolfSSL 3:6f956bdb3073 97
wolfSSL 3:6f956bdb3073 98
wolfSSL 3:6f956bdb3073 99 typedef struct WOLFSSL_EVP_MD_CTX {
wolfSSL 3:6f956bdb3073 100 unsigned char macType;
wolfSSL 3:6f956bdb3073 101 WOLFSSL_Hasher hash;
wolfSSL 3:6f956bdb3073 102 } WOLFSSL_EVP_MD_CTX;
wolfSSL 3:6f956bdb3073 103
wolfSSL 3:6f956bdb3073 104
wolfSSL 3:6f956bdb3073 105 typedef union {
wolfSSL 3:6f956bdb3073 106 #ifndef NO_AES
wolfSSL 3:6f956bdb3073 107 Aes aes;
wolfSSL 3:6f956bdb3073 108 #endif
wolfSSL 3:6f956bdb3073 109 #ifndef NO_DES3
wolfSSL 3:6f956bdb3073 110 Des des;
wolfSSL 3:6f956bdb3073 111 Des3 des3;
wolfSSL 3:6f956bdb3073 112 #endif
wolfSSL 3:6f956bdb3073 113 Arc4 arc4;
wolfSSL 3:6f956bdb3073 114 #ifdef HAVE_IDEA
wolfSSL 3:6f956bdb3073 115 Idea idea;
wolfSSL 3:6f956bdb3073 116 #endif
wolfSSL 3:6f956bdb3073 117 } WOLFSSL_Cipher;
wolfSSL 3:6f956bdb3073 118
wolfSSL 3:6f956bdb3073 119
wolfSSL 3:6f956bdb3073 120 enum {
wolfSSL 3:6f956bdb3073 121 AES_128_CBC_TYPE = 1,
wolfSSL 3:6f956bdb3073 122 AES_192_CBC_TYPE = 2,
wolfSSL 3:6f956bdb3073 123 AES_256_CBC_TYPE = 3,
wolfSSL 3:6f956bdb3073 124 AES_128_CTR_TYPE = 4,
wolfSSL 3:6f956bdb3073 125 AES_192_CTR_TYPE = 5,
wolfSSL 3:6f956bdb3073 126 AES_256_CTR_TYPE = 6,
wolfSSL 3:6f956bdb3073 127 DES_CBC_TYPE = 7,
wolfSSL 3:6f956bdb3073 128 DES_EDE3_CBC_TYPE = 8,
wolfSSL 3:6f956bdb3073 129 ARC4_TYPE = 9,
wolfSSL 3:6f956bdb3073 130 NULL_CIPHER_TYPE = 10,
wolfSSL 3:6f956bdb3073 131 EVP_PKEY_RSA = 11,
wolfSSL 3:6f956bdb3073 132 EVP_PKEY_DSA = 12,
wolfSSL 3:6f956bdb3073 133 EVP_PKEY_EC = 13,
wolfSSL 3:6f956bdb3073 134 IDEA_CBC_TYPE = 14,
wolfSSL 3:6f956bdb3073 135 NID_sha1 = 64,
wolfSSL 3:6f956bdb3073 136 NID_md2 = 3,
wolfSSL 3:6f956bdb3073 137 NID_md5 = 4
wolfSSL 3:6f956bdb3073 138 };
wolfSSL 3:6f956bdb3073 139
wolfSSL 3:6f956bdb3073 140
wolfSSL 3:6f956bdb3073 141 typedef struct WOLFSSL_EVP_CIPHER_CTX {
wolfSSL 3:6f956bdb3073 142 int keyLen; /* user may set for variable */
wolfSSL 3:6f956bdb3073 143 unsigned char enc; /* if encrypt side, then true */
wolfSSL 3:6f956bdb3073 144 unsigned char cipherType;
wolfSSL 3:6f956bdb3073 145 #ifndef NO_AES
wolfSSL 3:6f956bdb3073 146 unsigned char iv[AES_BLOCK_SIZE]; /* working iv pointer into cipher */
wolfSSL 3:6f956bdb3073 147 #elif !defined(NO_DES3)
wolfSSL 3:6f956bdb3073 148 unsigned char iv[DES_BLOCK_SIZE]; /* working iv pointer into cipher */
wolfSSL 3:6f956bdb3073 149 #endif
wolfSSL 3:6f956bdb3073 150 WOLFSSL_Cipher cipher;
wolfSSL 3:6f956bdb3073 151 } WOLFSSL_EVP_CIPHER_CTX;
wolfSSL 3:6f956bdb3073 152
wolfSSL 3:6f956bdb3073 153
wolfSSL 3:6f956bdb3073 154 WOLFSSL_API int wolfSSL_EVP_MD_size(const WOLFSSL_EVP_MD* md);
wolfSSL 3:6f956bdb3073 155 WOLFSSL_API void wolfSSL_EVP_MD_CTX_init(WOLFSSL_EVP_MD_CTX* ctx);
wolfSSL 3:6f956bdb3073 156 WOLFSSL_API int wolfSSL_EVP_MD_CTX_cleanup(WOLFSSL_EVP_MD_CTX* ctx);
wolfSSL 3:6f956bdb3073 157
wolfSSL 3:6f956bdb3073 158 WOLFSSL_API int wolfSSL_EVP_DigestInit(WOLFSSL_EVP_MD_CTX* ctx,
wolfSSL 3:6f956bdb3073 159 const WOLFSSL_EVP_MD* type);
wolfSSL 3:6f956bdb3073 160 WOLFSSL_API int wolfSSL_EVP_DigestUpdate(WOLFSSL_EVP_MD_CTX* ctx, const void* data,
wolfSSL 3:6f956bdb3073 161 unsigned long sz);
wolfSSL 3:6f956bdb3073 162 WOLFSSL_API int wolfSSL_EVP_DigestFinal(WOLFSSL_EVP_MD_CTX* ctx, unsigned char* md,
wolfSSL 3:6f956bdb3073 163 unsigned int* s);
wolfSSL 3:6f956bdb3073 164 WOLFSSL_API int wolfSSL_EVP_DigestFinal_ex(WOLFSSL_EVP_MD_CTX* ctx,
wolfSSL 3:6f956bdb3073 165 unsigned char* md, unsigned int* s);
wolfSSL 3:6f956bdb3073 166 #ifndef NO_MD5
wolfSSL 3:6f956bdb3073 167 WOLFSSL_API int wolfSSL_EVP_BytesToKey(const WOLFSSL_EVP_CIPHER*,
wolfSSL 3:6f956bdb3073 168 const WOLFSSL_EVP_MD*, const unsigned char*,
wolfSSL 3:6f956bdb3073 169 const unsigned char*, int, int, unsigned char*,
wolfSSL 3:6f956bdb3073 170 unsigned char*);
wolfSSL 3:6f956bdb3073 171 #endif
wolfSSL 3:6f956bdb3073 172
wolfSSL 3:6f956bdb3073 173 WOLFSSL_API void wolfSSL_EVP_CIPHER_CTX_init(WOLFSSL_EVP_CIPHER_CTX* ctx);
wolfSSL 3:6f956bdb3073 174 WOLFSSL_API int wolfSSL_EVP_CIPHER_CTX_cleanup(WOLFSSL_EVP_CIPHER_CTX* ctx);
wolfSSL 3:6f956bdb3073 175
wolfSSL 3:6f956bdb3073 176 WOLFSSL_API int wolfSSL_EVP_CIPHER_CTX_iv_length(const WOLFSSL_EVP_CIPHER_CTX*);
wolfSSL 3:6f956bdb3073 177
wolfSSL 3:6f956bdb3073 178
wolfSSL 3:6f956bdb3073 179 WOLFSSL_API int wolfSSL_EVP_CipherInit(WOLFSSL_EVP_CIPHER_CTX* ctx,
wolfSSL 3:6f956bdb3073 180 const WOLFSSL_EVP_CIPHER* type,
wolfSSL 3:6f956bdb3073 181 unsigned char* key, unsigned char* iv,
wolfSSL 3:6f956bdb3073 182 int enc);
wolfSSL 3:6f956bdb3073 183 WOLFSSL_API int wolfSSL_EVP_CIPHER_CTX_key_length(WOLFSSL_EVP_CIPHER_CTX* ctx);
wolfSSL 3:6f956bdb3073 184 WOLFSSL_API int wolfSSL_EVP_CIPHER_CTX_set_key_length(WOLFSSL_EVP_CIPHER_CTX* ctx,
wolfSSL 3:6f956bdb3073 185 int keylen);
wolfSSL 3:6f956bdb3073 186 WOLFSSL_API int wolfSSL_EVP_Cipher(WOLFSSL_EVP_CIPHER_CTX* ctx,
wolfSSL 3:6f956bdb3073 187 unsigned char* dst, unsigned char* src,
wolfSSL 3:6f956bdb3073 188 unsigned int len);
wolfSSL 3:6f956bdb3073 189
wolfSSL 3:6f956bdb3073 190 WOLFSSL_API const WOLFSSL_EVP_MD* wolfSSL_EVP_get_digestbynid(int);
wolfSSL 3:6f956bdb3073 191
wolfSSL 3:6f956bdb3073 192 WOLFSSL_API WOLFSSL_RSA* wolfSSL_EVP_PKEY_get1_RSA(WOLFSSL_EVP_PKEY*);
wolfSSL 3:6f956bdb3073 193 WOLFSSL_API WOLFSSL_DSA* wolfSSL_EVP_PKEY_get1_DSA(WOLFSSL_EVP_PKEY*);
wolfSSL 3:6f956bdb3073 194 WOLFSSL_API WOLFSSL_EC_KEY *wolfSSL_EVP_PKEY_get1_EC_KEY(WOLFSSL_EVP_PKEY *key);
wolfSSL 3:6f956bdb3073 195
wolfSSL 3:6f956bdb3073 196 /* these next ones don't need real OpenSSL type, for OpenSSH compat only */
wolfSSL 3:6f956bdb3073 197 WOLFSSL_API void* wolfSSL_EVP_X_STATE(const WOLFSSL_EVP_CIPHER_CTX* ctx);
wolfSSL 3:6f956bdb3073 198 WOLFSSL_API int wolfSSL_EVP_X_STATE_LEN(const WOLFSSL_EVP_CIPHER_CTX* ctx);
wolfSSL 3:6f956bdb3073 199
wolfSSL 3:6f956bdb3073 200 WOLFSSL_API void wolfSSL_3des_iv(WOLFSSL_EVP_CIPHER_CTX* ctx, int doset,
wolfSSL 3:6f956bdb3073 201 unsigned char* iv, int len);
wolfSSL 3:6f956bdb3073 202 WOLFSSL_API void wolfSSL_aes_ctr_iv(WOLFSSL_EVP_CIPHER_CTX* ctx, int doset,
wolfSSL 3:6f956bdb3073 203 unsigned char* iv, int len);
wolfSSL 3:6f956bdb3073 204
wolfSSL 3:6f956bdb3073 205 WOLFSSL_API int wolfSSL_StoreExternalIV(WOLFSSL_EVP_CIPHER_CTX* ctx);
wolfSSL 3:6f956bdb3073 206 WOLFSSL_API int wolfSSL_SetInternalIV(WOLFSSL_EVP_CIPHER_CTX* ctx);
wolfSSL 3:6f956bdb3073 207
wolfSSL 3:6f956bdb3073 208
wolfSSL 3:6f956bdb3073 209 /* end OpenSSH compat */
wolfSSL 3:6f956bdb3073 210
wolfSSL 3:6f956bdb3073 211 typedef WOLFSSL_EVP_MD EVP_MD;
wolfSSL 3:6f956bdb3073 212 typedef WOLFSSL_EVP_CIPHER EVP_CIPHER;
wolfSSL 3:6f956bdb3073 213 typedef WOLFSSL_EVP_MD_CTX EVP_MD_CTX;
wolfSSL 3:6f956bdb3073 214 typedef WOLFSSL_EVP_CIPHER_CTX EVP_CIPHER_CTX;
wolfSSL 3:6f956bdb3073 215
wolfSSL 3:6f956bdb3073 216 #ifndef NO_MD5
wolfSSL 3:6f956bdb3073 217 #define EVP_md5 wolfSSL_EVP_md5
wolfSSL 3:6f956bdb3073 218 #endif
wolfSSL 3:6f956bdb3073 219 #define EVP_sha1 wolfSSL_EVP_sha1
wolfSSL 3:6f956bdb3073 220 #define EVP_sha256 wolfSSL_EVP_sha256
wolfSSL 3:6f956bdb3073 221 #define EVP_sha384 wolfSSL_EVP_sha384
wolfSSL 3:6f956bdb3073 222 #define EVP_sha512 wolfSSL_EVP_sha512
wolfSSL 3:6f956bdb3073 223 #define EVP_ripemd160 wolfSSL_EVP_ripemd160
wolfSSL 3:6f956bdb3073 224
wolfSSL 3:6f956bdb3073 225 #define EVP_aes_128_cbc wolfSSL_EVP_aes_128_cbc
wolfSSL 3:6f956bdb3073 226 #define EVP_aes_192_cbc wolfSSL_EVP_aes_192_cbc
wolfSSL 3:6f956bdb3073 227 #define EVP_aes_256_cbc wolfSSL_EVP_aes_256_cbc
wolfSSL 3:6f956bdb3073 228 #define EVP_aes_128_ctr wolfSSL_EVP_aes_128_ctr
wolfSSL 3:6f956bdb3073 229 #define EVP_aes_192_ctr wolfSSL_EVP_aes_192_ctr
wolfSSL 3:6f956bdb3073 230 #define EVP_aes_256_ctr wolfSSL_EVP_aes_256_ctr
wolfSSL 3:6f956bdb3073 231 #define EVP_des_cbc wolfSSL_EVP_des_cbc
wolfSSL 3:6f956bdb3073 232 #define EVP_des_ede3_cbc wolfSSL_EVP_des_ede3_cbc
wolfSSL 3:6f956bdb3073 233 #define EVP_rc4 wolfSSL_EVP_rc4
wolfSSL 3:6f956bdb3073 234 #define EVP_idea_cbc wolfSSL_EVP_idea_cbc
wolfSSL 3:6f956bdb3073 235 #define EVP_enc_null wolfSSL_EVP_enc_null
wolfSSL 3:6f956bdb3073 236
wolfSSL 3:6f956bdb3073 237 #define EVP_MD_size wolfSSL_EVP_MD_size
wolfSSL 3:6f956bdb3073 238 #define EVP_MD_CTX_init wolfSSL_EVP_MD_CTX_init
wolfSSL 3:6f956bdb3073 239 #define EVP_MD_CTX_cleanup wolfSSL_EVP_MD_CTX_cleanup
wolfSSL 3:6f956bdb3073 240 #define EVP_DigestInit wolfSSL_EVP_DigestInit
wolfSSL 3:6f956bdb3073 241 #define EVP_DigestUpdate wolfSSL_EVP_DigestUpdate
wolfSSL 3:6f956bdb3073 242 #define EVP_DigestFinal wolfSSL_EVP_DigestFinal
wolfSSL 3:6f956bdb3073 243 #define EVP_DigestFinal_ex wolfSSL_EVP_DigestFinal_ex
wolfSSL 3:6f956bdb3073 244 #define EVP_BytesToKey wolfSSL_EVP_BytesToKey
wolfSSL 3:6f956bdb3073 245
wolfSSL 3:6f956bdb3073 246 #define EVP_CIPHER_CTX_init wolfSSL_EVP_CIPHER_CTX_init
wolfSSL 3:6f956bdb3073 247 #define EVP_CIPHER_CTX_cleanup wolfSSL_EVP_CIPHER_CTX_cleanup
wolfSSL 3:6f956bdb3073 248 #define EVP_CIPHER_CTX_iv_length wolfSSL_EVP_CIPHER_CTX_iv_length
wolfSSL 3:6f956bdb3073 249 #define EVP_CIPHER_CTX_key_length wolfSSL_EVP_CIPHER_CTX_key_length
wolfSSL 3:6f956bdb3073 250 #define EVP_CIPHER_CTX_set_key_length wolfSSL_EVP_CIPHER_CTX_set_key_length
wolfSSL 3:6f956bdb3073 251 #define EVP_CipherInit wolfSSL_EVP_CipherInit
wolfSSL 3:6f956bdb3073 252 #define EVP_Cipher wolfSSL_EVP_Cipher
wolfSSL 3:6f956bdb3073 253
wolfSSL 3:6f956bdb3073 254 #define EVP_get_digestbynid wolfSSL_EVP_get_digestbynid
wolfSSL 3:6f956bdb3073 255
wolfSSL 3:6f956bdb3073 256 #define EVP_PKEY_get1_RSA wolfSSL_EVP_PKEY_get1_RSA
wolfSSL 3:6f956bdb3073 257 #define EVP_PKEY_get1_DSA wolfSSL_EVP_PKEY_get1_DSA
wolfSSL 3:6f956bdb3073 258 #define EVP_PKEY_get1_EC_KEY wolfSSL_EVP_PKEY_get1_EC_KEY
wolfSSL 3:6f956bdb3073 259
wolfSSL 3:6f956bdb3073 260
wolfSSL 3:6f956bdb3073 261 #ifndef EVP_MAX_MD_SIZE
wolfSSL 3:6f956bdb3073 262 #define EVP_MAX_MD_SIZE 64 /* sha512 */
wolfSSL 3:6f956bdb3073 263 #endif
wolfSSL 3:6f956bdb3073 264
wolfSSL 3:6f956bdb3073 265 #ifdef __cplusplus
wolfSSL 3:6f956bdb3073 266 } /* extern "C" */
wolfSSL 3:6f956bdb3073 267 #endif
wolfSSL 3:6f956bdb3073 268
wolfSSL 3:6f956bdb3073 269
wolfSSL 3:6f956bdb3073 270 #endif /* WOLFSSL_EVP_H_ */
wolfSSL 3:6f956bdb3073 271