Understanding Hashing: How Computers Create Unique Data Identifiers
In cooking terminology, ‘hashing’ means to chop, mix, and produce a new mixture. Like cooking, hashing or a hash function is where a computer takes an input of any length and content (letters, numbers, symbols, etc.) and uses a mathematical formula to chop it, mix it, and produce an output of a specific length. The output is known as a hash value or hash.
The purpose of hashing is to enable security during the process of sending a message, when the message is intended for a particular recipient only--in other words, cryptography.
Secure Hashing Algorithms (SHA-256)
In transactions involving cryptocurrencies like bitcoin, the transactions are taken as input and run through a secure hashing algorithm (“SHA”). SHA is comprised of four SHA algorithms: SHA-0, SHA-1, SHA-2, and SHA-3.
SHA-1 is the most widely used of the current SHA hash functions, utilized in many applications and protocols, including Secure Socket Layer (SSL) security.
SHA-2 is the other most common, comprised of SHA-224, SHA-256, SHA-384, and SHA-512, depending upon the number of bits in a hash value.
For example, bitcoin uses SHA-256, which gives it a hash value of a fixed length. No matter the size or length of the input, the output will always have a fixed 256-bits length. This is so you don’t have to remember the input data, which could be huge--all you have to do is remember the hash and keep track. For more information on SHA functions, please click here.
Cryptographic Hash Functions
Depending upon its cryptographic characteristics, hash functions can be applied in two different ways: password storage and data integrity.
Password Storage
Instead of storing the password out in the open, all logon processes store the hash values of passwords in the file itself. The password file consists of a table of pairs, which are in the form of (user id, h(P)).
The process is depicted in the below graphic:
In the event an intruder comes across the file, they can only see the hashes of passwords, even if they accessed the password itself. They would be unable to login using hash nor can they derive the password from hash value, since hash function possesses the property of pre-image resistance.
Data Integrity
This is the most common application of the hash functions. It is used to generate the checksums on data files, providing assurance to the user that the data is accurate.
In the graphic above, you can see the integrity check assisting the user in detecting any changes made to the original file.
The caveat with data integrity checks is that this is only valuable if you believe the file is in fact the original file.
Example: An intruder comes in and instead of modifying file data, they change the entire file and compute an entirely new hash, and then send it to the receiver. How would you know? You wouldn’t.
So, the integrity check is only useful if the user is certain as to the originality of the file.
Fund information
- Ultra ETFs: Understanding Leveraged Exchange-Traded Funds
- Tax Forms Checklist: Essential Documents for Federal & State Filing
- Federal Income Tax Filing Requirements: Minimum Income Thresholds
- Bitcoin Explained: The History & Future of Cryptocurrency
- Bitcoin Cash (BCH): A Comprehensive Overview - What You Need to Know
- Blockchain Explained: The Technology Powering Cryptocurrency
- Cardano: A Deep Dive into the Proof-of-Stake Blockchain
- Compound (COMP): Decentralized Lending Explained
- Cryptography Explained: Secure Communication & Encryption Techniques
-
Solidity: The Essential Language for Ethereum Smart ContractsSolidity is the programming language that is used to write, create, and implement smart contracts. If you want to learn smart contracts, you cannot do so without understanding and learning Solidity. ...
-
Tether (USDT): Understanding the Stablecoin & Its Role in CryptoTether is a stablecoin that was created by Tether Limited, for purposes of addressing the volatility of the cryptocurrency market. It operates on the Omni protocol as a token issued on the Blockchain....
