MAC, HMAC & DigitalSignature (week 5) Flashcards
what does mac stand for ?
Message Authentication Code
what is mac used for ?
MAC is used to ensure the integrity and authenticity of the message
what are 3 mac algorithms
Key generation Algorithm
–> Select a random cryptographic key
Signing Algorithm
–> Returns a MAC from the message and the key
Verifying Algorithm
–> Verify the message’s authenticity and integrity
sender and receiver must _____ in mac
share a secret cryptographic key (a shared secret)
why is mac weak on non repudiation
MAC is weak on non-repudiation as multiple parties may possess the same key.
what is authenticity
Authenticity verifies the sender’s identity and the source of the message.
what is non repudiation
Non-repudiation is a procedural, legal concept that proves the legitimacy of a message or data transfer by providing undeniable evidence of both authenticity and integrity
what are the steps for MAC creation and verification steps
- Bob calculates MAC 1 using a cryptographic key and plaintext message.
- Bob sends the message and MAC 1 to Alice.
- Alice calculates MAC 2 using the same key and message and compares MAC 1 with MAC 2:
- If they are equal, the message is good.
- Else, the message is rejected.
who should know the mac key and why
The key must be known only to the sender and receiver to support authenticity.
give a scenario where the mac has been compromised by the attacker
If the attacker (Eve) changes the message but not the MAC, the receiver will calculate a different MAC from the message and conclude that message integrity has been violated.
* The attacker does not have the
cryptographic key to re-compute
and replace the MAC
what is siphashs
add–rotate–xor (ARX) based pseudo-random
MAC function optimized for short inputs
what does siphash compute
computes a 64-bit MAC from a message
128-bit secret key
MAC algorithms can also be constructed from ?
hash functions (HMAC)
block cipher algorithms
what is HMAC
HMAC is a specific type of message authentication code (MAC) involving a cryptographic hash function and a secret cryptographic key.
what are some challenges with HMAC
- Multiple recipients using multiple keys need a key management process/system
- Multiple recipients using a single shared key has an authentication problem