Skip to content

generate_sub_keys depends on initial value of key_sets #7

Description

@Grazfather

There's a bug somewhere in generate_sub_keys. I haven't dug into it. I just noticed that if write a value into key sets before generating the sub keys, the output ciphertext changes.

$ xxd outx
00000000: 8ca6 4de9 c1b1 23a7 7e42 2822 7736 66c0  ..M...#.~B("w6f.
$ vim run_des.c # Add a memset before generate_sub_keys
$ gcc -o mydes des.c run_des.c
$ ./mydes -e key inp outy
Encrypting..
Finished processing inp. Time taken: 0.000106 seconds.
$ xxd outy
00000000: 038b 53ff 9828 9c81 1bb7 97cd 35ab 14ad  ..S..(......5...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions