Skip to contentSkip to conversation

crypto: des: fix inverted weak key flag check

PATCH Jarod Wilson 1 participant 1 message Dec 5, 2008 1 message not in the archive Crypto API

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 6 lines · Jarod Wilson

Based on the fact the testmgr code sets the weak key flag for vectors with wk = 1, the weak key flag check in des_setkey() is backwards. Also, add a warning when a weak key is rejected, otherwise you silently get a bogus result back.

Self-NAK. Due to mail server issues, this might show up before the original...

My understanding of the flag's meaning appears to be backwards, Herbert pointed out that the use of this flag is self-consistent. Also, the printk probably shouldn't be there, the caller should check retval and complain if need be.

Signature · 2 lines
Jarod Wilson
[email protected]