Re: Complex Theoretical One Way Hash Question



none wrote:
Matthew Harrison wrote:
Actually, the two problems are very similar.

Actually - way less similar.

With the text, there is 2^n ways of writing the value of the hash in the string - for a given hash (upper/lower case for each letter).

With the image, if we imagine a realistic list of variables

Size : 6 sizes
Font : 16
Colour : 65000
Case : upper/lower

So each character has around 10 million ways of being drawn.

So there is (10^7)^n ways of drawing the MD5 hash

Assuming n = 32 (for a 128 bit hash) .... that's 2^32 combinations for text and (10^7)^32 for images

To compare ... 10^7 is around 2^22.

So the 2^128 leaves around 2^96 combinations for text, but for image - 2^700 for images leaves so much room to move that it's not funny.


Consider the following algorithm:
for i= 1 to 2^128
put i in the image (or in the string that I mentioned)
do the MD5 thing
if MD5_result=i then we have success
next i

I'll make this a competition... if anyone finds a value of n for which md5(the md5 hash of this string is n) = n, I will buy them a beer. Seeing as MD5 is broken(ish), this may even happen. If anyone does it with SHA, I will buy them a whisky chaser as well.


--
Pinging self [127.0.0.1] with 32 bites of banana cake:

Ping statistics for 127.0.0.1:
Slices: Sent = 4, Received = 0, Lost = 4 (100% loss),
.



Relevant Pages

  • Re: How to write a diff in VB6 for comparing two xml files?
    ... No, the best you could do is to read both into string and use StrCompbut it's inefficient and, but using the hash ... Private Declare Function CryptAcquireContext Lib "AdvAPI32.dll" Alias _ ... Dim HashAAs Byte, HashLenA As Long ...
    (microsoft.public.vb.general.discussion)
  • Re: something like switch in c
    ... >> straightforward string comparisions. ... > inner table size and/or add symbols to expand the hash. ... It all depends on the empirical pattern of the actual keys. ... The value of the random number generator is UNCHANGED on ...
    (comp.programming)
  • Re: How to make PKCS#7 signature using CryptoAPI?
    ... Those MSDN samples hash a string PLUS the null byte (so that it ... I tried your sample and had no problem verifying with openssl (after I added ... functions (including CryptSignMessage). ...
    (microsoft.public.platformsdk.security)
  • Re: How to make PKCS#7 signature using CryptoAPI?
    ... "Mitch Gallant" wrote: ... Those MSDN samples hash a string PLUS the null byte (so that it ... functions (including CryptSignMessage). ...
    (microsoft.public.platformsdk.security)
  • Re: Base36
    ... static string tokens = ... But - I don't think you want all those silly characters in the product key. ... I should be able to recalc the hash at the client ... > conversion to long so I can pass each long to the BaseXX converter to get ...
    (microsoft.public.dotnet.languages.csharp)