Cryptography 4 Flashcards
“randomizing” the plaintext using the previous ciphertext block. Equal plaintext blocks will typically encrypt to different ciphertext blocks, significantly reducing the information available to an attacker.
Cipher Block Chaining (CBC)
If two different messages start with the same plaintext block, their encryptions will start with the same ciphertext blocks.
Fixed IV
where first message for IV = 0, then second message for IV = 1 etc …
Counter IV
is different in that the message itself is never used as an input to the block cipher. Instead, the block cipher is used to generate a pseudorandom stream of bytes (called the key stream), which in turn is XORed with the plaintext to generate the ciphertext. An encryption scheme that generates such a random key stream is called a stream cipher. Dangerous to use same IV for 2 different messages, also doesnt use padding, One advantage of OFB is that decryption is exactly the same operation as encryption, which saves on implementation effort.
Output feedback mode (OFB)
block cipher, uses a remarkably simple method to generate the key stream. It concatenates the nonce with the counter value, and encrypts it to form a single block of the key stream. This requires that the counter and the nonce fit in a single block.
CTR
The ideal hash function behaves like a random mapping from all possible input values to the set of all possible output values.
An attack on a hash function is a non-generic method of distinguishing the hash function from an ideal hash function.
if an attack could be used to distinguish between two ideal hash functions, then it doesn’t exploit any property of the hash function itself and it is a generic attack.
info …
birthday attack looks for collisions.
This attack exploits a specific weakness in how this hash function was designed, and hence this attack is non-generic.
MD5 : 128-bit hash function, has 4 rounds w/32-bit operations.
info #2 …
A message authentication code, or MAC, is a construction that detects tampering with messages.
An ideal MAC function is a random mapping from all possible inputs to n-bit outputs.
MAC
is a classic method of turning a block cipher into a MAC. The key K is used as the block cipher key. The idea behind CBC-MAC is to encrypt the message m using CBC mode and then throw away all but the last block of ciphertext.
HMAC-SHA-256 is best MAC to choose …
CBC-MAC Etc …
designed for 128-bit block ciphers. GMAC authentication function takes three values as input—the key, the message to authenticate, and a nonce. Recall that a nonce is a value that is only ever used once.
GMAC