Hash Algorithm

Oh, I see. Usually when I log in on Scratch it's because someone here has suggested that we add some alleged feature of Scratch and I don't understand what the feature is until I try it out. But then once I'm logged in I see that there are messages for me, and I read them.

As for @ ing me, I just ignore that flag up in the corner! There are always a lot of them. :~)

You can test this:

And then use this, if it reports false then that means there's a collision:

Oh.

Always a good idea to avoid @'ing Jens unless its super, super important :slight_smile:

OMG. I found a hash collision!

Affects output lengths: 16, 20, 22, 26, 28, 32, 34, 38, 40, 44, 46, 50, 52, 56, 58, 62, 64, 68, 70, 74, 76, 80, 82, 86, 88, 92, 94, 98, 100, 104, 106, 110, 112, 116, 118, 122, 124, 128, 130, 134, 136, 140, 142, 146, 148, 152, 154, 158, 160, 164, 166, 170, 172, 176, 178, 182, 184, 188, 190, 194, 196, 200, 202, 206, 208, 212, 214, 218, 220, 224, 226, 230, 232, 236, 238, 242, 244, 248, 250, 254 and 256

That's because of how SNAP! handles numbers. Just convert them to lists and it should work fine.

What do I have to convert?

Do you know those numbers like 1.4545345e or something like that? Those numbers aren't the exact result. By converting it to a list, you don't lose any data from the number. Just split it by letter and it should work. Just try it!

No, you don't need to modify the code. Just split the result.

Doesn't really change the result:



Hmm. May want to fix that. I was going to use it for password hashing, but looks like I should wait a bit until it's reliable.

I think I found a temporal solution:

Now their results are different!

Also, you can report bugs. Use this to test my algorithm:

I actually used that to find this collision

Didnt I say I was going to wait?

Still applies. Is OP a crypto expert? Also SHA512 is available and is probably more secure than anything people here could come up with

Update


  • I've modified the multiplier, and now I'm 99.99% sure that is collision-resistant.
  • Error handler has been corrected.

(C) 2022 ScratchModification

I've released an update. Check it out!