Added checksum to key generation