Skip to content

des: tweak weak key test#468

Merged
newpavlov merged 4 commits intomasterfrom
des/tweak_weak
Feb 14, 2025
Merged

des: tweak weak key test#468
newpavlov merged 4 commits intomasterfrom
des/tweak_weak

Conversation

@newpavlov
Copy link
Member

The new code results in a slightly better codegen while still being const time, including 32 bit targets: https://rust.godbolt.org/z/K7cjj5d1P

@newpavlov newpavlov requested review from baloo and tarcieri February 12, 2025 13:43
@newpavlov
Copy link
Member Author

@baloo
I am not sure what exact purpose of the bit counting loop was, so I removed it for now. Could you explain it?

@baloo
Copy link
Member

baloo commented Feb 12, 2025

That was a copy paste from https://github.com/iqlusioninc/yubikey.rs/blob/13bdf9a5850c124057825297b51eaecaf8ebe9e2/src/mgm/tdes.rs#L36
I think @str4d was the original author.

@newpavlov newpavlov merged commit 717c382 into master Feb 14, 2025
161 checks passed
@newpavlov newpavlov deleted the des/tweak_weak branch February 14, 2025 11:29
@newpavlov
Copy link
Member Author

I added subkey equality check for TDES in #470.

@baloo
Copy link
Member

baloo commented Sep 12, 2025

I believe this changed the behavior of the test (iqlusioninc/yubikey.rs#639)

(or #470 not sure)

@newpavlov
Copy link
Member Author

@baloo
Could you open a new issue for it with reproduction code? The current code simply checks every subkey against the list of weak DES keys. It may not be the recommended approach for TDES, but then we would need a proper specification of the check.

@newpavlov newpavlov mentioned this pull request Mar 2, 2026
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.

2 participants