change default gen_key iteration count
fix order of operations when byte-ing the bits