Patent ID: 8126139

Claim:
A method for encrypting and authentication of a set of plaintext blocks, comprising: identifying a set of designated blocks from the plurality of plaintext blocks; encrypting the plurality of plaintext blocks into a set of intermediate ciphertext blocks according to a mode of operation, wherein the mode of operation is for encrypting the plurality of plaintext blocks excluding the set of designated blocks and authenticating all of the plurality of plaintext blocks including the set of designated blocks; and encrypting each intermediate ciphertext block with a masking module including selecting a mask that has a binary pattern, wherein the binary pattern identifies bits within the corresponding intermediate ciphertext block for encryption by the masking module and encrypting the identified bits within each intermediate ciphertext block by using the selected mask wherein encrypting each intermediate ciphertext block with the masking module includes: using a cryptographic function to generate a random block, combining the random block with the selected mask, and encrypting the identified bits by using the masked random block.