Skip to main content

Security- Hash Functions

Here we go again bloggers !!

It's time to learn some security basics with HASH Functions.

It's not what you think It's something good more than HASH.

No more jokes!
Dive in


A "hash function" is a function that converts the data it's given into an irregular value of fixed length.
A hash Function might be easier to understand if we imagine it as blender




                                             When we input data into a hash function..

                                                        It outputs an irregular value
If we imagine a hash function as a machine that blends up data,it's easier to understand.The irregular output from a hash is called a "hash value". Hash values are numbers, but are often written in hexadecimal.



Computers manage all data in binary which uses 0s and 1s.


Hash values are also data, and are manged in binary.

What a hash function is actually doing is performing some value calculations inside the computer.
Let's look at some features of hash functions from this premise



Their 1st characteristic is that the data values they output are of fixed length
The length of their output data varies according to the hash function.In the case of SHA-1, for example,it's fixed at 20 bytes.


Even when extremely large amounts of data are input, the output hash value data doesnt vary in length

Even when extremely large amounts of data are input, the output hash value data doesn't vary in length.



Likewise, no matter how small the input the length of the hash value data is the same.






A 2nd characteristic is that if given the same input, they will invariably produce the same output.







A 3rd characteristic is that if similar data is input, even if different by only 1 bit, their output greatly differs.









It is not the case that if similar data is input, the hash values will be similar, too.



A 4th characteristic is that even if completely different data is input, it does happen that identical hash values are produced ,low as the chances may be.





This called a "hash collision".





A 5th characteristic is that converting hash values back into their original data is,in reality, impossible.




Impossible

The flow of input and output is one way which is a big difference from "encryption".



One final characteristic that can be given is that their calculations are relatively simple.




There are a number of hash function algorithms, but currently it is most common to use "SHA-2".



hash functions can be said to output a summary of the data input, and are used in many situations.

Examples of hash function usage are explained in detail in the "Message Authentication Codes" and "Hash Tables" entries of this article.


That's it for this article 
Hope you find something useful 


-ThilanJR10-















Comments

Post a Comment

Popular posts from this blog

Ruby on Rails Tutorial

Ruby on Rails Introduction  Hi all I,m here with a new article actually It's trending laguage for you all .Invented in Japan. That means it's very active language. Also it's  need some theory parts to understand these things very well so i will go through by explaining them simply. What is Ruby? Before we Ride on Rails , let us recapitulate a few points of ruby, which is the base of Rails. Ruby is the successful combination of Smalltalk's conceptual elegance python's ease of use and learning and perl's pragmatism Ruby is   A high level programming language. Interpreted like Perl, Python , Tcl/Tk. Object oriented like Smalltalk, Eiffel, Ada ,Java Why Ruby? Ruby originated in japan and now it is gaining popularity in US and Europe  as well. The following factors contribute towards  its popularity. Easy to learn Open source(very liberal license) rich libraries very easy to extend  Truly Object Oriented Less coding with f...

Euclidian Algorithm(Math)

Hi all ! I,m here again with some interesting article. It's not about programming or databases this time. It's algorithm. Actually It's Math. We all know it as Euclidian Algorithm(Euclid in Math). Let's start this then !!! The "Euclidian algorithm" is an algorithm that finds the greatest common divisor of 2 numbers.Discovered by Euclid in the mid 4th century BC, it's referred to as the world's oldest algorithm. As an example, let's consider the largest common divisor of 1112 and 695. With the usual method, we factorize the 2 numbers into prime numbers. and the greatest common divisor(GCD) from the prime numbers they share. Now we know that the greatest common divisor for 1112 and 695 is 139. However, with this method, the larger the 2 numbers get, the more difficult prime factorization becomes.With Euclidian Algorithm, we can find greatest common divisors more efficiently. Before we Enter an expla...

Quick Tutorial with Pedometer

For a better start i'm gonna go through some points Arduino uno(with connecting cable) Accelerometer Jumper Cables Bouth & Pb (since i,m a chemistry student)                                                               Ok here we go!  I hope you all familiar with what above mention with the points. If not quickly follow me whatever the social media i mentioned in my blog i'm willing to help you. First of all i would like to introduce Arduino Uno here. This is a simple picture of it. as i mention in the picture arduino uno consists with digital pins & power pins. Accelerometer is the sensor what we going to work with now.It will look like this.     in this picture it's just a sensor with holes. to fill with that up you gonna need headers(male/female). Probably now you need your bo...