Monday, December 18, 2006

CPS2 notes, part 3

In part 1 we were flipping bits in the ciphertext, and seeing what happened to bits in the plaintext.

We can do the opposite, of course, and there's something unexpected in the results.
I'll show the total number of times the bits change (in hex) instead of percentages, to make the point more visible.
      0    1    2    3    4    5    6    7
0 80BC 7844 7E24 7FD4 7EBC 8090 8138 8044
1 7FB0 8138 7A90 7EB0 7D54 7F04 7FE4 8074
2 7F20 7F30 81A4 8018 80C4 7FB4 7F08 7EF8
3 7F30 8180 7D10 7EA0 6F40 7E30 85E0 79E0
4 7EA8 7B1C 8240 7FD4 7DE4 7F24 7F44 80C4
5 A2C0 6D00 6CC0 69E0 6700 7F28 5E00 4E00
6 7F5C 7ECC 7FB8 7FF8 7C38 7FF0 7EF0 7CAC
7 7FD0 7D80 8168 8058 8104 7FA0 7FAC 80E8
8 71E0 B500 8E80 8020 7900 8124 7980 8240
9 7A20 6E40 7AE0 7FA8 8080 7F84 8240 88E0
10 7930 6900 7A50 81BC 7220 7C48 7A20 6FC0
11 7950 8C00 7600 8054 6F20 806C 7CE0 89C0
12 6F40 4B00 85C0 8010 7600 809C 7E00 7E80
13 7F30 7B20 7FB8 8028 803C 80B4 7E80 8140
14 7A90 8034 7D4C 8124 80D8 7E8C 7FC8 7FC0
15 73F0 79C0 7990 80D0 9440 7D94 7AC0 6EA0

8 9 10 11 12 13 14 15
0 8048 7E84 7DB8 801C 80B8 80A4 62BC 7FB0
1 803C 7FE8 7E20 81E8 80F0 7D68 8144 7FBC
2 807C 80C4 7F80 7FFC 7F90 7EE0 82B0 80B4
3 7EB0 80E0 7E68 7F70 7E78 8010 7580 7BBC
4 7FF0 7F68 7FB8 7FFC 7FAC 8074 7DD4 813C
5 7F08 6FA0 7254 6BB8 6C10 6380 6300 7AE8
6 7FF4 7F9C 8018 7FCC 8138 8118 6E14 80BC
7 8088 80DC 7FC0 7DB8 7F8C 7EE4 84E0 7F48
8 7EEC 8090 84EC 7E28 8328 8960 2D00 85AC
9 7F94 7EA4 7D6C 8080 8068 8200 5FC0 82F0
10 7AF0 80AC 80C8 7CB4 8054 8640 7100 7F8C
11 81F0 8080 7F2C 8064 7F94 82C0 6E80 7B30
12 809C 7FD0 7F98 7ED0 75C8 83C0 D300 7CE8
13 8134 8160 80A0 7F40 7D6C 809C 80E4 7F58
14 7F68 7F14 7F44 7F28 8010 7EB4 7F10 7F80
15 82E0 7D4C 78D8 804C 8000 78A0 6240 75DC

The values highlighted in orange are the only two that are constant in every table (there were four in the inverse table).

But the values highlighted in red are the most interesting. They are not constant--they can vary among a few possible values. But the sum of the two values in each column is constant, and it's always 0x10000.

Why? I have no idea.

No comments: