1. Introduction :
• Symmetric algorithm cryptography uses the same key for the coding and decoding processes; this key is most often called “secret” (as opposed to “private”) because all the security of the whole is directly linked to the fact that this key is only known by the sender and the recipient. This type of cryptography usually works according to two different processes, block encryption (DES, AES, Skipjack…); and streaming stream encryption (RC4 algorithm) and often use random number generation algorithms requiring randomness.
• The uses of random numbers in cryptography are diverse: generation of keys, generation of initialization vectors in symmetric cryptography, randomization in asymmetric cryptography. Statistical tests verify the good statistical distribution of the hazard generated, but none of the existing tests guarantee the unpredictability of a source of random numbers. The unpredictability of the cryptographic hazard is not studied on the generated bit sequence but on the generation algorithm. In general, it is recommended to reprocess the hazard from an uncontrolled random source to guarantee its unpredictability.

• The cryptographic mechanisms presented above act on data of well defined format. The definition of block cipher algorithms induces a natural way of encrypting blocks of fixed size. There are, however, different ways to use these primitives to encrypt messages of any size, called operating modes. Historically, operating modes have been extensively studied for their properties of propagating errors during various scenarios of data modification during encryption. The most natural mode consists of cutting the message into blocks of n bits, and applying the encryption function to each of these blocks with the encryption key.
1. Introduction to cryptography :
1. Block encryption modes CBC (Cipher Block Chaining):
• Before looking at the construction of the block encryption algorithm itself, it is useful to specify that there are several modes which allow the encryption of different blocks of size n, mi for i varying from 0 to t − 1, the EK encryption function then applying to each of the blocks. It is therefore a question of chaining the ci = EK (mi) with in general mi + 1 for i varying from 0 to t − 1. Where K denotes the key used by the algorithm, E denotes the encryption itself, M (or m, mi) denotes the message in clear (i.e. a block) and C (or c, ci ) the resulting figure. However, not all algorithms allow you to use all possible modes. We can cite: the CBC mode of English Cipher Block chaining which uses a chain encryption. To better understand, let’s see this mode in more detail.

• The widely used encryption mode is CBC (block chaining). It consists of encrypting the block i previously combined by or exclusive with the encryption of the previous block as well,

2. Description of the operating mode:
• ci = EK (mi ⊕ci − 1) for all i from 1 to t, with c0 = EK (m0 ⊕IV) where IV denotes an initialization vector. It is a block of random data which allows the encryption of the first block to start and thus provides a form of chance independent of the document to be encrypted. It does not need to be encrypted itself during transmission, but it should never be re-used with the same key. In this mode, an exclusive OR is applied to each block with the encryption of the previous block before it is itself encrypted. In addition, in order to make each message unique, an initialization vector (IV) is used. This initialization vector changes with each session, and must be transmitted to the recipient. On the other hand, it is not necessary to encrypt it before sending it: it can be known to the opponent.  To decrypt a block of encrypted text in CBC mode, the decryption algorithm is applied to the encrypted block and then it is combined by or exclusive with the preceding encrypted block, respectively with the initialization vector, in the case of the first block. The following operations are therefore carried out:       