packing keys into bytes changed to crypto util module