Skip to content

Commit

Permalink
ignore parity bits
Browse files Browse the repository at this point in the history
  • Loading branch information
doegox committed Nov 17, 2016
1 parent 32ba5c8 commit 35bf29e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/reverse_des_schedule.c → utils/des_keyschedule.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ int main(int argc, char **argv) {
round_key = key;
key_schedule(&round_key, &next_key, 0);
printf("Round key: %016" PRIx64 "\n", round_key);
printf("Reversing round key ...\n");
printf("Reversing round key...\n");
reverse_key_schedule(round_key, 0, possible_keys);
for(int i = 0; i < 256; i++) {
printf("%016" PRIx64 "\n", possible_keys[i]);
if(possible_keys[i] == key) {
if((possible_keys[i] & 0x00000000fefefefefefe) == (key & 0x00000000fefefefefefe)) {
printf("Key found at offset %d!\n", i);
return 0;
}
Expand Down

0 comments on commit 35bf29e

Please sign in to comment.