My hash


This is the test script for my hash(drag it into editor to get hash blocks)
I didn't get a collision when running it for 30 seconds(i dont have enough patience to wait longer)
Can you spot one?

Nice, but snap already has blocks that generates a sha256 hash

Nice!

but it's still a good exercise to write the script yourself, as long as you don't use it for anything important.

no the pic is all of it

Yo!Enilk!It's been so long since the may'20 days!

yes its just a discrete logarithm problem

Oh right snap automatically imports custom blocks if you dont know

oh okay

no you dont i put the definitions in the script pic

works for me'
untitled script pic (59)

yeah ik i mean that it works and i did import that script

There was another thread about this... If the forum software thinks a picture is too big to fit in the message, it makes a shrunk version (think "thumbnail" but in fact it shrinks the picture just enough to fit). That shrunk version doesn't include the XML.

You don't have to open the picture in a new tab; if you click on it, you get the original picture overlaying the forum screen temporarily, and you can save it or whatever, and that original does include the XML.

This is very elegant code. I especially like how you make the list A with 100 three-letter words. You really get your money's worth out of both MAP and hyperblocks.

In the HASH block, I don't understand this:


It turns each of the three letters into a huge number, but they're all in the same region. So you're always going to get 1000ddd1000ddd1000ddd where d is a digit. Don't you want these big numbers to be uniformly distributed?

In the QMODPOW block, I don't understand this:
untitled script pic (1)
Since y is the exponent, shouldn't the return value be 1?

Thanks

yeah im just lazily coding

I'm not a crypto expert

my fault,but my excuse is you never raise stuff to the zeros exponent because anything with length is atleast 1000000

v1.1

fixed

fixed

kept

Did you use three instead of four to avoid the f word?/j

Oh you're thinking of cryptographic hashing. I think even in that case you want every bit of the hash to be useful, but I was actually thinking about hash tables, in which you want the table not to be much huger than the data you're hashing, and so you have to worry about two symbols having the same hash value.

Yeah but the recursion in the hash calculation will eventually get down to either 1 or 0, won't it?

(yeah)

yes thats what I was worrying about.Otherwise I would just say "Why would this be a problem?"

oh right there is actually a thing called hash tables i forgot

Oh right,but actually the recursion would only go to 1 not 0 because it is done by division(anyways i fixed it)

OK, cool.