摘要 |
A method of generating a ciphertext sequence from a first key and plaintext comprises generating a first initialisation vector (IV1) and a padding sequence, combining the plaintext and the padding sequence to generate a first intermediate sequence, and generating ciphertext by encrypting the first intermediate sequence using the key and the initialisation vector in a standard cipher-block chaining (CBC) process having a block length of M bytes. The ciphertext is decrypted by generating a second initialisation vector (IV2), decrypting the ciphertext using the first key and the second initialisation vector, and then removing the first N bytes. The padding sequence and initialisation vectors may be randomly generated. The padding sequence may have a length of M bytes and may be added to the beginning of the plaintext. The decryption does not require any knowledge of IV1 (IV2 being unrelated to IV1), or the padding.
|