Cryptology 431
fseek(fd,(DCM2)+enum_hashtriplet(pass[6], pass[7], pass[8])WIDTH, SEEK_SET);
fread(temp_vector, WIDTH, 1, fd); // Read the vector associating bytes 6-8 of hash.
merge(bin_vector1, temp_vector); // Merge it with the first two vectors.
len = count_vector_bits(bin_vector1);
printf("first 3 vectors merged:\t%d plaintext pairs, with %0.2f%% saturation\n", len,
len*100.0/9025.0);
fseek(fd,(DCM3)+enum_hashtriplet(pass[8], pass[9],pass[10])WIDTH, SEEK_SET);
fread(temp_vector, WIDTH, 1, fd); // Read the vector associatind bytes 8-10 of hash.
merge(bin_vector1, temp_vector); // Merge it with the othes vectors.
len = count_vector_bits(bin_vector1);
printf("all 4 vectors merged:\t%d plaintext pairs, with %0.2f%% saturation\n", len,
len*100.0/9025.0);
printf("Possible plaintext pairs for the first two bytes:\n");
print_vector(bin_vector1);
printf("\nFiltering possible plaintext bytes for the last two characters:\n");
fseek(fd,(DCM4)+enum_hashtriplet(pass[2], pass[3], pass[4])WIDTH, SEEK_SET);
fread(bin_vector2, WIDTH, 1, fd); // Read the vector associating bytes 2-4 of hash.
len = count_vector_bits(bin_vector2);
printf("only 1 vector of 4:\t%d plaintext pairs, with %0.2f%% saturation\n", len, len*100.0/
9025.0);
fseek(fd,(DCM5)+enum_hashtriplet(pass[4], pass[5], pass[6])WIDTH, SEEK_SET);
fread(temp_vector, WIDTH, 1, fd); // Read the vector associating bytes 4-6 of hash.
merge(bin_vector2, temp_vector); // Merge it with the first vector.
len = count_vector_bits(bin_vector2);
printf("vectors 1 AND 2 merged:\t%d plaintext pairs, with %0.2f%% saturation\n", len,
len*100.0/9025.0);
fseek(fd,(DCM6)+enum_hashtriplet(pass[6], pass[7], pass[8])WIDTH, SEEK_SET);
fread(temp_vector, WIDTH, 1, fd); // Read the vector associating bytes 6-8 of hash.
merge(bin_vector2, temp_vector); // Merge it with the first two vectors.
len = count_vector_bits(bin_vector2);
printf("first 3 vectors merged:\t%d plaintext pairs, with %0.2f%% saturation\n", len,
len*100.0/9025.0);
fseek(fd,(DCM7)+enum_hashtriplet(pass[8], pass[9],pass[10])WIDTH, SEEK_SET);
fread(temp_vector, WIDTH, 1, fd); // Read the vector associatind bytes 8-10 of hash.
merge(bin_vector2, temp_vector); // Merge it with the othes vectors.
len = count_vector_bits(bin_vector2);
printf("all 4 vectors merged:\t%d plaintext pairs, with %0.2f%% saturation\n", len,
len*100.0/9025.0);
printf("Possible plaintext pairs for the last two bytes:\n");
print_vector(bin_vector2);