0
$\begingroup$

Do functions with the following properties exists for x being arbitrary stream of bytes:

  1. op(f(x1), f(x2))=f(x1+x2) and op(f(x1), f(x2))!=f(x2+x1) given that x1!=x2 where plus denotes concatenation and op is an easily computable operation
  2. f(x) is fixed length of about 160-512 bytes
  3. f does not need to be hard to revert, but should be useful at finding transmission errors or duplicates.

Could you provide any names/articles/pointers?

$\endgroup$
  • 1
    $\begingroup$ For x1 == x2, the first item is impossible to satisfy. Perhaps replace with op(f(x1), f(x2) == f(x2 + x1) then x1 == x2. $\endgroup$ – Pål GD Jan 12 at 10:47
  • $\begingroup$ Updated that x1!=x2. $\endgroup$ – Tomasz Grobelny Jan 12 at 11:20
0
$\begingroup$

Try the CRC hash; it has this property. You can also look at Merkle tree hashing.

See also https://crypto.stackexchange.com/q/24622/351, Which fingerprinting/hashing algorithms support compounding?, https://crypto.stackexchange.com/q/6497/351.

$\endgroup$

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.