Message Auth Codes, Digital signatures, Enity Auth Flashcards
What is the purpose of a hash function?
How does a cryptographic hash function work?
they accept a variable size message (m) and produce a fixed-size message digest h(m)
What is the input to a cryptographic hash function often called?
The pre-image
What is the output of a hash function often called?
The image or hash value
What are the three important properties of cryptographic hash functions?
- Preimage resistance
- Second preimage resistance
- Collision resistance
What is preimage resistance?
Given an output (hash) z and the function h, it should be computationally
impossible to find any input x such that h(x) = z.
What is second pre-image resistance?
Given an input x and its hash value, it should be computationally impossible to find any other input that produce the hash value
What is collision resistance?
Given the function h, it should be computationally impossible to find a
collision, that is, two different inputs such that h(x1) = h(x2)
What is the difference between second preimage resistance and collision resistance?
SPIR deals with the prevention of finding another input to produce the same output as a known input whereas with collision resistance, it prevents finding two unknown inputs which produce the same output (for SPIR, at least one input value is known)
What are some cryptographic hash function applications that require the key properties?
- Preimage resistance - password storage protection
- Second preimage resistance - software downloading with hash of executable
- Collision resistance - sending IOU messsages
What is a message authentication code (MAC)?
a cryptographic checksum which is sent along with a message in order to provide assurance of data origin authentication
Process of using MAC (5)
- MAC is generated depending on the content of the message and a shared secret key
- MAC is appended to the end of the message
- The sender sends the message
- Recipient who also knows the secret key calculates the MAC on the message and compares it with the MAC received
- Any changes in the messages are noticed if the calculated MAC does not match the received MAC
How does a message authentication code ensure data origin authentication?
The message must have been sent by the sender since they are the only other person that has access to the shared key which is used to produce the identical MAC upon receiving the message
Types of message authentication code generation (2)
CBC-MAC
HMAC
What is authenticated encryption?
a cryptographic process that combines both encryption and message authentication to provide confidentiality, integrity, and data origin authenticition
Benefits of using authenticated encryption primitives (4)
- No need to maintain two symmetric keys (MAC-then-encrypt & encrypt-then-MAC)
- No need for the processing costs involved with using two primitives
- There are some security concerns with combining two primitives
- Much easier to run a single cryptographic operation in hardware