# Symmetric key algorithm

A**symmetric-key algorithm**is an algorithm for cryptography that uses the same cryptographic key to encrypt and decrypt the message. (Actually, it is sufficient for it to be easy to compute the decryption key from the encryption key and vice versa.) Other terms for symmetric-key encryption are

**single-key**and

**private-key**encryption. Use of the latter term can sometimes conflict with the term

*private key*in public key cryptography.

Symmetric-key algorithms can be divided into stream ciphers and block ciphers. Stream ciphers encrypt the bits of the message one at a time, and block ciphers take a number of bits and encrypt them as a single unit. Blocks of 64 bits have been commonly used; the Advanced Encryption Standard algorithm approved by NIST in December 2001 uses 128-bit blocks.

Symmetric-key algorithms are generally much faster to execute electronically than asymmetric key algorithms. The disadvantage of symmetric-key algorithms is the requirement of a *shared secret key*, with one copy at each end. Since keys are subject to discovery by a cryptographic adversary, they need to be changed often and kept secure during distribution and in service. The consequent requirement to choose, distribute and store keys without error and without loss is a difficulty. In practice, it is a very severe problem, and has never been adequately solved. Given the presence of humans in the distribution mechanisms, there is no prospect of an easy solution.