Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2024
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.18 KB | None | 0 0
  1. f(x) = x1*x2 + x3*x4 mod 2 (x1,x2,x3,x4 are the four input bits, x is their concatenation)
  2. e is the changing bits, x is the possible inputs, the last column p calculates the the number of different inputs where the output changes if e is added to x before inputting it to f divided by the total number of inputs possible. This is called a probability. Each cell is the output of f(x + e). The first row where e=0000 is just the plain output of f for every input x. Changes are calculated in respect to this row. According to the general SAC (Avalanche Criteria, for 1 Bit and also for higher orders up to 4 bits) this should be 50 for.
  3.  
  4. e\x | 0000 | 0001 | 0010 | 0011 | 0100 | 0101 | 0110 | 0111 | 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 | 1111 | p
  5. --------------------------------------------------------------------------------------------------------------------------
  6. 0000 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | -
  7. --------------------------------------------------------------------------------------------------------------------------
  8. 0001 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 8/16
  9. 0010 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 8/16
  10. 0011 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 8/16
  11. 0100 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 8/16
  12. 0101 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 8/16
  13. 0110 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 8/16
  14. 0111 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 8/16
  15. 1000 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 8/16
  16. 1001 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 8/16
  17. 1010 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 8/16
  18. 1011 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 8/16
  19. 1100 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 8/16
  20. 1101 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 8/16
  21. 1110 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 8/16
  22. 1111 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 8/16
  23.  
  24. As you can see, this function f satisfies the higher order SAC up to the maximum of 4 Bits. You can use four of these functions in parallel or in some other combined way to achieve this also for a 4 Bit to 4 Bit mapping instead of 4 Bit to 1.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement