Implement the key generation, but the file encryption has issue with padding.