Most symmetric-key algorithms are designed to have security equal to their key length. Ideally, the lower-bound on an algorithm's security is by design equal to the key length (that is, the algorithm's design does not detract from the degree of security inherent in the key length). a logarithmic measure of the fastest known attack against an algorithm), because the security of all algorithms can be violated by brute-force attacks. Key length defines the upper-bound on an algorithm's security (i.e. In cryptography, key size, key length, or key space refer to the number of bits in a key used by a cryptographic algorithm (such as a cipher). Number of bits in a key used by a cryptographic algorithm