#include "precomp.h"
#include <wine/debug.h>
Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (ntlm) |
|
VOID WINAPI | MD4Init (MD4_CTX *ctx) |
|
VOID WINAPI | MD4Update (MD4_CTX *ctx, const unsigned char *buf, unsigned int len) |
|
VOID WINAPI | MD4Final (MD4_CTX *ctx) |
|
VOID WINAPI | MD5Init (MD5_CTX *ctx) |
|
VOID WINAPI | MD5Update (MD5_CTX *ctx, const unsigned char *buf, unsigned int len) |
|
VOID WINAPI | MD5Final (MD5_CTX *ctx) |
|
ULONG | ComputeCrc32 (const BYTE *pData, INT iLen, ULONG initial_crc) |
|
SECURITY_STATUS | SECUR32_CreateNTLM1SessionKey (PBYTE password, int len, PBYTE session_key) |
|
static void | SECUR32_CalcNTLM2Subkey (const BYTE *session_key, const char *magic, PBYTE subkey) |
|
SECURITY_STATUS | SECUR32_CreateNTLM2SubKeys (PNegoHelper helper) |
|
arc4_info * | SECUR32_arc4Alloc (void) |
|
void | SECUR32_arc4Init (arc4_info *a4i, const BYTE *key, unsigned int keyLen) |
|
void | SECUR32_arc4Process (arc4_info *a4i, BYTE *inoutString, unsigned int length) |
|
void | SECUR32_arc4Cleanup (arc4_info *a4i) |
|
◆ ComputeCrc32()
Definition at line 109 of file util.c.
110{
111 ULONG crc = ~initial_crc;
112
113 while (iLen > 0)
114 {
117 iLen--;
118 }
119 return ~crc;
120}
static const ULONG CRC_table[256]
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Referenced by ntlm_CreateSignature().
◆ MD4Final()
Definition at line 113 of file md4.c.
114{
117
118
120
121
122
125
126
128
129
131 {
132
136
137
139 }
140 else
141 {
142
144 }
145
147
148
149 ((
unsigned int *)
ctx->in)[14] =
ctx->i[0];
150 ((
unsigned int *)
ctx->in)[15] =
ctx->i[1];
151
156}
GLuint GLuint GLsizei count
#define memcpy(s1, s2, n)
static void MD4Transform(unsigned int buf[4], unsigned int const in[16])
#define byteReverse(buf, long)
Referenced by SECUR32_CreateNTLM1SessionKey().
◆ MD4Init()
◆ MD4Update()
Definition at line 59 of file md4.c.
60{
61 register unsigned int t;
62
63
65
66 if ((
ctx->i[0] =
t + (
len << 3)) <
t)
68
71
72
74 {
75 unsigned char *
p = (
unsigned char *)
ctx->in +
t;
77
79 {
81 return;
82 }
83
86
88
91 }
92
93
95 {
98
100
103 }
104
105
107}
GLenum GLuint GLenum GLsizei const GLchar * buf
Referenced by SECUR32_CreateNTLM1SessionKey().
◆ MD5Final()
Definition at line 113 of file md5.c.
114{
117
118
120
121
122
125
126
128
129
131 {
132
136
137
139 }
140 else
141 {
142
144 }
145
147
148
149 ((
unsigned int *)
ctx->in)[14] =
ctx->i[0];
150 ((
unsigned int *)
ctx->in)[15] =
ctx->i[1];
151
156}
static void MD5Transform(unsigned int buf[4], const unsigned int in[16])
Referenced by SECUR32_CalcNTLM2Subkey().
◆ MD5Init()
◆ MD5Update()
Definition at line 59 of file md5.c.
60{
61 register unsigned int t;
62
63
65
66 if ((
ctx->i[0] =
t + (
len << 3)) <
t)
68
71
72
74 {
75 unsigned char *
p = (
unsigned char *)
ctx->in +
t;
77
79 {
81 return;
82 }
83
86
88
91 }
92
93
95 {
98
100
103 }
104
105
107}
Referenced by SECUR32_CalcNTLM2Subkey().
◆ SECUR32_arc4Alloc()
◆ SECUR32_arc4Cleanup()
◆ SECUR32_arc4Init()
Definition at line 199 of file util.c.
200{
201 unsigned int keyIndex = 0, stateIndex = 0;
203
204 TRACE(
"(%p, %p, %d)\n", a4i,
key, keyLen);
205
207
208 for (
i=0;
i<256;
i++)
210
212 {
214 stateIndex +=
key[keyIndex] +
a;
215 stateIndex &= 0xff;
217 a4i->
state[stateIndex] =
a;
218 if (++keyIndex >= keyLen)
219 keyIndex = 0;
220 }
221
222}
GLboolean GLboolean GLboolean GLboolean a
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
Referenced by ntlm_AcceptSecurityContext(), and ntlm_InitializeSecurityContextW().
◆ SECUR32_arc4Process()
◆ SECUR32_CalcNTLM2Subkey()
Definition at line 144 of file util.c.
145{
147
153}
VOID WINAPI MD5Final(MD5_CTX *ctx)
VOID WINAPI MD5Update(MD5_CTX *ctx, const unsigned char *buf, unsigned int len)
VOID WINAPI MD5Init(MD5_CTX *ctx)
int WINAPI lstrlenA(LPCSTR lpString)
Referenced by SECUR32_CreateNTLM2SubKeys().
◆ SECUR32_CreateNTLM1SessionKey()
Definition at line 122 of file util.c.
123{
126
128
132
134
138
140
142}
VOID WINAPI MD4Final(MD4_CTX *ctx)
VOID WINAPI MD4Update(MD4_CTX *ctx, const unsigned char *buf, unsigned int len)
VOID WINAPI MD4Init(MD4_CTX *ctx)
Referenced by ntlm_InitializeSecurityContextW().
◆ SECUR32_CreateNTLM2SubKeys()
Definition at line 156 of file util.c.
157{
162
164 {
166 helper->
crypt.ntlm2.send_sign_key);
168 helper->
crypt.ntlm2.send_seal_key);
170 helper->
crypt.ntlm2.recv_sign_key);
172 helper->
crypt.ntlm2.recv_seal_key);
173 }
174 else
175 {
177 helper->
crypt.ntlm2.send_sign_key);
179 helper->
crypt.ntlm2.send_seal_key);
181 helper->
crypt.ntlm2.recv_sign_key);
183 helper->
crypt.ntlm2.recv_seal_key);
184 }
185
187}
static void SECUR32_CalcNTLM2Subkey(const BYTE *session_key, const char *magic, PBYTE subkey)
static const char client_to_server_seal_constant[]
static const char server_to_client_seal_constant[]
static const char client_to_server_sign_constant[]
static const char server_to_client_sign_constant[]
struct _NegoHelper::@572 crypt
Referenced by ntlm_InitializeSecurityContextW().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
ntlm |
| ) |
|
◆ client_to_server_seal_constant
◆ client_to_server_sign_constant
◆ CRC_table
◆ server_to_client_seal_constant
◆ server_to_client_sign_constant