Eneboo - Documentación para desarrolladores
|
00001 /* crypto/ecdh/ech_locl.h */ 00002 /* ==================================================================== 00003 * Copyright (c) 2000-2005 The OpenSSL Project. All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 00009 * 1. Redistributions of source code must retain the above copyright 00010 * notice, this list of conditions and the following disclaimer. 00011 * 00012 * 2. Redistributions in binary form must reproduce the above copyright 00013 * notice, this list of conditions and the following disclaimer in 00014 * the documentation and/or other materials provided with the 00015 * distribution. 00016 * 00017 * 3. All advertising materials mentioning features or use of this 00018 * software must display the following acknowledgment: 00019 * "This product includes software developed by the OpenSSL Project 00020 * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 00021 * 00022 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 00023 * endorse or promote products derived from this software without 00024 * prior written permission. For written permission, please contact 00025 * licensing@OpenSSL.org. 00026 * 00027 * 5. Products derived from this software may not be called "OpenSSL" 00028 * nor may "OpenSSL" appear in their names without prior written 00029 * permission of the OpenSSL Project. 00030 * 00031 * 6. Redistributions of any form whatsoever must retain the following 00032 * acknowledgment: 00033 * "This product includes software developed by the OpenSSL Project 00034 * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 00035 * 00036 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 00037 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00038 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00039 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 00040 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00041 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 00042 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00043 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00044 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 00045 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00046 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 00047 * OF THE POSSIBILITY OF SUCH DAMAGE. 00048 * ==================================================================== 00049 * 00050 * This product includes cryptographic software written by Eric Young 00051 * (eay@cryptsoft.com). This product includes software written by Tim 00052 * Hudson (tjh@cryptsoft.com). 00053 * 00054 */ 00055 00056 #ifndef HEADER_ECH_LOCL_H 00057 #define HEADER_ECH_LOCL_H 00058 00059 #include <openssl/ecdh.h> 00060 00061 #ifdef __cplusplus 00062 extern "C" { 00063 #endif 00064 00065 struct ecdh_method 00066 { 00067 const char *name; 00068 int (*compute_key)(void *key, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, 00069 void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)); 00070 #if 0 00071 int (*init)(EC_KEY *eckey); 00072 int (*finish)(EC_KEY *eckey); 00073 #endif 00074 int flags; 00075 char *app_data; 00076 }; 00077 00078 typedef struct ecdh_data_st { 00079 /* EC_KEY_METH_DATA part */ 00080 int (*init)(EC_KEY *); 00081 /* method specific part */ 00082 ENGINE *engine; 00083 int flags; 00084 const ECDH_METHOD *meth; 00085 CRYPTO_EX_DATA ex_data; 00086 } ECDH_DATA; 00087 00088 ECDH_DATA *ecdh_check(EC_KEY *); 00089 00090 #ifdef __cplusplus 00091 } 00092 #endif 00093 00094 #endif /* HEADER_ECH_LOCL_H */