UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORKjeevasreemurali
This document discusses authentication techniques including message authentication codes (MACs) and hash functions. It provides details on:
1. MACs generate a signature for a message to validate authenticity and integrity. Common MAC algorithms discussed are HMAC and CMAC.
2. Hash functions condense messages to fixed lengths. Popular hash functions discussed are MD5, SHA, and their design and security properties.
3. Digital signatures combine hash functions with asymmetric encryption to provide authentication, integrity, and non-repudiation. Signature protocols like DSS are mentioned.
This document discusses message authentication techniques including message encryption, message authentication codes (MACs), and hash functions. It describes how each technique can be used to authenticate messages and protect against various security threats. It also covers how symmetric and asymmetric encryption can provide authentication when used with MACs or digital signatures. Specific MAC and hash functions are examined like HMAC, SHA-1, and SHA-2. X.509 is introduced as a standard for digital certificates.
This document provides an overview of message authentication and integrity. It discusses the need for authentication in network security and outlines different authentication functions including message encryption, message authentication codes (MACs), and hash functions. It describes how MACs are generated using a secret key and message and provides the requirements for MACs. The document also discusses the MD5 and SHA hash algorithms, explaining their processes and analyzing their security strengths and weaknesses.
This material covers Authentication requirement, Authentication function, MAC, Hash function, Security of hash function and MAC, SHA, Digital signature and authentication protocols, DSS, Authentication protocols like Kerberos and X.509, entity authentication
Message authentication and hash functionomarShiekh1
The document discusses message authentication and hash functions. It covers security requirements including integrity, authentication and non-repudiation. It describes different authentication functions such as message encryption, message authentication codes (MACs), and hash functions. It provides examples of how hash functions work and evaluates the security of hash functions and MACs against brute force and cryptanalytic attacks.
This document discusses message authentication and hash functions. It begins by defining message authentication and its security requirements. It then describes three approaches to message authentication: message encryption, message authentication codes (MACs), and hash functions. It provides details on how MACs and hash functions work, including properties and requirements. Specific algorithms like MD5 are also covered. The document aims to explain the concepts and tradeoffs between different message authentication techniques.
Information and data security cryptographic hash functionsMazin Alwaaly
This document discusses hash functions and their cryptographic applications. It begins by defining hash functions and their properties like one-wayness and collision resistance. It then discusses various applications of cryptographic hash functions like message authentication codes, digital signatures, password files, and more. It provides details on how hash functions are used for message authentication and digital signatures. It also describes the Secure Hash Algorithm family of hash functions like SHA-1, SHA-2, and the NIST competition for the SHA-3 standard.
Symmetric encryption suffers from several key distribution and management problems in modern distributed communication environments. Asymmetric encryption solves these issues by using public/private key pairs, allowing anyone to encrypt messages using the public key but only the private key holder can decrypt. Digital signatures, key certification through public key infrastructure (PKI), and hash functions are important applications of asymmetric cryptography.
Message Authentication and Hash Function.pdfsunil sharma
This document discusses message authentication techniques. It covers message authentication requirements such as preventing disclosure, modification, and repudiation of messages. It then describes various message authentication functions including hash-based MACs like HMAC, block cipher-based MACs like CMAC, and authenticated encryption modes like CCM and GCM. It also covers key wrapping and pseudorandom number generation using hash functions and MACs. The goal of message authentication codes and authenticated encryption is to verify that messages come from the alleged source and have not been altered.
This document discusses message authentication and encryption. It explains that message authentication aims to protect integrity, validate originator identity, and enable non-repudiation. Message encryption provides authentication if symmetric encryption is used, while public-key encryption requires signing. Message authentication codes (MACs) and hash functions are also examined. The MD5 algorithm is summarized, which takes an input of arbitrary length and produces a 128-bit fingerprint.
This document discusses message authentication and the different functions that can be used for message authentication: message encryption, hash functions, and message authentication codes (MACs). It outlines the security requirements for message authentication and describes how symmetric and public-key encryption, hash functions, and MACs can provide authentication. It provides details on how MACs work and their properties. It also discusses hash functions and how they are used for message integrity checks, message authentication codes, and digital signatures.
HASH FUNCTIONS AND DIGITAL SIGNATURES
Authentication requirement – Authentication function – MAC – Hash function – Security of hash function and MAC –MD5 – SHA – HMAC – CMAC – Digital signature and authentication protocols – DSS – EI Gamal – Schnorr.
Public-key cryptography uses message authentication codes (MACs) and digital signatures to verify the authenticity and integrity of messages. MACs are calculated using a secret key shared between the sender and receiver. Digital signatures are generated using the sender's private key and can be verified by the receiver using the sender's public key. Common MAC algorithms include HMAC, which uses a cryptographic hash function combined with a secret key. Asymmetric encryption algorithms like RSA enable confidential communication by encrypting messages with the public key while only the holder of the private key can decrypt.
This document summarizes hashing, authentication, and signature schemes. It discusses how hashing works by generating a unique tag or fingerprint for a message called a hash value. This hash value is attached to the message to allow the recipient to verify that the message has not been corrupted by regenerating the hash and comparing. Popular hashing schemes like MD5, SHA-1, and RIPEMD-160 are described in detail, including how they use iterative hashing to generate 160-bit hash values through multiple rounds of processing message blocks. The properties of pre-image resistance, second pre-image resistance, and collision resistance that make for a secure hashing function are also summarized.
This document discusses hash functions and their analysis for a network security seminar. It begins by defining a hash function as a mathematical function that converts a large amount of data into a small string of integers. Common applications of hash functions include hash tables for quickly searching data, eliminating data redundancy, caches, bloom filters, and pattern matching. Cryptographic hash functions have properties like preimage and second preimage resistance as well as collision resistance. Popular cryptographic hash functions discussed include MD2, MD4, MD5, SHA-1, and SHA-2, along with their advantages, limitations, and examples of attacks.
This document discusses techniques for distributing public keys and Hash-based Message Authentication Code (HMAC). It begins with an overview of public key cryptography and the need for secure key distribution. It then describes several approaches for distributing public keys, including using a public key authority, public key certificates, and a publicly available directory. The document also provides background on HMAC, describing how it uses cryptographic hash functions and a secret key to authenticate messages and ensure integrity. It includes the HMAC algorithm details, parameters, and a graphical representation of the process.
Message authentication aims to protect message integrity and validate origin. It can be achieved through message encryption, message authentication codes (MACs), or hash functions. MACs provide authentication by appending a cryptographic checksum to the message. Hash functions condense variable-length messages into fixed-length fingerprints. Both MACs and hash functions must be resistant to preimage and collision attacks to ensure security. Block ciphers and iterated hash functions are commonly used to build MACs and hash functions, but may be vulnerable to cryptanalysis exploiting weaknesses in their round functions. Larger than 64-bit MACs and hashes are typically recommended to prevent birthday attacks.
2.15 Message Authentication Code and Hash Functions.pptxgirilogu2
The document discusses hash functions and their applications in message authentication. It defines a hash function as accepting a variable-length input and producing a fixed-size output hash value. A good hash function results in different outputs for any change to the input. The document outlines requirements for hash functions including producing fixed-length outputs, easy computation, and collision resistance. It describes simple hash functions using bitwise XOR of blocks and more secure hash algorithms like Secure Hash Algorithm (SHA).
Cryptography and Message Authentication NS3koolkampus
This document provides an overview of approaches to message authentication and public-key cryptography. It discusses secure hash functions like SHA-1 and HMAC for message authentication codes. For public-key cryptography, it describes the principles including key distribution and encryption/decryption with public/private key pairs. Specific public-key algorithms covered are RSA, Diffie-Hellman key exchange, and their applications for encryption, digital signatures, and key exchange. Requirements and examples of the RSA algorithm are also summarized.
1. Digital signatures provide authentication of digital documents by using asymmetric cryptography techniques. A digital signature is generated using a private key and can be verified by anyone using the corresponding public key.
2. There are various types of attacks against digital signature schemes like key-only attacks, generic chosen message attacks, and adaptive chosen message attacks. The security goals are to prevent total key breaks or the ability to forge signatures selectively or existentially.
3. A secure digital signature scheme must produce signatures that depend on the message, use secret information to prevent forgery and denial, be efficient to generate and verify, and make forgery computationally infeasible. Timestamps can be included to require message freshness.
Nate Lawson presents an overview of the TLS/SSL protocol design. He discusses the security goals of privacy, integrity, and authentication. He explains how these goals are achieved using cryptography primitives like symmetric encryption, public key encryption, certificates, message authentication codes, and secure PRNGs. He walks through the TLS handshake protocol in detail and discusses various attacks against SSL/TLS like side channel attacks, similarly-named certificate attacks, and data injection via renegotiation attacks.
この資料は、Roy FieldingのREST論文(第5章)を振り返り、現代Webで誤解されがちなRESTの本質を解説しています。特に、ハイパーメディア制御やアプリケーション状態の管理に関する重要なポイントをわかりやすく紹介しています。
This presentation revisits Chapter 5 of Roy Fielding's PhD dissertation on REST, clarifying concepts that are often misunderstood in modern web design—such as hypermedia controls within representations and the role of hypermedia in managing application state.
Ad
More Related Content
Similar to SHA New Revised Version - SHA-512 Syllabus Module 3 (20)
Message Authentication and Hash Function.pdfsunil sharma
This document discusses message authentication techniques. It covers message authentication requirements such as preventing disclosure, modification, and repudiation of messages. It then describes various message authentication functions including hash-based MACs like HMAC, block cipher-based MACs like CMAC, and authenticated encryption modes like CCM and GCM. It also covers key wrapping and pseudorandom number generation using hash functions and MACs. The goal of message authentication codes and authenticated encryption is to verify that messages come from the alleged source and have not been altered.
This document discusses message authentication and encryption. It explains that message authentication aims to protect integrity, validate originator identity, and enable non-repudiation. Message encryption provides authentication if symmetric encryption is used, while public-key encryption requires signing. Message authentication codes (MACs) and hash functions are also examined. The MD5 algorithm is summarized, which takes an input of arbitrary length and produces a 128-bit fingerprint.
This document discusses message authentication and the different functions that can be used for message authentication: message encryption, hash functions, and message authentication codes (MACs). It outlines the security requirements for message authentication and describes how symmetric and public-key encryption, hash functions, and MACs can provide authentication. It provides details on how MACs work and their properties. It also discusses hash functions and how they are used for message integrity checks, message authentication codes, and digital signatures.
HASH FUNCTIONS AND DIGITAL SIGNATURES
Authentication requirement – Authentication function – MAC – Hash function – Security of hash function and MAC –MD5 – SHA – HMAC – CMAC – Digital signature and authentication protocols – DSS – EI Gamal – Schnorr.
Public-key cryptography uses message authentication codes (MACs) and digital signatures to verify the authenticity and integrity of messages. MACs are calculated using a secret key shared between the sender and receiver. Digital signatures are generated using the sender's private key and can be verified by the receiver using the sender's public key. Common MAC algorithms include HMAC, which uses a cryptographic hash function combined with a secret key. Asymmetric encryption algorithms like RSA enable confidential communication by encrypting messages with the public key while only the holder of the private key can decrypt.
This document summarizes hashing, authentication, and signature schemes. It discusses how hashing works by generating a unique tag or fingerprint for a message called a hash value. This hash value is attached to the message to allow the recipient to verify that the message has not been corrupted by regenerating the hash and comparing. Popular hashing schemes like MD5, SHA-1, and RIPEMD-160 are described in detail, including how they use iterative hashing to generate 160-bit hash values through multiple rounds of processing message blocks. The properties of pre-image resistance, second pre-image resistance, and collision resistance that make for a secure hashing function are also summarized.
This document discusses hash functions and their analysis for a network security seminar. It begins by defining a hash function as a mathematical function that converts a large amount of data into a small string of integers. Common applications of hash functions include hash tables for quickly searching data, eliminating data redundancy, caches, bloom filters, and pattern matching. Cryptographic hash functions have properties like preimage and second preimage resistance as well as collision resistance. Popular cryptographic hash functions discussed include MD2, MD4, MD5, SHA-1, and SHA-2, along with their advantages, limitations, and examples of attacks.
This document discusses techniques for distributing public keys and Hash-based Message Authentication Code (HMAC). It begins with an overview of public key cryptography and the need for secure key distribution. It then describes several approaches for distributing public keys, including using a public key authority, public key certificates, and a publicly available directory. The document also provides background on HMAC, describing how it uses cryptographic hash functions and a secret key to authenticate messages and ensure integrity. It includes the HMAC algorithm details, parameters, and a graphical representation of the process.
Message authentication aims to protect message integrity and validate origin. It can be achieved through message encryption, message authentication codes (MACs), or hash functions. MACs provide authentication by appending a cryptographic checksum to the message. Hash functions condense variable-length messages into fixed-length fingerprints. Both MACs and hash functions must be resistant to preimage and collision attacks to ensure security. Block ciphers and iterated hash functions are commonly used to build MACs and hash functions, but may be vulnerable to cryptanalysis exploiting weaknesses in their round functions. Larger than 64-bit MACs and hashes are typically recommended to prevent birthday attacks.
2.15 Message Authentication Code and Hash Functions.pptxgirilogu2
The document discusses hash functions and their applications in message authentication. It defines a hash function as accepting a variable-length input and producing a fixed-size output hash value. A good hash function results in different outputs for any change to the input. The document outlines requirements for hash functions including producing fixed-length outputs, easy computation, and collision resistance. It describes simple hash functions using bitwise XOR of blocks and more secure hash algorithms like Secure Hash Algorithm (SHA).
Cryptography and Message Authentication NS3koolkampus
This document provides an overview of approaches to message authentication and public-key cryptography. It discusses secure hash functions like SHA-1 and HMAC for message authentication codes. For public-key cryptography, it describes the principles including key distribution and encryption/decryption with public/private key pairs. Specific public-key algorithms covered are RSA, Diffie-Hellman key exchange, and their applications for encryption, digital signatures, and key exchange. Requirements and examples of the RSA algorithm are also summarized.
1. Digital signatures provide authentication of digital documents by using asymmetric cryptography techniques. A digital signature is generated using a private key and can be verified by anyone using the corresponding public key.
2. There are various types of attacks against digital signature schemes like key-only attacks, generic chosen message attacks, and adaptive chosen message attacks. The security goals are to prevent total key breaks or the ability to forge signatures selectively or existentially.
3. A secure digital signature scheme must produce signatures that depend on the message, use secret information to prevent forgery and denial, be efficient to generate and verify, and make forgery computationally infeasible. Timestamps can be included to require message freshness.
Nate Lawson presents an overview of the TLS/SSL protocol design. He discusses the security goals of privacy, integrity, and authentication. He explains how these goals are achieved using cryptography primitives like symmetric encryption, public key encryption, certificates, message authentication codes, and secure PRNGs. He walks through the TLS handshake protocol in detail and discusses various attacks against SSL/TLS like side channel attacks, similarly-named certificate attacks, and data injection via renegotiation attacks.
この資料は、Roy FieldingのREST論文(第5章)を振り返り、現代Webで誤解されがちなRESTの本質を解説しています。特に、ハイパーメディア制御やアプリケーション状態の管理に関する重要なポイントをわかりやすく紹介しています。
This presentation revisits Chapter 5 of Roy Fielding's PhD dissertation on REST, clarifying concepts that are often misunderstood in modern web design—such as hypermedia controls within representations and the role of hypermedia in managing application state.
Dear SICPA Team,
Please find attached a document outlining my professional background and experience.
I remain at your disposal should you have any questions or require further information.
Best regards,
Fabien Keller
The main purpose of the current study was to formulate an empirical expression for predicting the axial compression capacity and axial strain of concrete-filled plastic tubular specimens (CFPT) using the artificial neural network (ANN). A total of seventy-two experimental test data of CFPT and unconfined concrete were used for training, testing, and validating the ANN models. The ANN axial strength and strain predictions were compared with the experimental data and predictions from several existing strength models for fiber-reinforced polymer (FRP)-confined concrete. Five statistical indices were used to determine the performance of all models considered in the present study. The statistical evaluation showed that the ANN model was more effective and precise than the other models in predicting the compressive strength, with 2.8% AA error, and strain at peak stress, with 6.58% AA error, of concrete-filled plastic tube tested under axial compression load. Similar lower values were obtained for the NRMSE index.
Construction Materials (Paints) in Civil EngineeringLavish Kashyap
This file will provide you information about various types of Paints in Civil Engineering field under Construction Materials.
It will be very useful for all Civil Engineering students who wants to search about various Construction Materials used in Civil Engineering field.
Paint is a vital construction material used for protecting surfaces and enhancing the aesthetic appeal of buildings and structures. It consists of several components, including pigments (for color), binders (to hold the pigment together), solvents or thinners (to adjust viscosity), and additives (to improve properties like durability and drying time).
Paint is one of the material used in Civil Engineering field. It is especially used in final stages of construction project.
Paint plays a dual role in construction: it protects building materials and contributes to the overall appearance and ambiance of a space.
Newly poured concrete opposing hot and windy conditions is considerably susceptible to plastic shrinkage cracking. Crack-free concrete structures are essential in ensuring high level of durability and functionality as cracks allow harmful instances or water to penetrate in the concrete resulting in structural damages, e.g. reinforcement corrosion or pressure application on the crack sides due to water freezing effect. Among other factors influencing plastic shrinkage, an important one is the concrete surface humidity evaporation rate. The evaporation rate is currently calculated in practice by using a quite complex Nomograph, a process rather tedious, time consuming and prone to inaccuracies. In response to such limitations, three analytical models for estimating the evaporation rate are developed and evaluated in this paper on the basis of the ACI 305R-10 Nomograph for “Hot Weather Concreting”. In this direction, several methods and techniques are employed including curve fitting via Genetic Algorithm optimization and Artificial Neural Networks techniques. The models are developed and tested upon datasets from two different countries and compared to the results of a previous similar study. The outcomes of this study indicate that such models can effectively re-develop the Nomograph output and estimate the concrete evaporation rate with high accuracy compared to typical curve-fitting statistical models or models from the literature. Among the proposed methods, the optimization via Genetic Algorithms, individually applied at each estimation process step, provides the best fitting result.
Several studies have established that strength development in concrete is not only determined by the water/binder ratio, but it is also affected by the presence of other ingredients. With the increase in the number of concrete ingredients from the conventional four materials by addition of various types of admixtures (agricultural wastes, chemical, mineral and biological) to achieve a desired property, modelling its behavior has become more complex and challenging. Presented in this work is the possibility of adopting the Gene Expression Programming (GEP) algorithm to predict the compressive strength of concrete admixed with Ground Granulated Blast Furnace Slag (GGBFS) as Supplementary Cementitious Materials (SCMs). A set of data with satisfactory experimental results were obtained from literatures for the study. Result from the GEP algorithm was compared with that from stepwise regression analysis in order to appreciate the accuracy of GEP algorithm as compared to other data analysis program. With R-Square value and MSE of -0.94 and 5.15 respectively, The GEP algorithm proves to be more accurate in the modelling of concrete compressive strength.
This research is oriented towards exploring mode-wise corridor level travel-time estimation using Machine learning techniques such as Artificial Neural Network (ANN) and Support Vector Machine (SVM). Authors have considered buses (equipped with in-vehicle GPS) as the probe vehicles and attempted to calculate the travel-time of other modes such as cars along a stretch of arterial roads. The proposed study considers various influential factors that affect travel time such as road geometry, traffic parameters, location information from the GPS receiver and other spatiotemporal parameters that affect the travel-time. The study used a segment modeling method for segregating the data based on identified bus stop locations. A k-fold cross-validation technique was used for determining the optimum model parameters to be used in the ANN and SVM models. The developed models were tested on a study corridor of 59.48 km stretch in Mumbai, India. The data for this study were collected for a period of five days (Monday-Friday) during the morning peak period (from 8.00 am to 11.00 am). Evaluation scores such as MAPE (mean absolute percentage error), MAD (mean absolute deviation) and RMSE (root mean square error) were used for testing the performance of the models. The MAPE values for ANN and SVM models are 11.65 and 10.78 respectively. The developed model is further statistically validated using the Kolmogorov-Smirnov test. The results obtained from these tests proved that the proposed model is statistically valid.
Welcome to the May 2025 edition of WIPAC Monthly celebrating the 14th anniversary of the WIPAC Group and WIPAC monthly.
In this edition along with the usual news from around the industry we have three great articles for your contemplation
Firstly from Michael Dooley we have a feature article about ammonia ion selective electrodes and their online applications
Secondly we have an article from myself which highlights the increasing amount of wastewater monitoring and asks "what is the overall" strategy or are we installing monitoring for the sake of monitoring
Lastly we have an article on data as a service for resilient utility operations and how it can be used effectively.
The TRB AJE35 RIIM Coordination and Collaboration Subcommittee has organized a series of webinars focused on building coordination, collaboration, and cooperation across multiple groups. All webinars have been recorded and copies of the recording, transcripts, and slides are below. These resources are open-access following creative commons licensing agreements. The files may be found, organized by webinar date, below. The committee co-chairs would welcome any suggestions for future webinars. The support of the AASHTO RAC Coordination and Collaboration Task Force, the Council of University Transportation Centers, and AUTRI’s Alabama Transportation Assistance Program is gratefully acknowledged.
This webinar overviews proven methods for collaborating with USDOT University Transportation Centers (UTCs), emphasizing state departments of transportation and other stakeholders. It will cover partnerships at all UTC stages, from the Notice of Funding Opportunity (NOFO) release through proposal development, research and implementation. Successful USDOT UTC research, education, workforce development, and technology transfer best practices will be highlighted. Dr. Larry Rilett, Director of the Auburn University Transportation Research Institute will moderate.
For more information, visit: https://aub.ie/trbwebinars
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...AI Publications
The escalating energy crisis, heightened environmental awareness and the impacts of climate change have driven global efforts to reduce carbon emissions. A key strategy in this transition is the adoption of green energy technologies particularly for charging electric vehicles (EVs). According to the U.S. Department of Energy, EVs utilize approximately 60% of their input energy during operation, twice the efficiency of conventional fossil fuel vehicles. However, the environmental benefits of EVs are heavily dependent on the source of electricity used for charging. This study examines the potential of renewable energy (RE) as a sustainable alternative for electric vehicle (EV) charging by analyzing several critical dimensions. It explores the current RE sources used in EV infrastructure, highlighting global adoption trends, their advantages, limitations, and the leading nations in this transition. It also evaluates supporting technologies such as energy storage systems, charging technologies, power electronics, and smart grid integration that facilitate RE adoption. The study reviews RE-enabled smart charging strategies implemented across the industry to meet growing global EV energy demands. Finally, it discusses key challenges and prospects associated with grid integration, infrastructure upgrades, standardization, maintenance, cybersecurity, and the optimization of energy resources. This review aims to serve as a foundational reference for stakeholders and researchers seeking to advance the sustainable development of RE based EV charging systems.
2. Announcements
• HW1 due on Sept 5
• Quiz 1 will be on Sept 10, covering topics 1-5
• Both projects will be allow a team of two
– May want to start forming teams
• Mid-term exam tentatively scheduled to be Tuesday
Oct 15, during lecture time
CS526 Topic 5: Hash Functions and
Message Authentication
2
3. CS526 Topic 5: Hash Functions and
Message Authentication
3
Readings for This Lecture
• Wikipedia
• Cryptographic Hash Function
s
• Message Authentication Cod
e
4. CS526 Topic 5: Hash Functions and
Message Authentication
4
Data Integrity and Source
Authentication
• Encryption does not protect data from modification
by another party.
• Why?
• Need a way to ensure that data arrives at destination
in its original form as sent by the sender and it is
coming from an authenticated source.
5. Hash Functions
• A hash function maps a message of an arbitrary length to
a m-bit output
– output known as the fingerprint or the message digest
• What is an example of hash functions?
– Give a hash function that maps Strings to integers in [0,2^{32}-1]
• Cryptographic hash functions are hash functions with
additional security requirements
CS526 Topic 5: Hash Functions and
Message Authentication
5
6. CS526 Topic 5: Hash Functions and
Message Authentication
6
Using Hash Functions for Message
Integrity
• Method 1: Uses a Hash Function h, assuming an
authentic (adversary cannot modify) channel for short
messages
– Transmit a message M over the normal (insecure) channel
– Transmit the message digest h(M) over the secure channel
– When receiver receives both M’ and h, how does the receiver
check to make sure the message has not been modified?
• This is insecure. How to attack it?
• A hash function is a many-to-one function, so collisions
can happen.
7. CS526 Topic 5: Hash Functions and
Message Authentication
7
Security Requirements for
Cryptographic Hash Functions
Given a function h:X Y, then we say that h is:
• preimage resistant (one-way):
if given y Y it is computationally infeasible to find a
value x X s.t. h(x) = y
• 2-nd preimage resistant (weak collision resistant):
if given x X it is computationally infeasible to find a
value x’ X, s.t. x’x and h(x’) = h(x)
• collision resistant (strong collision resistant):
if it is computationally infeasible to find two distinct
values x’,x X, s.t. h(x’) = h(x)
8. CS526 Topic 5: Hash Functions and
Message Authentication
8
Usages of Cryptographic Hash
Functions
• Software integrity
– E.g., tripwire
• Timestamping
– How to prove that you have discovered a secret on an
earlier date without disclosing it?
• Covered later
– Message authentication
– One-time passwords
– Digital signature
9. CS526 Topic 5: Hash Functions and
Message Authentication
9
Bruteforce Attacks on Hash Functions
• Attacking one-wayness
– Goal: given h:XY, yY, find x such that h(x)=y
– Algorithm:
• pick a random value x in X, check if h(x)=y, if
h(x)=y, returns x; otherwise iterate
• after failing q iterations, return fail
– The average-case success probability is
– Let |Y|=2m
, to get to be close to 0.5, q 2m-1
|
|
|
|
1
1
1
Y
q
Y
q
10. CS526 Topic 5: Hash Functions and
Message Authentication
10
Bruteforce Attacks on Hash Functions
• Attacking collision resistance
– Goal: given h, find x, x’ such that h(x)=h(x’)
– Algorithm: pick a random set X0 of q values in X for
each xX0, computes yx=h(x) if yx=yx’ for some x’x
then return (x,x’) else fail
– The average success probability is
– Let |Y|=2m
, to get to be close to 0.5, q 2m/2
– This is known as the birthday attack.
1
|
|
1
1
1 |
|
2
)
1
(
2
)
1
(
Y
q
q
q
q
e
Y
11. CS526 Topic 5: Hash Functions and
Message Authentication
11
Well Known Hash Functions
• MD5
– output 128 bits
– collision resistance completely broken by researchers in China in
2004
• SHA1
– output 160 bits
– no collision found yet, but method exist to find collisions in less than
2^80
– considered insecure for collision resistance
– one-wayness still holds
• SHA2 (SHA-224, SHA-256, SHA-384, SHA-512)
– outputs 224, 256, 384, and 512 bits, respectively
– No real security concerns yet
12. Merkle-Damgard Construction for
Hash Functions
CS526 Topic 5: Hash Functions and
Message Authentication
12
• Message is divided into fixed-size blocks and padded
• Uses a compression function f, which takes a chaining variable (of
size of hash output) and a message block, and outputs the next
chaining variable
• Final chaining variable is the hash value
M=m1m2…mn; C0=IV, Ci+1=f(Ci,mi); H(M)=Cn
13. NIST SHA-3 Competition
• NIST is having an ongoing competition for SHA-3, the next generation of
standard hash algorithms
• 2007: Request for submissions of new hash functions
• 2008: Submissions deadline. Received 64 entries. Announced first-round
selections of 51 candidates.
• 2009: After First SHA-3 candidate conference in Feb, announced 14
Second Round Candidates in July.
• 2010: After one year public review of the algorithms, hold second SHA-3
candidate conference in Aug. Announced 5 Third-round candidates in Dec.
• 2011: Public comment for final round
• 2012: October 2, NIST selected SHA3
– Keccak (pronounced “catch-ack”) created by Guido Bertoni, Joan Daemen and Gilles Van
Assche, Michaël Peeters
CS526 Topic 5: Hash Functions and
Message Authentication
13
14. The Sponge Construction: Used by
SHA-3
CS526 Topic 5: Hash Functions and
Message Authentication
14
• Each round, the next r bits of message is XOR’ed into the first r bits of the
state, and a function f is applied to the state.
• After message is consumed, output r bits of each round as the hash
output; continue applying f to get new states
• SHA-3 uses 1600 bits for state size
15. CS526 Topic 5: Hash Functions and
Message Authentication
15
Choosing the length of Hash outputs
• The Weakest Link Principle:
– A system is only as secure as its weakest link.
• Hence all links in a system should have similar levels of
security.
• Because of the birthday attack, the length of hash outputs
in general should double the key length of block ciphers
– SHA-224 matches the 112-bit strength of triple-DES (encryption
3 times using DES)
– SHA-256, SHA-384, SHA-512 match the new key lengths
(128,192,256) in AES
16. CS526 Topic 5: Hash Functions and
Message Authentication
16
Limitation of Using Hash Functions
for Authentication
• Require an authentic channel to transmit the
hash of a message
– Without such a channel, it is insecure, because
anyone can compute the hash value of any message,
as the hash function is public
– Such a channel may not always exist
• How to address this?
– use more than one hash functions
– use a key to select which one to use
17. CS526 Topic 5: Hash Functions and
Message Authentication
17
Hash Family
• A hash family is a four-tuple (X,Y,K,H ), where
– X is a set of possible messages
– Y is a finite set of possible message digests
– K is the keyspace
– For each KK, there is a hash function hKH . Each
hK: X Y
• Alternatively, one can think of H as a function
KXY
18. CS526 Topic 5: Hash Functions and
Message Authentication
18
Message Authentication Code
• A MAC scheme is a hash family, used for
message authentication
• MAC(K,M) = HK(M)
• The sender and the receiver share secret K
• The sender sends (M, Hk(M))
• The receiver receives (X,Y) and verifies that
HK(X)=Y, if so, then accepts the message as from
the sender
• To be secure, an adversary shouldn’t be able to
come up with (X’,Y’) such that HK(X’)=Y’.
19. Security Requirements for MAC
• Resist the Existential Forgery under Chosen Plaintext
Attack
– Challenger chooses a random key K
– Adversary chooses a number of messages M1, M2, .., Mn, and
obtains tj=MAC(K,Mj) for 1jn
– Adversary outputs M’ and t’
– Adversary wins if j M’≠Mj, and t’=MAC(K,M’)
• Basically, adversary cannot create the MAC for a
message for which it hasn’t seen an MAC
CS526 Topic 5: Hash Functions and
Message Authentication
19
20. Constructing MAC from Hash
Functions
• Let h be a one-way hash function
• MAC(K,M) = h(K || M), where || denote
concatenation
– Insecure as MAC
– Because of the Merkle-Damgard construction for hash
functions, given M and t=h(K || M), adversary can
compute M’=M||Pad(M)||X and t’, such that h(K||M’) =
t’
CS526 Topic 5: Hash Functions and
Message Authentication
20
21. CS526 Topic 5: Hash Functions and
Message Authentication
21
HMAC: Constructing MAC from
Cryptographic Hash Functions
• K+
is the key padded (with 0) to B bytes, the
input block size of the hash function
• ipad = the byte 0x36 repeated B times
• opad = the byte 0x5C repeated B times.
HMACK[M] = Hash[(K+
opad) || Hash[(K+
ipad)||M)]]
At high level, HMACK[M] = H(K || H(K || M))
22. CS526 Topic 5: Hash Functions and
Message Authentication
22
HMAC Security
• If used with a secure hash functions (e.g.,
SHA-256) and according to the specification
(key size, and use correct output), no known
practical attacks against HMAC
23. CS526 Topic 5: Hash Functions and
Message Authentication
23
Coming Attractions …
• Cryptography: Public Key
Cryptography
Editor's Notes
#4: Modified ciphertext can often still be decrypted into plaintexts?
#5: Example hash function: v:=1; for each character c, v=v*(c+1)+2 mod 2^{32};
#6: An authenticated channel for short messages bootstraps authenticity.
A short secret key in encryption boostraps confidentiality.
#10: Assuming |Y|=N. With q choices, the Prob that there is no collision is
P = (N-1)/N * (N-2)/N * … * (N-q+1)/N = [i=1 to q-1] (1 – i/N)
1-i/N e^{-i/N}
P e^{- [i=1 to q-1] i/N} = e^{-q(q-1) / 2N }