Eric Sosman , dans le message <ju959h$lu5$
1...@dont-email.me>, a �crit�:
> I think there must be chunks of some kind, or the O.P. would
> not be concerned about the "order" and "permutation." He illustrated
> a set of four items; I think the notion of "atomic item" ("chunk")
> is inherent in the question.
The chunks can be very small. If he is writing some kind of anagram
generator, a chunk is a single letter. In that case, it may be more
efficient to count the number of each possible letter and hash the result.
> My vision is imperfect, but I don't see any benefit from the
> muddying.
I may be mistaken, but I believe that it is usually recommended to always
_finish_ with a well-cryptanalyzed hash function.
> If one additional round improves things, why not improve
> them even more with two, or with two hundred?
If the final hash is strong, iterating it will not make it stronger (it will
make it more computationally expensive, though, this is used for hashing
passwords).
> (Shrug.) Letting B' be the inverse of B under whatever combiner
> is in use, combined_checksum(ABB') = combined_checksum(A). For XOR
> B' = B; for ADD B' = -B. Choose your poison.
For ADD, B' = invert-checksum(-checksum(B)). Having two chunks with opposite
checksum will happen as a coincidence, no more. On the other hand, having
identical chunks may pretty well be a common occurrence, depending on the
use.