High Quality Content by WIKIPEDIA articles! In cryptography, a weak key is a key which when used with a specific cipher, makes the cipher behave in some undesirable way. WEak keys usually represent a very small fraction of the overall keyspace, which usually means that if one generates a random key to encrypt a message weak keys are very unlikely to give rise to a security problem. NEvertheless, it is considered desirable for a cipher to have no weak keys. A Cipher with no weak keys is said to have a flat, or linear, key space.