Cryptographically secure hash function of additives

I am working on a Fountain Code file transfer system . This system loads data blocks combined with the xor function. I want to check the blocks as they arrive.

I need a cryptographically secure hash function that has the property:

Hash (A) ^ Hash (B) == Hash (A ^ B)

is there such a thing?

Note. Data blocks must be combined with the xor function, hashes can be combined with any function that you like, if it is reasonably cheap to calculate.

+5
source share
2 answers

, . , , , - - , . , .

, . , xor, - , . , , .

+5

, ,

Hash(A) ^ Hash(B) == Hash(A ^ B)

, - . , ( ) .

, ?

, , 6 3 :

Hash(000001) = 010
Hash(000010) = 111
Hash(000100) = 001
Hash(001000) = 101
Hash(010000) = 110
Hash(100000) = 001

. ,

Hash(101000) = Hash(100000) ^ Hash(001000) = 001 ^ 101 = 100.

, - ​​ 6 3.

?

- :

  • ,
  • ,
  • ,
  • .

, , . - , . , , .

kernel -, K , Hash(K) - , . M; M M^K , Hash(M^K) = Hash(M)^Hash(K) = Hash(M)^0 = Hash(M). .

, . (, , . , - . -, .)

+9

All Articles