Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: I built a hash-identification system with popularity ratings (github.com/hashpals)
27 points by bbno4 on Jan 30, 2021 | hide | past | favorite | 9 comments


A few suggestions:

The animated GIF in the README is too fast to read. Remove it in favor of the static image you have. But make the font size of that image larger.

Display the output in a table, rather than in a comma-separated form, so it's easier to understand and faster to reference. (There are many modules that provide tabular printing.)

    Hash   Hashcat   jtr       Description
    ----   -------   -------   -----------
    MD5              raw-md5
    NTLM   1000      nt        Often used in Windows Active Directory
(According to your output Hashcat doesn't support MD5?)

Hide the "Least Likely" section by default because it's such a wall-of-text, even with text coloring it's going to be impossible to interpret. I would simply print "Pass --less-likely to display 543 other hash types."


Hashes cannot be undone, so... this is just a tool to tell you how long a string of hex characters is and show you a list of hash functions with that length?


Small nitpick: The existence of one-way functions has not been proven, yet. Actually proving this would also prove `P != NP` so this would be a big deal (interestingly enough, proving that one-way functions do _NOT_ exist, would _NOT_ prove that `P = NP`). Currently we can only assume and hope, they exist.


What do you mean by one-way functions? If there are more possible inputs than outputs, then it's not reversible.


This is in reference to "Hashes cannot be undone".

One-way functions are functions that are easily computed given any input but where it is hard/impossible to compute the/a input if you only know the output. This is the property of hash functions that we make use of when hashing passwords, generating signatures, validating files and so on.

We assume that hash functions are one-way functions but to prove the existence of one-way functions is one of the big unsolved problems in computer science. Additionally it has been shown that if one-way functions exist, that P != NP.

With that in mind, we cannot confidently say that "Hashes cannot be undone". While it might still be impossible to find the exact input that was used (unlimited input range vs limited output range), it would be possible to find a possible input resulting in the output you are looking at.

The Wikipedia article [0] is a good starting point for more information.

[0]: https://en.wikipedia.org/wiki/One-way_function


Got it. I see the distinction. Undone as in find an input that produces a specific hash vs finding the input that originally made the hash. And we rely on not being able to do either efficiently.

From Wikipedia:

> It is not sufficient to make a function "lossy" (not one-to-one) to have a one-way function. In particular, the function that outputs the string of n zeros on any input of length n is not a one-way function because it is easy to come up with an input that will result in the same output. More precisely: For such a function that simply outputs a string of zeroes, an algorithm F that just outputs any string of length n on input f(x) will "find" a proper preimage of the output, even if it is not the input which was originally used to find the output string.


The regexes as mentioned in a sibling comment, and also ranked by descending popularity, and annotations of which mode to use in hashcat or john-the-ripper.


It looks a little bit smarter, in that it uses regexes to detect when particular formats are used as well.


I think it’s a pretty cool tool. Although most publicly offered hashes will state what type, I can see a use for quickly identifying unknown hashes.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: