TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Break my stupid hash function

3 点作者 quackduck将近 3 年前
I made this crappy, most likely very insecure hash function with zero actual cryptographic hash knowledge while on a plane.<p>If you can find a collision or find the preimage of f11e7def9c2ec4c0, you&#x27;ll officially have broken it.<p>Link: https:&#x2F;&#x2F;gist.github.com&#x2F;quackduck&#x2F;0da5d2ed7807e3ef22dc2e0cdadbf90a

2 条评论

gus_massa将近 3 年前
With<p><pre><code> 300000002a00000041e00000 </code></pre> I get<p><pre><code> e078387cb36ec4c0 </code></pre> your hash is<p><pre><code> f11e7def9c2ec4c0 </code></pre> so I reversed 5 chars.<p>In line 39 it says &quot;num*num&quot; where num is the value of each 8 character block, so if I make each block a multiple of a power of 16, it will not modify the last character of the output. So I can discover each character one by one. I should be padding with \null instead of 0, but it somewhat works anyway.<p>Also, you use 0x428a2f98 as a magic constant, but you should use an odd numbers instead of an even one. If not, you lose the last bits. If you take a look at the output of your hash, the last character is always 0 or 8.
评论 #32377144 未加载
developedbytoby将近 3 年前
incredible.