I was recently given the following requirement for a sizeable list of strings: for each string astring, add a static prefix pre- and a static suffix -suf such that the original astring becomes pre-astring-suf and then calculate and provide the md5 hash.
The receiving party would do the same and the two lists of md5 hashes (mine and theirs) would be compared in order to find how many are the common original strings from the two lists (obviously the original string lists could not be shared). Implementation was done and all is good but this got me wondering:
Is there any advantage on the above technique over just calculating the md5 hashes of the original string? I mean, why add a common prefix and suffix to each string before calculating the md5 hash? I even experimented with hashcat to see if there's a real advantage there (i.e. guessing the non-common strings), but given that the strings are not "words" but rather arbitrary sized character sequences with all kinds of characters, it didn't seem convincing.
Any pointers or ideas would be very helpful, thanks!