Next: Recommendations
Up: Password Decoding Details
Previous: Passwords of 4 Characters
The encoding scheme for long length passwords (up to 31 characters in length) is more complicated than for short length passwords, although it, too, is reversible.
= ASCII password
= 64-byte constant block
= encoded password block
First, is padded to 32 bytes in the following fashion:
j = strlen(A);
while (j < 32)
{
for (i = j; i < j * 2; ++i)
// increment each ASCII value by j
A[i] = A[i - j] + j;
j = j * 2;
}
The resultant 32-byte array, , is then passed through four rounds of a function which XORs against a 64-byte constant (Figure 5). is an index that begins at {2,16,24,8} for each of the four rounds.
j = (A[k] + A[k+1]) & 0x3F; // 6 LSB
shift = (A[k+2] + A[k+3]) & 0x07; // 3 LSB
for (i = 0; i < 32; ++i, ++j, ++k)
{
// wrap around to beginning
if (j == 64) j = 0;
if (k == 32) k = 0;
temp = B[j]; // xy
temp <<= 8;
temp |= B[j]; // xyxy
temp >>= shift;
C[k] XOR= (unsigned char) temp;
}
The resultant 32-byte encoded password block (example in Figure 6) does not have any immediately visible remnants of the constant block as the short length encoding method does. However, it is still reversible with minimal computing resources.
Figure 5:
64-byte constant block for use with passwords greater than 4 characters
|
Figure 6:
Encoded password block of ASCII password `testa'
|
Kingpin
2001-05-09