I have a records of 24 bytes that I want to hash for authenticity so I
chose md5 for its speed and security.
I couldn't find any crypto hash functions that produce less than 128
bit.
Anyway, I feel a bit stupid to use another 16 bytes just for the md5.
How secure will it be if I take just the lower 32 bits of the md5
value?
Thanks,
j
I would recommend taking a selection of the bytes that only know. For
example, out of the 16 bytes - choose up to 8 of them of some pattern
that you define (every other byte, 5,2,3,1,4, etc.). This will make
faking it a little harder than what you are proposing as the data has
to be swapped around at the very least.
In either respect, you need to have enough data going into the hash to
make it unique enough to not be traced back, or forged without running
the hash. Consider adding some data that only you know.
Again, it's not full proof - nothing is. But it at least gives them
that much more of a challenge.
Ben