Secure communication
Encryption is a method in which data is rendered hard to read by an unauthorized party. Since encryption methods are created to extremely hard to break, many communication methods either use deliberately weaker encryption than possible, or have backdoors inserted to permit rapid decryption. In some cases government authorities have required backdoors be installed in secret. Many methods of encryption are also subject to "man in the middle" attack whereby a third party who can 'see' the establishment of the secure communication is made privy to the encryption method, this would apply for example to interception of computer use at an ISP. Provided it is correctly programmed, sufficiently powerful, and the keys not intercepted, encryption would usually be considered secure. The article on key size examines the key requirements for certain degrees of encryption security.
Block cipher
A block cipher consists of two paired algorithms, one for encryption, "E", and the other for decryption, "D". Both algorithms accept two inputs: an input block of size "n" bits and a key of size "k" bits; and both yield an "n"-bit output block. The decryption algorithm "D" is defined to be the inverse function of encryption, i.e., "D" = "E". More formally, a block cipher is specified by an encryption function
which takes as input a key "K" of bit length "k", called the "key size", and a bit string "P" of length "n", called the "block size", and returns a string "C" of "n" bits. "P" is called the plaintext, and "C" is termed the ciphertext. For each "K", the function "E"("P") is required to be an invertible mapping on {0,1}. The inverse for "E" is defined as a function
taking a key "K" and a ciphertext "C" to return a plaintext value "P", such that