Salting with hash data



Hello group

I have a need to hash card number data into a log file, such that at a
later point I can use the same hashing algorithm to check if a card number
is in the log file.

I'm aware that rainbow tables would be a useful attack vector on this data,
and so am looking for suggestions to strengthen the data.

My current thought is to salt the hash with data derived from the card
number, so the process would be something like:

md5 the original card number
take first 16 bytes of the md5 as salt
then sha-256 the original card number & salt

My somewhat limited knowledge of rainbow tables suggests that this 'semi-
random' salting would prevent attack via a single rainbow table, as it
makes the reduction function useless. Is this correct?


Are there any suggestions to salting hashes such that each hash uses a
different salt, but (with the known salting method) still allows the data
to be compared at a later point?


Kind regards
HC
.



Relevant Pages

  • Re: Pin generation algorithm question
    ... Generate a long secret key at random. ... be unique to each particular batch of cards. ... Calculate the pin for the card. ... Hash function like SHA-1. ...
    (sci.crypt)
  • Re: Pin generation algorithm question
    ... >> be unique to each particular batch of cards. ... >> Calculate the pin for the card. ... > card contains both the serial number and its hash. ...
    (sci.crypt)
  • Re: Salting with hash data
    ... this is card number data being protected. ... queries on the data which are mainly used for debugging or analysis. ... in which case you might be able to use a short hash and add so much ... One measure you could always take to deter brute force guessing would ...
    (sci.crypt)
  • Re: Pin generation algorithm question
    ... > Generate a long secret key at random. ... > be unique to each particular batch of cards. ... > number concatenated with the card serial number and put that through a CS ... Convert the hash output to decimal and use those ...
    (sci.crypt)
  • Re: Nokia c110 driver
    ... | Hash: SHA1 ... | need the card for another week or so and if I don't get this one to work ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)