Symmetric encryption is a cryptographic algorithm utilizing a single key for encrypting and decrypting a message. The security of the encrypted message is usually based on the secrecy of the key as demanded by Kerckhoff’s Principle. The mode of operation usually splits up block based and stream based symmetric cipher suites.
A block based algorithm operates on fixed sized chunks of content. Each block is encrypted with a block specific key. Different modes for the block specific key generation exist, each with advantages and drawbacks. The final block might need to be padded to the required length.
A stream cipher encrypts the message with a random byte stream. This stream is generated by a pseudo-random number generator (PRNG). The plaintext text is XOR-ed with byte stream to generate the cipher text. The initial state of the PRNG is based on the key.
The following two aspects have to be considered when talking about symmetric encryption.