Properties of a cryptographically secure and useful hash function (2024)

What is a hash function?

It is a function that takes arbitrary-sized data and maps it to a fixed-size integer value.

Working on a hash function

Uses of hash functions

Some uses cases of hash functions in cryptography are as follows:

  • Digital signatures: To sign a message, we first take a cryptographic hash of the message and then encrypt it with the receiver's public key.
  • Storing passwords in a database: Hashes of passwords are used instead of storing in plain text so that even if the database is compromised, the hacker cannot get access to the user's passwords as cryptographic hash functions are pre-image resistant.
  • Data integrity: Take a hash of all our files before leaving a system and then recompute the hash to check if the files have been changed or not.

Properties of cryptographic hash functions

Properties of good cryptographic hash functions are as follows:

Collision resistant

It is a property of a hash function h for which it is computationally very hard to find two distinct inputs, A and B, for which h(A) = h(B).

Pre-image resistance

It is computationally infeasible to invert a hash function (find an input that hashes to the given output). The following is not possible.

A hash function cannot be reverse-engineered

Second pre-image resistance

It is computationally infeasible to find a second input that hashes to the same output as the given input. e.g., Given h(Cat) = AB38DA, it is computationally very hard to find another input that maps to the same output.

We cannot find another input that has the same output hash

Large output space

Outputs of cryptographic hash functions usually are very large integers (represented in binary as bits). The output of the SHA-256SHA-256 belongs to a family of hash algorithms known as Secure Hash Algorithm 2 hash function is 256 bits long, and the total number of possible outcomes is 2256=1.1579209×1077. 2^{256} = 1.1579209 \times 10^{77}.2256=1.1579209×1077. Thus, using a brute force approach on this number of outputs will take years to compute, thus making it ineffective and our hash function more secure.

Deterministic

A given input x to a hash function H will always generate the same output.

Avalanche effect

A small change in the input will result in a completely different output hash.

Puzzle friendliness

A hash function is puzzle friendly if no solution exists, which is better than just making random guesses. Thus, the only way to find a solution is the brute force which takes 2n2^{n}2n, where n = number of bits in the output to guess the correct answer.

Fixed-length mapping

The output size of a hash function is fixed and independent of the input size. The output size of the SHA-256 hash function is 256 bits for any arbitrary-sized input.

Copyright ©2024 Educative, Inc. All rights reserved

Properties of a cryptographically secure and useful hash function (2024)
Top Articles
How to Create a Travel Budget - Barefoot Minimalists
Better Buy: Airbnb vs. DoorDash | The Motley Fool
Po Box 7250 Sioux Falls Sd
The Largest Banks - ​​How to Transfer Money With Only Card Number and CVV (2024)
Uca Cheerleading Nationals 2023
Brady Hughes Justified
Occupational therapist
Jesus Calling December 1 2022
Activities and Experiments to Explore Photosynthesis in the Classroom - Project Learning Tree
Pickswise the Free Sports Handicapping Service 2023
Jcpenney At Home Associate Kiosk
Top Hat Trailer Wiring Diagram
Goldsboro Daily News Obituaries
Craigslist Jobs Phoenix
New Mexico Craigslist Cars And Trucks - By Owner
Thotsbook Com
Sivir Urf Runes
Teenleaks Discord
Unit 33 Quiz Listening Comprehension
Inside the life of 17-year-old Charli D'Amelio, the most popular TikTok star in the world who now has her own TV show and clothing line
Lowes Undermount Kitchen Sinks
Scout Shop Massapequa
Busted Mcpherson Newspaper
Employee Health Upmc
Www.paystubportal.com/7-11 Login
Elbert County Swap Shop
Shoe Station Store Locator
What Sells at Flea Markets: 20 Profitable Items
Unity Webgl Car Tag
Keshi with Mac Ayres and Starfall (Rescheduled from 11/1/2024) (POSTPONED) Tickets Thu, Nov 1, 2029 8:00 pm at Pechanga Arena - San Diego in San Diego, CA
Restored Republic
Club Keno Drawings
Que Si Que Si Que No Que No Lyrics
47 Orchid Varieties: Different Types of Orchids (With Pictures)
Bus Dublin : guide complet, tarifs et infos pratiques en 2024 !
Gwu Apps
Craigslist Georgia Homes For Sale By Owner
Myanswers Com Abc Resources
Pokemon Reborn Locations
Wo ein Pfand ist, ist auch Einweg
3 Zodiac Signs Whose Wishes Come True After The Pisces Moon On September 16
Mbfs Com Login
Here's Everything You Need to Know About Baby Ariel
Csgold Uva
RubberDucks Front Office
This Doctor Was Vilified After Contracting Ebola. Now He Sees History Repeating Itself With Coronavirus
Ups Customer Center Locations
Barback Salary in 2024: Comprehensive Guide | OysterLink
Inside the Bestselling Medical Mystery 'Hidden Valley Road'
Craigslist Farm And Garden Missoula
Wayward Carbuncle Location
Latest Posts
Article information

Author: Aron Pacocha

Last Updated:

Views: 6261

Rating: 4.8 / 5 (48 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Aron Pacocha

Birthday: 1999-08-12

Address: 3808 Moen Corner, Gorczanyport, FL 67364-2074

Phone: +393457723392

Job: Retail Consultant

Hobby: Jewelry making, Cooking, Gaming, Reading, Juggling, Cabaret, Origami

Introduction: My name is Aron Pacocha, I am a happy, tasty, innocent, proud, talented, courageous, magnificent person who loves writing and wants to share my knowledge and understanding with you.