24#define WIN32_NO_STATUS
25#define WIN32_LEAN_AND_MEAN
176 *pDestHashContext = *pSrcHashContext;
221 rc2_setup(abKeyValue, dwKeyLen + dwSaltLen, dwEffectiveKeyLen ?
222 dwEffectiveKeyLen : dwKeyLen << 3, 0, &pKeyContext->
rc2);
230 memcpy(abKeyValue+16, abKeyValue, 8);
269 *pDestKeyContext = *pSrcKeyContext;
296 for (
i=0;
i<dwLen/2;
i++) {
306 unsigned long inlen, outlen;
426 if (!pbTemp)
return FALSE;
427 memcpy(pbTemp, pbSrc, dwKeyLen);
452 pbDest += (dwKeyLen+1)>>1;
458 pbDest += (dwKeyLen+1)>>1;
464 pbDest += (dwKeyLen+1)>>1;
470 pbDest += (dwKeyLen+1)>>1;
476 pbDest += (dwKeyLen+1)>>1;
490 BYTE *pbTemp, *pbBigNum;
501 if (!pbTemp)
return FALSE;
502 memcpy(pbTemp, pbSrc,
min(dwDataLen, 2*dwKeyLen+5*((dwKeyLen+1)>>1)));
508 pbBigNum += dwKeyLen;
511 pbBigNum += (dwKeyLen+1)>>1;
514 pbBigNum += (dwKeyLen+1)>>1;
517 pbBigNum += (dwKeyLen+1)>>1;
520 pbBigNum += (dwKeyLen+1)>>1;
523 pbBigNum += (dwKeyLen+1)>>1;
527 dwKeyLen =
min(dwKeyLen, dwDataLen - (pbBigNum - pbTemp));
#define HeapFree(x, y, z)
void aes_ecb_encrypt(const unsigned char *pt, unsigned char *ct, aes_key *skey)
void aes_ecb_decrypt(const unsigned char *ct, unsigned char *pt, aes_key *skey)
int aes_setup(const unsigned char *key, int keylen, int rounds, aes_key *skey)
int des_setup(const unsigned char *key, int keylen, int num_rounds, des_key *des)
void des_ecb_encrypt(const unsigned char *pt, unsigned char *ct, const des_key *des)
void des_ecb_decrypt(const unsigned char *ct, unsigned char *pt, const des_key *des)
void des3_ecb_encrypt(const unsigned char *pt, unsigned char *ct, const des3_key *des3)
void des3_ecb_decrypt(const unsigned char *ct, unsigned char *pt, const des3_key *des3)
int des3_setup(const unsigned char *key, int keylen, int num_rounds, des3_key *des3)
unsigned long rc4_read(unsigned char *buf, unsigned long len, prng_state *prng)
int rc4_ready(prng_state *prng)
int rc4_start(prng_state *prng)
int rc4_add_entropy(const unsigned char *buf, unsigned long len, prng_state *prng)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
BOOL finalize_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, BYTE *pbHashValue)
VOID WINAPI A_SHAFinal(PSHA_CTX Context, PULONG Result)
VOID WINAPI MD5Final(MD5_CTX *ctx)
BOOL duplicate_key_impl(ALG_ID aiAlgid, const KEY_CONTEXT *pSrcKeyContext, KEY_CONTEXT *pDestKeyContext)
VOID WINAPI MD5Update(MD5_CTX *ctx, const unsigned char *buf, unsigned int len)
BOOL encrypt_block_impl(ALG_ID aiAlgid, DWORD dwKeySpec, KEY_CONTEXT *pKeyContext, const BYTE *in, BYTE *out, DWORD enc)
BOOL encrypt_stream_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, BYTE *stream, DWORD dwLen)
BOOL new_key_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen)
BOOL free_key_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext)
VOID WINAPI A_SHAInit(PSHA_CTX Context)
BOOL export_public_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD *pdwPubExp)
BOOL duplicate_hash_impl(ALG_ID aiAlgid, const HASH_CONTEXT *pSrcHashContext, HASH_CONTEXT *pDestHashContext)
static void reverse_bytes(BYTE *pbData, DWORD dwLen)
VOID WINAPI MD5Init(MD5_CTX *ctx)
VOID WINAPI MD4Final(MD4_CTX *ctx)
BOOL update_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext, const BYTE *pbData, DWORD dwDataLen)
BOOL gen_rand_impl(BYTE *pbBuffer, DWORD dwLen)
VOID WINAPI MD4Update(MD4_CTX *ctx, const unsigned char *buf, unsigned int len)
BOOL setup_key_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD dwEffectiveKeyLen, DWORD dwSaltLen, BYTE *abKeyValue)
BOOL import_public_key_impl(const BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD dwPubExp)
BOOL export_private_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD *pdwPubExp)
VOID WINAPI MD4Init(MD4_CTX *ctx)
BOOL init_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext)
BOOL WINAPI SystemFunction036(PVOID pbBuffer, ULONG dwLen)
VOID WINAPI A_SHAUpdate(PSHA_CTX Context, const unsigned char *Buffer, UINT BufferSize)
BOOL import_private_key_impl(const BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD dwDataLen, DWORD dwPubExp)
#define memcpy(s1, s2, n)
int mp_to_unsigned_bin(const mp_int *a, unsigned char *b)
unsigned long mp_get_int(const mp_int *a)
int mp_unsigned_bin_size(const mp_int *a)
int mp_count_bits(const mp_int *a)
int mp_read_unsigned_bin(mp_int *a, const unsigned char *b, int c)
int mp_init_copy(mp_int *a, const mp_int *b)
int mp_set_int(mp_int *a, unsigned long b)
int mp_init_multi(mp_int *mp,...)
void rc2_ecb_encrypt(const unsigned char *plain, unsigned char *cipher, rc2_key *rc2)
int rc2_setup(const unsigned char *key, int keylen, int bits, int rounds, rc2_key *rc2)
void rc2_ecb_decrypt(const unsigned char *cipher, unsigned char *plain, rc2_key *rc2)
void SHA384_Init(SHA384_CTX *context)
void SHA256_Init(SHA256_CTX *context)
void SHA256_Final(sha2_byte digest[], SHA256_CTX *context)
void SHA384_Update(SHA384_CTX *context, const sha2_byte *data, size_t len)
void SHA256_Update(SHA256_CTX *context, const sha2_byte *data, size_t len)
void SHA384_Final(sha2_byte digest[], SHA384_CTX *context)
void SHA512_Update(SHA512_CTX *context, const sha2_byte *data, size_t len)
void SHA512_Final(sha2_byte digest[], SHA512_CTX *context)
void SHA512_Init(SHA512_CTX *context)
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
int md2_done(md2_state *md2, unsigned char *hash)
int rsa_make_key(int size, long e, rsa_key *key)
int rsa_exptmod(const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen, int which, rsa_key *key)
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_updates_bytes_to_ pdwDataLen BYTE * pbData
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO