Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

srp_hash

If I want to use a hash to compare 2 records, what algorithm would be the best to use.

Comments

  • If all you are doing is comparing records, it really doesn't matter which one you use. I presume that security is not your requirement here. In this case, if you wanted to go for optimal speed, then either of the two 32-bit strength algorithms would be your best bet. However, I would guess that you would never notice a performance gain or hit regardless of which algorithm you used unless you were performing this task several times in a tight loop.
  • Thanks Don.
    The reason I was asking this strange question was in relation to this section in the doc.
    I was thinking if there was a minor (1 character) change it might not get picked up.
    Of course, as usual, I am probably misunderstanding this

    The level of confidence in the hash depends on the algorithm used and its collision resistance.
  • The level of confidence in the hash depends on the algorithm used and its collision resistance.
  • You are not misunderstanding the statement. However, the docs also say "The green algorithms are useful for quick checksums, such as quickly verifying that a file hasn't been altered. They are not at all considered useful for security situations."

    In the end, it really depends on the level of confidence you desire. I don't know if I can offer you any advice on that. I would suggest researching each algorithm to see what the known deficiencies are. I assume that database records will be relatively short, and perhaps this will determine which one is best suited for your needs. I am simply not well versed in this area to render a qualified opinion.
  • Thanks.
    My head was spinning before I got that far
Sign In or Register to comment.