Methods and apparatus are presented for encrypting and authenticating data,
wherein some data is encrypted and some data is not encrypted, but all of the data
is authenticated. Different formulations for authentication blocks are used according
to whether a block of data occupies a cleartext position or ciphertext position.
The authentication blocks are then combined to form a checksum, which is encrypted
to form an authentication tag.