Reverse (or bruteforce) the FNV1-64 algorithm by knowing some infos about encoded string

58 Views Asked by At

I have the FNV1-64 algorithm as a python function

def fnv1_64(data:bytes) -> hex:
    hval_init = 0xcbf29ce484222325
    fnv_prime = 0x100000001b3
    fnv_size = 2**64

    assert isinstance(data, bytes)

    hval = hval_init
    for byte in data:
        hval = (hval * fnv_prime) % fnv_size
        hval = hval ^ byte

    return hex(hval)[2:]

And I'm wondering if it's possible to reverse or more specifically brute force it. I have a list of hashes and I know the 12 first characters of the input string that was encoded, and the 4 last, I aslo know the string is only composed of lowercase letters, numbers, and "-" and "_" (39 possible characters in total) and the average length excluding the beginning and ending is 42. Is there a way to reverse it or it's just too many possibilities?

0

There are 0 best solutions below