key schedule; generator fixes byte for loop overflow