>> Now we'll talk about MAC, Message Authentication Codes.
Now, earlier we talked about hashes and how hashes
are only good for detecting unintentional modification.
For example, when there's
corruption because a packet is dropped
while a message is being sent
but there is no malicious intent.
Then we talked about a digital signature that
can detect malicious modification.
In this case, not only is the file hashed,
but the file is encrypted
>> with the sender's private key.
>> Only the sender can encrypt
something with their private key.
We get authenticity and integrity
together, which is non-repudiation.
A digital signature is great.
But a digital signature
>> requires something called a PKI,
>> or Public Key Infrastructure.
You don't have to know what that is yet.
We'll go into it later.
But anytime you hear the word infrastructure,
you know it's going to have a lot of overhead.
Infrastructure is going to take resources,
money, time, and staff.
It's going to be an ongoing effort to maintain
it and you have to monitor and evaluate it.
It's not easy to have a PKI
and it's not good enough to just use a hash.
What I'd really like is
>> to have something in the middle.
>> What if we had something that
gives us reasonable insurance
against intentional
modification without all the overhead.
That's exactly what MAC is.
Now, you'll see the acronym MAC
>> used for a lot of things.
>> But in this case, what it stands
for is a Message Authentication Code.
You also hear the terms Hash MAC or HMAC.
An HMAC requires that both parties agree
on something. Often it's a password.
Each party enters a password on
their routers or whatever device that they're using.
A key is created based on the password.
As long as you both enter the same password,
you have the same key.
That's symmetric cryptography.
What happens is that the message is [inaudible]
with the secret number, the symmetric key,
and then put through a hashing
algorithm so that each block
includes knowledge of the symmetric key
and grants integrity from the message.
Only those two parties should know the symmetric key.
Then we get a reasonable degree of
authenticity and begin integrity.
Now, remember, you'll never get true authenticity with
symmetric cryptography
because two parties know the same key.
Either party could be to blame
if the information is leaked.
However, you can have
a reasonable understanding that if the key
is only shared between two parties and the key is used,
then one of the two parties used it.
MAC is better than a hash,
but not as elaborate as a digital signature,
which requires so much infrastructure.
A MAC is often used with applications or services.
Don't forget, a MAC is a message plus
a symmetric key shared between
two parties that goes through a hashing algorithm.
The resulting effect is a Hash MAC.