Ignore:
Timestamp:
Feb 7, 2019, 8:36:33 AM (5 years ago)
Author:
coas-nagasima
Message:

wolfsslを3.15.7にバージョンアップ

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_arm/trunk/wolfssl-3.12.2/wolfssl/wolfcrypt/dh.h

    r352 r372  
    2020 */
    2121
     22/*!
     23    \file wolfssl/wolfcrypt/dh.h
     24*/
    2225
    2326#ifndef WOLF_CRYPT_DH_H
     
    2730
    2831#ifndef NO_DH
     32
     33#if defined(HAVE_FIPS) && \
     34    defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)
     35    #include <wolfssl/wolfcrypt/fips.h>
     36#endif /* HAVE_FIPS_VERSION >= 2 */
    2937
    3038#include <wolfssl/wolfcrypt/integer.h>
     
    3947#endif
    4048typedef struct DhParams {
     49    #ifdef HAVE_FFDHE_Q
     50    const byte* q;
     51    word32      q_len;
     52    #endif /* HAVE_FFDHE_Q */
    4153    const byte* p;
    4254    word32      p_len;
     
    4759/* Diffie-Hellman Key */
    4860typedef struct DhKey {
    49     mp_int p, g;                            /* group parameters  */
     61    mp_int p, g, q;                         /* group parameters  */
    5062    void* heap;
    5163#ifdef WOLFSSL_ASYNC_CRYPT
     
    7385WOLFSSL_API int wc_InitDhKey(DhKey* key);
    7486WOLFSSL_API int wc_InitDhKey_ex(DhKey* key, void* heap, int devId);
    75 WOLFSSL_API void wc_FreeDhKey(DhKey* key);
     87WOLFSSL_API int wc_FreeDhKey(DhKey* key);
    7688
    7789WOLFSSL_API int wc_DhGenerateKeyPair(DhKey* key, WC_RNG* rng, byte* priv,
     
    8597WOLFSSL_API int wc_DhSetKey(DhKey* key, const byte* p, word32 pSz, const byte* g,
    8698                        word32 gSz);
     99WOLFSSL_API int wc_DhSetKey_ex(DhKey* key, const byte* p, word32 pSz,
     100                        const byte* g, word32 gSz, const byte* q, word32 qSz);
     101WOLFSSL_API int wc_DhSetCheckKey(DhKey* key, const byte* p, word32 pSz,
     102                        const byte* g, word32 gSz, const byte* q, word32 qSz,
     103                        int trusted, WC_RNG* rng);
    87104WOLFSSL_API int wc_DhParamsLoad(const byte* input, word32 inSz, byte* p,
    88105                            word32* pInOutSz, byte* g, word32* gInOutSz);
    89106WOLFSSL_API int wc_DhCheckPubKey(DhKey* key, const byte* pub, word32 pubSz);
     107WOLFSSL_API int wc_DhCheckPubKey_ex(DhKey* key, const byte* pub, word32 pubSz,
     108                            const byte* prime, word32 primeSz);
     109WOLFSSL_API int wc_DhCheckPrivKey(DhKey* key, const byte* priv, word32 pubSz);
     110WOLFSSL_API int wc_DhCheckPrivKey_ex(DhKey* key, const byte* priv, word32 pubSz,
     111                            const byte* prime, word32 primeSz);
     112WOLFSSL_API int wc_DhCheckKeyPair(DhKey* key, const byte* pub, word32 pubSz,
     113                        const byte* priv, word32 privSz);
     114WOLFSSL_API int wc_DhGenerateParams(WC_RNG *rng, int modSz, DhKey *dh);
     115WOLFSSL_API int wc_DhExportParamsRaw(DhKey* dh, byte* p, word32* pSz,
     116                       byte* q, word32* qSz, byte* g, word32* gSz);
     117
    90118
    91119#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.