Hi, the code is well-written but I find a bug in the function generate_sub_keys. You don't initialize the key_sets before using it neither before calling the function. Thus the generated keys go wrong in my test.
My suggestion is as follows. Just add memset(key_sets, 0, 17 * sizeof(key_set); in the top of the function.
Hi, the code is well-written but I find a bug in the function
generate_sub_keys
. You don't initialize thekey_sets
before using it neither before calling the function. Thus the generated keys go wrong in my test. My suggestion is as follows. Just addmemset(key_sets, 0, 17 * sizeof(key_set);
in the top of the function.