What's Scrypt Hash?


 What's Scrypt Hash?


Scrypt hash is a password based key derivation function (a cryptographic algorithm that derives one or more secret keys from a secret value). Its specifically made to make large scale custom hardware attacks costly as it makes decrypting require large amount of memory.


The working of this scrypt hash can be broken down broadly into three parts.

1.Password Hashing

The scrypt hash first hashes the password into a pseudorandom set of strings so that even if the attacker has your password, he cannot access the information beneath it completely. 

To put it into simpler terms if your password is say: " Sivaji vaaila selabi "
the hash scrypt hashes this password into some pseudorandom string set like "h3h47nne9je9t438usdn95h8rfhehiue46tvnywmesc."

2.Salt generation

Just like seasoning your steak with generous amount of salt, you got to salt the hashes (pseudorandom string set) to make them more délicieux
The terminology "to add salt" means is to add some extra random characters to the given string set. Such as special characters, numbers, upper and lowercase characters. To make every particular hash taste unique different salts are added to every different password hash.


3.Key Derivation

A well-made lock with 5 million combinations looks secure but is useless without a proper key to unlock it. Just like that after salting the hashes we get a 128 bits long pseudorandom string set (the length of this string set is kept constant, it can vary but remain constant) we need something like a cryptographic key to encrypt or decrypt the hash.

key derivation is the process of creating this cryptographic key (it's basically a string of bits).
A salt is added to a random value that is added to the password to make it harder for the attackers to guess the password using precomputed tables of hashes.

The password and salt are combined using a hash function to generate a hash. Now this hash is used as a input for a series of CPU and memory intensive function called scrypt core. These are functions that use a large amount of memory and perform many iterations of mixing and hashing operations. The result is another pseudorandom string set of same length as the hash in the beginning. After that it is once again passed to the hash generator to get the final output, this is the cryptographic key which is used to encrypt or decrypt the hash.

This process is meant to be slow and memory intensive because it's difficult for some random attacker to perform parallel attacks using specialized hardware. 


  • Creating strong cryptographic keys from passwords, where the derived key is longer and more secure than the original password.
  • Encrypting and decrypting data using the derived key as a private key for algorithms such as AES-2563.
  • Authenticating users by storing the derived key in a database and comparing it with the user’s input password.
  • Mining cryptocurrencies by using a slow and memory-intensive algorithm that makes it harder for attackers to perform parallel attacks using specialized hardware.
  •  Some cryptocurrencies, like Litecoin, use Scrypt as their proof-of-work algorithm due to how slow and memory-intensive the key derivation process is. By using a slower and more memory-intensive algorithm, it’s harder for engineers to create specialized hardware (ASICs) to mine the coin.


If you are curious and want to know more about scrypt hash here are some links that could quench your curiosity:


Scrypt is a password-based key derivation function that creates a strong cryptographic key from a password and a salt. It is also used as a proof-of-work algorithm for mining some cryptocurrencies, such as Litecoin. Scrypt is designed to be slow and memory-intensive, making it harder for attackers to perform parallel attacks using specialized hardware. Scrypt is a secure alternative to SHA-256 and has been widely adopted by leading blockchains. Scrypt is a powerful tool for encryption, authentication, and consensus in the digital world.