Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions wolfcrypt/src/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -3032,20 +3032,36 @@ static void GMULT(word64* X, word64* Y)
word64 y = Y[i];
for (j = 0; j < 64; j++)
{
#ifdef BIG_ENDIAN_ORDER
if (y & 0x8000000000000000ULL) {
#else
if (y & 0x8000000000000000) {
#endif
Z[0] ^= V[0];
Z[1] ^= V[1];
}

if (V[1] & 0x0000000000000001) {
V[1] >>= 1;
#ifdef BIG_ENDIAN_ORDER
V[1] |= ((V[0] & 0x0000000000000001) ? 0x8000000000000000ULL : 0);
#else
V[1] |= ((V[0] & 0x0000000000000001) ? 0x8000000000000000 : 0);
#endif
V[0] >>= 1;
#ifdef BIG_ENDIAN_ORDER
V[0] ^= 0xE100000000000000ULL;
#else
V[0] ^= 0xE100000000000000;
#endif
}
else {
V[1] >>= 1;
#ifdef BIG_ENDIAN_ORDER
V[1] |= ((V[0] & 0x0000000000000001) ? 0x8000000000000000ULL : 0);
#else
V[1] |= ((V[0] & 0x0000000000000001) ? 0x8000000000000000 : 0);
#endif
V[0] >>= 1;
}
y <<= 1;
Expand Down
23 changes: 14 additions & 9 deletions wolfssl/sniffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,30 +41,35 @@
#endif


WOLFSSL_API
/*
* @param typeK:
* previously named keyType, shadowed a global declaration in
* wolfssl/wolfcrypt/asn.h on line 169
*/
WOLFSSL_API
SSL_SNIFFER_API int ssl_SetPrivateKey(const char* address, int port,
const char* keyFile, int keyType,
const char* keyFile, int typeK,
const char* password, char* error);

WOLFSSL_API
SSL_SNIFFER_API int ssl_SetNamedPrivateKey(const char* name,
const char* address, int port,
const char* keyFile, int keyType,
const char* keyFile, int typeK,
const char* password, char* error);

WOLFSSL_API
WOLFSSL_API
SSL_SNIFFER_API int ssl_DecodePacket(const unsigned char* packet, int length,
unsigned char* data, char* error);

WOLFSSL_API
WOLFSSL_API
SSL_SNIFFER_API int ssl_Trace(const char* traceFile, char* error);


WOLFSSL_API void ssl_InitSniffer(void);

WOLFSSL_API void ssl_FreeSniffer(void);


/* ssl_SetPrivateKey keyTypes */
enum {
FILETYPE_PEM = 1,
Expand Down