fixed keystream gen