OpenVAS Libraries  9.0.3
md4.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void mdfour_ntlmssp (unsigned char *out, const unsigned char *in, int n)
 

Function Documentation

◆ mdfour_ntlmssp()

void mdfour_ntlmssp ( unsigned char *  out,
const unsigned char *  in,
int  n 
)

Definition at line 125 of file md4.c.

References A, and uint32.

Referenced by SMBsesskeygen_ntv1_ntlmssp().

126 {
127  unsigned char buf[128];
128  uint32 M[16];
129  uint32 b = n * 8;
130  int i;
131 
132  A = 0x67452301;
133  B = 0xefcdab89;
134  C = 0x98badcfe;
135  D = 0x10325476;
136 
137  while (n > 64) {
138  copy64_ntlmssp(M, in);
139  mdfour64_ntlmssp(M);
140  in += 64;
141  n -= 64;
142  }
143 
144  for (i=0;i<128;i++)
145  buf[i] = 0;
146  memcpy(buf, in, n);
147  buf[n] = 0x80;
148 
149  if (n <= 55) {
150  copy4_ntlmssp(buf+56, b);
151  copy64_ntlmssp(M, buf);
152  mdfour64_ntlmssp(M);
153  } else {
154  copy4_ntlmssp(buf+120, b);
155  copy64_ntlmssp(M, buf);
156  mdfour64_ntlmssp(M);
157  copy64_ntlmssp(M, buf+64);
158  mdfour64_ntlmssp(M);
159  }
160 
161  for (i=0;i<128;i++)
162  buf[i] = 0;
163  copy64_ntlmssp(M, buf);
164 
165  copy4_ntlmssp(out, A);
166  copy4_ntlmssp(out+4, B);
167  copy4_ntlmssp(out+8, C);
168  copy4_ntlmssp(out+12, D);
169 
170  A = B = C = D = 0;
171 }
Definition: cvss.c:103
#define uint32
Definition: md4.c:26
Definition: cvss.c:103
Here is the caller graph for this function: