A method for encrypting plaintext digital data divided into a sequence (SEQP) comprising N successive blocks (P 1, P 2, P 3,..., P N) of a same length of x bits each and a residual plaintext block having a length of y bits lower than the length of one of the N successive blocks (P 1, P 2, P 3,..., P N), the method comprising preliminary step of: a) inputting the sequence (SEQP) of N successive plaintext blocks (P 1, P 2, P 3,..., P N) into a pre-processing module comprising at least a ciphering module, an addition module, registers and a memory containing a main encryption key, the addition module applying logical XOR operation carried out bitwise; b) ciphering the N successive plaintext blocks (P 1, P 2, P 3,..., P N) with the main encryption key by using an encryption algorithm based on a cipher block chaining mode where the first block is added to an initialization vector and each following plaintext block is added to the preceding ciphered block before being encrypted with the main encryption key, obtaining a sequence (SEQC) of N successive ciphered blocks (C 1, C 2, C 3,....C N) of the same length than the plaintext blocks (P 1, P 2, P 3,..., P N); the method is characterized in that it further comprises steps of: c) generating a set of round keys (S 1, S 2, S 3,...S n) having a same length by applying a key schedule function on a string obtained by adding the last ciphered block (C N) to the main encryption key; d) adding together by the addition module all or part of the round keys (S 1, S 2, S 3,...S n) of the set, obtaining a resulting string having a length equal to the length of a block; e) adding to the residual plaintext block the most left bits of the resulting string forming a string having a length equal to the length of the residual block, obtaining a residual ciphered block; f) outputting the sequence (SEQC) including the previously obtained N successive ciphered blocks (C 1, C 2, C 3,....C N) followed by the residual ciphered block. a) inputting the sequence (SEQP) of N successive plaintext blocks (P 1, P 2, P 3,..., P N) into a pre-processing module comprising at least a ciphering module, an addition module, registers and a memory containing a main encryption key, the addition module applying logical XOR operation carried out bitwise; b) ciphering the N successive plaintext blocks (P 1, P 2, P 3,..., P N) with the main encryption key by using an encryption algorithm based on a cipher block chaining mode where the first block is added to an initialization vector and each following plaintext block is added to the preceding ciphered block before being encrypted with the main encryption key, obtaining a sequence (SEQC) of N successive ciphered blocks (C 1, C 2, C 3,....C N) of the same length than the plaintext blocks (P 1, P 2, P 3,..., P N); c) generating a set of round keys (S 1, S 2, S 3,...S n) having a same length by applying a key schedule function on a string obtained by adding the last ciphered block (C N) to the main encryption key; d) adding together by the addition module all or part of the round keys (S 1, S 2, S 3,...S n) of the set, obtaining a resulting string having a length equal to the length of a block; e) adding to the residual plaintext block the most left bits of the resulting string forming a string having a length equal to the length of the residual block, obtaining a residual ciphered block; f) outputting the sequence (SEQC) including the previously obtained N successive ciphered blocks (C 1, C 2, C 3,....C N) followed by the residual ciphered block.