# Security of XORing hashes vs concatenating

On this question https://stackoverflow.com/questions/5889238/why-is-xor-the-default-way-to-combine-hashes a couple of the answers say that xoring is a bad/insecure choice for combining hashes. However, most of them say that in regards to xoring two identical hashes.

If I want to combine a Keccak-256, Skein-256-256, Blake2b-256, and Groestl-256 hash, would it be more secure to concatenate parts of the hash, or to xor the hashes together?

• It would be best to keep them as distinct hashes. You may later introduce even more hash functions without changing any existing hashes. So instead of just concatenating (and not hashing the composite), you can do [(hash_id, hash(message))], a list of hashes with a per-hash-function identifier. – cypherfox May 9 '18 at 9:02