Cipher Block Chaining (CBC) uses feedback to feed the result of encryption back into the encryption of the next block. The plain-text is XOR'ed with the previous cipher-text block before it is encrypted. The encryption of each block depends on all the previous blocks. This requires that the decryption side processes all encrypted blocks sequentially. This mode requires a random initialization vector which is XOR'ed with the first data block before it is encrypted. The initialization vector does not have to be kept secret. The initialization vector should be a random number (or a serial number), to ensure that each message is encrypted uniquely. An error in an encrypted block (caused by e.g. a transmission failure) causes the block with the error to be completely garbled. The subsequent block will have bit errors at the same positions as the original erroneous block. The blocks following the second block will not be affected by the error. Hence, CBC is self-recovering. While CBC recovers quickly from bit errors, it does not recover at all from synchronization errors. If a bit is added or lost from the cipher-text stream, then all subsequent blocks are garbled. A system that uses CBC must therefore ensure that the block structure remains intact. Like the ECB mode, CBC also requires a complete block on its input before encryption can take place.