Skip to content

Clear round keys before generating subkeys - #13

Open
zakihussain wants to merge 1 commit into
tarequeh:masterfrom
zakihussain:patch-1
Open

Clear round keys before generating subkeys#13
zakihussain wants to merge 1 commit into
tarequeh:masterfrom
zakihussain:patch-1

Conversation

@zakihussain

Copy link
Copy Markdown

Before this change, each round's subkey could have leftover bits from the previous round because we didn’t clear key_sets[i].k. This could cause wrong keys during encryption. Now, we set all 8 bytes of the round key to 0 before generating it, which fixes a potential problem and makes subkey generation correct.

Before this change, each round's subkey could have leftover bits from the previous round because we didn’t clear key_sets[i].k. This could cause wrong keys during encryption. Now, we set all 8 bytes of the round key to 0 before generating it, which fixes a potential problem and makes subkey generation correct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant