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
Limitation of message authentication codes?
Require symmetric key
What is a digital signature?
a cryptographic primitive that provides data origin authentication and non-repudiation by binding an entitu to some data
What security services do digital signatures provide? (2)
Data origin authentication & non-repudiation
What is a replay attack?
when an adversary captures a message, and then later replays it at some
advantageous time
Uses of hash functions (5)
- strong one-way functions e.g. for passwords
- to provide data integrity
- as components to build other cryptographic primitives (MACs)
- a means of binding data
- source of pseudorandomness
What are MACs also known as?
Keyed hash functions
What does the MAC depend on?
The contents of the message and the encrypted key
What is MAC forgery?
When an attacker who does not know the MAC key tries to come up with a MAC that is valid for a message which has not been legitimately sent
How do CBC encryption and CBC-MAC differ?
CBC-MAC does not require an initialisation vector because confidentiality is not a requirement and the message is known
What active attacks can compromise data origin authentication? (4)
- unauthorised changing of part of a message
- unauthorised deletion of part of a message
- unauthorised sending of a false message
- trying to persuade the receiver that the message came from someone other than it did
What determines the security of HMAC (3)?
- The security of the key
- The security of the hash function
- The length of the MAC output
How can an efficiency-security trade off be introduced when using MACs?
When deciding to use just a portion of the MAC
How can authenticated encryption be achieved? (2)
- Using separate primitives (MAC-then-encrypt or encrypt-then-MAC)
- Using authenticated encryption primitives
What is associated data in authenticated encryption?
Message data that only requires data origin authentication and not confidentiality e.g. packet header information
what is the key difference between MAC-then-encrypt and encrypt-then-MAC in relation to the MAC?
in encrypt-then-MAC the MAC is not encrypted and is instead sent in the clear
disadvantages of using two separate primitives for authenticated encryption (4)
- requires the management of two symmtric keys
- using two primitives requires two separate operations to run
- there are some security concerns with combining two primitives
- much easier to run a single primitive in hardware
which block cipher mode provides authenticated encryption?
galois/counter mode
what are freshness mechanisms?
techniques which can be used to provide assurance that a given message is
new in the sense that is is not a replay of a message sent at a previous time
what methods can be used to provide entity authentication? (3)
- clock-based mechanisms
- sequence numbers
- nonce-based mechanisms
What is required for nonce-based mechanisms?
Need to set a window of acceptance beyond which a nonce will no longer be required
What type of application is non-repudiation a vital service?
An application that requires evidence that a particular entity has generated some data, often at a specific moment in time (business applications, where there is potential for dispute over exchanged data)
Why is a MAC mostly unsuitable for providing meaningful evidence to a third party?
A third party cannot tell whether the sender genuinely created the MAC or whether the receiver forged it using the shared key
what is the purpose of a digital signature?
to bind an entity to some data in a way that can be independently checked by a third party
what are digital signatures based on?
public-key cryptography (RSA)