- Timestamp:
- Jun 22, 2021, 9:00:19 PM (3 years ago)
- Location:
- azure_iot_hub_f767zi/trunk/wolfssl-4.7.0
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
azure_iot_hub_f767zi/trunk/wolfssl-4.7.0/wolfssl/wolfcrypt/dh.h
r457 r464 46 46 #include <wolfssl/wolfcrypt/async.h> 47 47 #endif 48 49 /* Optional support extended DH public / private keys */ 50 #if !defined(WOLFSSL_DH_EXTRA) && (defined(WOLFSSL_QT) || \ 51 defined(OPENSSL_ALL) || defined(WOLFSSL_OPENSSH) || \ 52 defined(WOLFSSL_STATIC_EPHEMERAL)) 53 #define WOLFSSL_DH_EXTRA 54 #endif 55 48 56 typedef struct DhParams { 49 57 #ifdef HAVE_FFDHE_Q 50 58 const byte* q; 51 59 word32 q_len; 52 60 #endif /* HAVE_FFDHE_Q */ 53 61 const byte* p; 54 62 word32 p_len; … … 59 67 /* Diffie-Hellman Key */ 60 68 struct DhKey { 61 mp_int p, g, q; /* group parameters*/62 #if defined(WOLFSSL_QT) || defined(OPENSSL_ALL) || defined(WOLFSSL_OPENSSH)69 mp_int p, g, q; /* group parameters */ 70 #ifdef WOLFSSL_DH_EXTRA 63 71 mp_int pub; 64 72 mp_int priv; … … 102 110 103 111 WOLFSSL_API int wc_DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, 104 word32); 112 word32); /* wc_DhKeyDecode is in asn.c */ 113 105 114 WOLFSSL_API int wc_DhSetKey(DhKey* key, const byte* p, word32 pSz, const byte* g, 106 115 word32 gSz); 107 116 WOLFSSL_API int wc_DhSetKey_ex(DhKey* key, const byte* p, word32 pSz, 108 117 const byte* g, word32 gSz, const byte* q, word32 qSz); 109 #if defined(WOLFSSL_QT) || defined(OPENSSL_ALL) 110 WOLFSSL_LOCAL int wc_DhSetFullKeys(DhKey* key,const byte* priv_key,word32 privSz, 111 const byte* pub_key, word32 pubSz); 118 119 #ifdef WOLFSSL_DH_EXTRA 120 WOLFSSL_API int wc_DhImportKeyPair(DhKey* key, const byte* priv, word32 privSz, 121 const byte* pub, word32 pubSz); 122 WOLFSSL_API int wc_DhExportKeyPair(DhKey* key, byte* priv, word32* pPrivSz, 123 byte* pub, word32* pPubSz); 124 WOLFSSL_LOCAL int wc_DhKeyCopy(DhKey* src, DhKey* dst); 112 125 #endif 113 126 WOLFSSL_API int wc_DhSetCheckKey(DhKey* key, const byte* p, word32 pSz, … … 137 150 #endif /* NO_DH */ 138 151 #endif /* WOLF_CRYPT_DH_H */ 139
Note:
See TracChangeset
for help on using the changeset viewer.