Cryptography Overview

guess), an attacker would be able to determine some of the original message bytes by XORing two sets of cipher bytes.

Key

Key

Mixing

 

Pseudo- random bytes

Nth message

XOR

Nth cipher

byte

byte

 

Figure 3-7RC4 Encryption or Decryption

The RC4 algorithm with MAC

The RC4-with-MAC algorithm is an extension of the RC4 cipher. It provides data integrity by using a Message Authentication Code (MAC) with the RC4 encryption algorithm. The authentication code does not provide cryptographic authentication; rather, it provides the equivalent of a checksum that can be used to determine if any errors were introduced within the cipher bytes. The MAC guards against transmission or retrieval errors, but it may not detect deliberate tampering with the data.

Message Digests

A message digest (also sometimes referred to as a one-way hash function) is a fixed- length computationally unique identifier corresponding to a set of data. That is, each unit of data (for example, a file, a string, or a buffer) will map to a particular short block, called a message digest. It is not random: digesting the same unit of data with the same message digest algorithm will always produce the same short block.

A good message digest algorithm possesses the following qualities:

The algorithm accepts any input data length.

The algorithm produces a fixed length output for any input data.

C h a p t e r 3 C r y p t o g r a p h y

4 7

Page 69
Image 69
RSA Security 5.2.2 manual Message Digests, RC4 algorithm with MAC