Message Authentication Codes
Ramki Thurimella
MAC
Also called keyed hash function
Used for Authentication, i.e. stopping Eve
from tampering the message in transit
MAC(K,m) is a fixed size value, referred to as
the tag for m
2
MAC Uses
Not suitable for dig
Block Ciphers Modes
Ramki Thurimella
Only Encryption
I.e. messages could be modified
Should not assume that nonsensical
messages do no harm
Always must be combined with authentication
2
Padding
Must be reversible
Simply adding enough 0s at the end until t
Hash Functions
Ramki Thurimella
What is a hash function?
Also known as message digest or fingerprint
Compression: A function that maps arbitrarily long
binary strings to fixed length binary strings
Ease of Computation : Given a hash function and an
input
The Secure Channel
Ramki Thurimella
Secure Channel Properties
Roles
AliceBob (ServerClient)
Direction of flow
Eve
Delete, Insert, or modify data in transit
Can be created for storage
Think of it as transmitting it into the future
Both Alice & Bob the same
Block Ciphers
Ramki Thurimella
What is a block cipher?
Encryption function for fixed-size blocks of
data
Currently 128 bits = 16 bytes
Block cipher, unlike a hash function, is
reversible
sizeof(plaintext)=sizeof(ciphertext)block size
denoted b
Need a key
Generating Randomness
Ramki Thurimella
Entropy
Measures randomness. Higher the entropy, higher
the randomness.
If all 32-bit patterns from 232 patterns are equally
likely, then each pattern has 32 bits of entropy.
If only 4 patterns are likely, each with
Diffie-Hellman-Merkle
Ramki Thurimella
Key Exchange Protocol
Establishing secret keys for N people
Requires N(N-1)/2 separate keys
This is a quadratic function that grows rapidly
For e.g., when N=30, you need 435 keys
DH protocol was invented to reduce th
RSA
Ramki Thurimella
Public-Key Cryptography
Symmetric cryptography: same key is used for
encryption and decryption.
Asymmetric cryptography: different keys used
for encryption and decryption.
Public-Key cryptography: an asymmetric
cryptography scheme whe