20#define uint32 uint32_t
33 return (X & Y) | ((~X) & Z);
39 return (X & Y) | (X & Z) | (Y & Z);
52 return ((x << s) & 0xFFFFFFFF) | (x >> (32 - s));
55#define ROUND1(a, b, c, d, k, s) a = lshift (a + F (b, c, d) + X[k], s)
56#define ROUND2(a, b, c, d, k, s) \
57 a = lshift (a + G (b, c, d) + X[k] + (uint32) 0x5A827999, s)
58#define ROUND3(a, b, c, d, k, s) \
59 a = lshift (a + H (b, c, d) + X[k] + (uint32) 0x6ED9EBA1, s)
69 for (j = 0; j < 16; j++)
138 for (
size_t i = 0; i < 16; i++)
140 *(
volatile char *) (X + i) =
'\0';
149 for (i = 0; i < 16; i++)
150 M[i] = (in[i * 4 + 3] << 24) | (in[i * 4 + 2] << 16) | (in[i * 4 + 1] << 8)
151 | (in[i * 4 + 0] << 0);
158 out[1] = (x >> 8) & 0xFF;
159 out[2] = (x >> 16) & 0xFF;
160 out[3] = (x >> 24) & 0xFF;
167 unsigned char buf[128];
185 for (i = 0; i < 128; i++)
205 for (i = 0; i < 128; i++)
#define ROUND3(a, b, c, d, k, s)
static uint32 H(uint32 X, uint32 Y, uint32 Z)
static uint32 G(uint32 X, uint32 Y, uint32 Z)
static void copy4_ntlmssp(unsigned char *out, uint32 x)
#define ROUND2(a, b, c, d, k, s)
static void copy64_ntlmssp(uint32 *M, const unsigned char *in)
void mdfour_ntlmssp(unsigned char *out, const unsigned char *in, int n)
#define ROUND1(a, b, c, d, k, s)
static uint32 F(uint32 X, uint32 Y, uint32 Z)
static uint32 lshift(uint32 x, int s)
static void mdfour64_ntlmssp(uint32 *M)
Unix SMB/CIFS implementation.