I've had an idea about storing parts of SHA256 hashes and I'd like to find out how secure it is, or how much less secure it is than storing the entire hash.
For example, users can share this list of truncated hashes and each user only stores one of the entire hashes, they only need to store they're own hash, and when someone gives them a hash they don't recognize they can check it against my list.
If I have some hashes like this:
Instead of storing all 256 bits of each hash, I'd like to store random chunks of each hash. The first step is to add a number to the end of the hash.
And now instead of storing the entire hash, I store two bytes from each hash. The first byte is byte 4 for the first hash, 7 for the second etc ... using the number I added to the end of the hash.
The first number is the 4th byte.
The second number is (first number + half size of the entire hash) % (size of the entire hash).
So based on my first hash above:
byte1 = 4th byte = 12
byte2 = (4 + 32/2) % 32 = 20th byte = F8
So instead of storing:
I could store:
So now I have my hash and if I want to compare it against the list I just check the 4th and 20th bytes equal 12 and F8, respectively.
I don't know anything about Cryptography really, so I'm wondering if this idea already exists, if it's secure and if there's a way prove mathematically how secure only storing 8 bits of the 256bit hash is as opposed to storing the entire thing.