(Very) Basic Intro to the Scrypt Hash (2024)

(Very) Basic Intro to the Scrypt Hash (1)

Lane Wagner

Posted on • Originally published at qvault.io on

(Very) Basic Intro to the Scrypt Hash (2) (Very) Basic Intro to the Scrypt Hash (3) (Very) Basic Intro to the Scrypt Hash (4) (Very) Basic Intro to the Scrypt Hash (5) (Very) Basic Intro to the Scrypt Hash (6)

This will be a basic introduction to the Scrypt hash function, or more accurately, KDF function. I will assume most of my audience is here to gain an understanding of why Scrypt is used and the basics of how it works. My goal is to explain it in a general sense, I will be omitting proofs and implementation details and instead focusing on the high-level principles.

What is Scrypt?

Scrypt is a slow-by-design hash function. Its purpose is to take some input data, and create a fingerprint of that data, but to do it very slowly. One of the best examples for its real world use case is how it is used by Qvault. That is, to take a password and create a 256-bit private key.

For example, let’s pretend your password is password1234. By using scrypt, we can extend that deterministically into a 256-bit key:

password1234 ->

AwEEDA4HCwQFAA8D

AwwHDQwPDwUOBwoO

CQACAgUJBQ0JAAYN

BAMCDQ4JCQgLDwcG

DQMDDgMKAQsNBAkL

AwsACA==

That long 256-bit key can now be used as the private key to encrypt and decrypt data using the AES-256 cipher.

(Very) Basic Intro to the Scrypt Hash (7)

Why not use the password to encrypt directly?

Most encryption algorithms, including AES-256, require that a key of sufficient length is used. By hashing the password, we get a longer and fixed-size key.

Furthermore, we chose to use the scrypt algorithm as opposed to a faster hash like SHA-256 for two reasons:

  • It is slow
  • It uses memory as well as CPU resources

The reason we want a slow hash is so that an attacker has a harder time guessing the user’s password. If an attacker is trying to brute-force their way into a vault, that means they are just guessing passwords over and over in order to break in. AES-256 is very fast, so this means the attacker would be able to try many passwords per second on a modern computer.

Because an attacker must run a scrypt hash on each password before attempting to decrypt the vault , their attack becomes so slow it will be nearly impossible to guess the password. On a relatively powerful desktop computer it takes ~1.5 seconds to hash a Qvault password because we have set the memory and computational requirements fairly high.

Scrypt Properties

Like all hashing functions, scrypt has the following properties:

  • Deterministic (Same input produces the same output every time)
  • Fixed-size output
  • Irreversible (By using the output an attacker can’t find the input)

Additionally, Scrypt has the following properties:

  • Computationally expensive and slow (It takes a long time for a computer to run the hash)
  • Memory intensive (Potentially several gigabytes of RAM is used to run the hash)

Thanks for reading! Here are some additional resources:

https://en.wikipedia.org/wiki/Scrypt

https://blog.goodaudience.com/very-basic-intro-to-hash-functions-sha-256-md-5-etc-ed721622ff8

https://medium.com/coinmonks/very-basic-intro-to-aes-256-cipher-a60104847776

https://en.bitcoinwiki.org/wiki/Scrypt

Follow us on medium! https://medium.com/qvault

By Lane Wagner

Top comments (0)

Subscribe

For further actions, you may consider blocking this person and/or reporting abuse

(Very) Basic Intro to the Scrypt Hash (2024)
Top Articles
Social Security: Is it possible to qualify for an annual bonus of $16,728?
10 Life Changes That Can Grow Your Wealth BIG Time - Quorum
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Selly Medaline
Latest Posts
Article information

Author: Dong Thiel

Last Updated:

Views: 6369

Rating: 4.9 / 5 (59 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Dong Thiel

Birthday: 2001-07-14

Address: 2865 Kasha Unions, West Corrinne, AK 05708-1071

Phone: +3512198379449

Job: Design Planner

Hobby: Graffiti, Foreign language learning, Gambling, Metalworking, Rowing, Sculling, Sewing

Introduction: My name is Dong Thiel, I am a brainy, happy, tasty, lively, splendid, talented, cooperative person who loves writing and wants to share my knowledge and understanding with you.