NBch3 1
NBch3 1
Essentials
Fifth Edition
by William Stallings
Chapter 3
Public Key Cryptography and
Message Authentication
In addition to message confidentiality, message authentication is
an important network security function.
This chapter examines three aspects of message authentication.
•message authentication codes and hash functions to provide
message authentication.
•public-key encryption principles and two specific public-key
algorithms and the exchange of conventional encryption keys.
•public-key encryption to produce digital signatures, which
provides an enhanced form of message Authentication.
Approaches to Message
Authentication
• Conventional encryption
• Message authentication code (MAC)
• One-way Hash Functions
Approaches to Message
Authentication
• Using conventional encryption
M MD
variable-size H fixed-size
Secure Hash Functions
• Is important not only • H can be applied to a block of data of any size.
1.
in message
authentication but in • H produces a fixed-length output.
digital signatures 2.
• H(x) is relatively easy to compute for any given x, making both hardware
• Purpose is to produce and software implementations practical.
3.
a “fingerprint” of a
file, message, or other • For any given code h, it is computationally infeasible to find x such that
H(x) = h. A hash function with this property is referred to as one-way or
block of data 4. preimage resistant.
• To be useful for • For any given block x, it is computationally infeasible to find y x with
message H(y) = H(x). A hash function with this property is referred to as second
5. preimage resistant. This is sometimes referred to as weak collision resistant.
authentication, a hash
function H must have • It is computationally infeasible to find any pair (x, y) such that H(x) =
the following H(y).
• A hash function with this property is referred to as collision resistant. This
6.
properties: is sometimes referred to as strong collision resistant.
Security of Hash Functions
• There are two approaches to attacking a secure hash
function:
• Cryptanalysis
• Involves exploiting logical weaknesses in the algorithm
• Brute-force attack
• The strength of a hash function against this attack depends
solely on the length of the hash code produced by the algorithm
The sha Secure Hash function
• SHA was developed by NIST and published as a federal
information processing standard (FIPS 180) in 1993
• Was revised in 1995 as SHA-1 and published as FIPS 180-1
• The actual standards document is entitled “Secure Hash Standard”
• Based on the hash function MD4 and its design closely models
MD4
• Produces 160-bit hash values
Basic
requirements
that must be
satisfied by any
candidate for
SHA-3
HMAC
• There has been an increased interest in developing a MAC derived from
a cryptographic hash code, such as SHA-1
• Cryptographic hash functions generally execute faster in software than
conventional encryption algorithms such as DES
• Library code for cryptographic hash functions is widely available
• A hash function such as SHA-1 was not designed for use as a MAC and
cannot be used directly for that purpose because it does not rely on a secret
key