Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 19 Oct 2018 20:17:54 +0200
Subject: Re: Travis CI MITM RCE

Hey Jakub,

On 18.10.2018 17:10, Jakub Wilk wrote:

> Nitpicking, but for an ideal n-bit hash function, on avergage you need
> 2ⁿ (not 2ⁿ⁻¹) evalutations of the function to find the preimage.

Huh, wow! I would also have had the gut-feeling of 2^(n-1) and had to
code a little program to verify the facts:

import hashlib
ps = [ ]
for q in range(20000):
	for p in range(10000):
		z = q | (p << 32)
		z = int.to_bytes(z, length = 8, byteorder = "little")
		if hashlib.md5(z).digest()[0] == 0:
print(sum(ps) / len(ps))

And indeed, you're absolutely correct. Thanks for the comment!

Have a great weekend,

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.