Hash functions based on cellular automata

A hash function is a function that converts an arbitrary length of input data into a bit sequence of a fixed length. Hash functions play an important role in modern cryptography. Technology advances, new requirements for security and computational complexity are emerging. The SHA family of algorithms remains the leader among hashing algorithms in many areas, but there is another family of algorithms based on cellular automata that deserves general attention.





Cellular automata

The cellular automaton is a fairly common thing that deserves a separate post . However, in a nutshell, this is a discrete model, which is a grid of arbitrary dimensions, each cell of which at each moment of time can take one of a finite set of states, and the rule for the transition of cells from one state to another is determined.





In the case of elementary cellular automata, the grids of cells have a one-dimensional dimension.





In a cellular automaton, for each cell, there is a set of other cells, called a neighborhood, that determine the next state of the cell. The initial state is the state in which the cell values ​​and their neighborhoods are determined at time t. Now a new generation of cells is created when "t" is incremented by 1.





30, :





C ^ {t + 1} _s = C ^ t_ {s-1} \ XOR \ (C ^ t_s \ OR \ C ^ t_ {s + 1})

:





  • , .





  • ( ).





  • .





.









?

c k, : 128, 192 256 .





  1. c :





    size (c) \ text {mod} 512 = 0 \ text {and} size (c)> = 512





    .





    C.





  2. k.





    size (k) \ text {mod} 512 = 0 \ text {and} size (k)> = 512





    k





  3. C 512 .





  4. 512 , 8 64 .





  5. 512 30.





  6. 5 512 ().





  7.   XOR 5 512 .





  8.   , 1.





  9.   6, 7 8 , 512 , .





, .





, .





64 .





  1.  a = e





    , e a





  2.  b = J (g, h, K_1)  b = J (g, h, K_5)





    ,  a = J (g, h, K_1)  a = J (g, h, K_5)





     J (x, y, z) = ((\ text {ROTL} ^ {47} (x) \ text {XOR} \, Rule \, 30 (\ text {ROTL} ^ {37} (y ')) \ text {AND} ((\ text {ROTR} ^ {17} (z)))





  3.  c = G (e, f, K_2)  c = G (e, f, K_6)





      ,  c = G (e, f, K_2)  c = G (e, f, K_6)





     G (x, y, z) = (Rule134 (Rule30 (x ')) \ text {OR} y) \ text {XOR} (Rule30 (z') \ text {AND} x)





  4.  d = F (a, c)





      F (x, y) = Rule30 (x) \ text {XOR} y '





  5.  e = J (a, d, K_4)  e = J (a, d, K_8)





      ,  e = J (a, d, K_4)  e = J (a, d, K_8)





      J 1.





  6.  f = H (b, d)





     H (x, y) = \ text {ROTL} ^ {17} (x) \ text {XOR} \ text {ROTL} ^ {59} (y)





  7.  g = I (c, f)





     I (x, y) = \ text {ROTL} ^ {41} (x ') \ text {XOR} \ text {Rule134} (\ text {Rule30} (\ text {ROTL} ^ {31} (y') ))





  8.  h = H (a, K_3)  h = H (a, K_7)





      ,  h = H (a, K_3) h = H (c, K_7)





      H 4.





ROTL β€” , ROTR β€” .





. :





 rounds = '1' (512 ) + '0' (512 )  mod 512 .





30 , - . . , .





:








All Articles