2
$\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?

Raphael
73.3k31 gold badges184 silver badges406 bronze badges
asked Jan 11, 2019 at 21:59
$\endgroup$
1
  • $\begingroup$ x1 = a, x2 = aa. $\endgroup$ Commented Feb 11, 2019 at 20:56

1 Answer 1

1
$\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.

answered Jan 11, 2019 at 22:54
$\endgroup$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.