I'm working on an implementation of Klein's wep attack.
For that, I've set up a router with wep encryption and collected 50,000 unique IVs from it. I tried only calculating K, meaning - the first byte of the key.
I run on all my IVs and calculated the equation as the paper says while keeping a record of the number of times each calculated value was repeated. And finally I am printing the top 30 results.
- The correct first byte of the key is not in one of the first 30 results.
- I keep getting negative numbers as keys.
Maybe there is something wrong with my calculation? Maybe I'm not understanding the algorithm properly?
I will put my code here if needed, but since the calculations are fairly simple, I think there is something else wrong.
I am using this as reference: http://www.item.ntnu.no/_media/people/personalpages/phd/anton/kleins_and_ptw_attacks_on_wep.pdf