
Envoyé par
marcguill
Comment faites vous pour obtenir :
G(x) = 1.x^5 + 62.x^4 + 111.x^3 + 15.x^2 + 48.x + 228
RAPPEL: Toutes les opérations sur les polynômes, mêmes les plus élémentaires, se font dans le corps de Galois GF(256).
Comme je l'ai dit, tout cela est expliqué dans la norme ISO/IEC 16022:
For example the fifth degree generator polynomial is:
(x + 2)(x + 4)(x + 8)(x + 16)(x + 32)
= x5 + (2 + 4 + 8 + 16 + 32)x4 + ((2 * 4) + (2 * 8) + (2 * 16) + (2 * 32) + (4 * 8) + (4 * 16) + (4 * 32) + (8 * 16) +
(8 * 32) + (16 * 32))x3 + ((2 * 4 * 8) + (2 * 4 * 16) + (2 * 4 * 32) + (2 * 8 * 16) + (2 * 8 * 32) + (2 * 16 * 32) +
(4 * 8 * 16) + (4 * 8 * 32) + (4 * 16 * 32) + (8 * 16 * 32))x2 + ((2 * 4 * 8 * 16) + (2 * 4 * 8 * 32) + (2 * 4 * 16 * 32)
+ (2 * 8 * 16 * 32) + (4 * 8 * 16 * 32))x + (2 * 4 * 8 * 16 * 32)
= x5 + 62x4 + 111x3 + 15x2 + 48x + 228.
Note that this Galois Field arithmetic is not normal integer arithmetic:
- is equivalent to +, which is an “exclusive-or” operation in this Field,
and
multiplication is byte-wise modulo 100101101 for each binary polynomial term generated by bit-by-bit multiplication.
Par exemple, si je détaille le calcul du dernier terme: (2*4*8*16*32)
2*4*8*16*32 = 32768 = 1000000000000000 (binaire)
1000000000000000 | 100101101
001011010000000 |-----------
01011010000000 | 10010100
1011010000000 |
010001010000 |
10001010000 |
0011100100 |
011100100 |
11100100 |
1000000000000000 = 10010100 * 100101101 + 11100100
32768 = 148 * 301 + 228
=> (2*4*8*16*32) = 228 dans GF(256)
et si je détaille le calcul du coef du terme en x: ((2*4*8*16)+(2*4*8*32)+(2*4*16*32)+(2*8*16*32)+(4*8*16*32)).x
(2*4*8*16) --> 180 = 10110100
(2*4*8*32) --> 69 = 01000101
(2*4*16*32) --> 138 = 10001010
(2*8*16*32) --> 57 = 00111001
(4*8*16*32) --> 114 = 01110010
--------
(xor) 00110000 --> 48
=> ((2*4*8*16)+(2*4*8*32)+(2*4*16*32)+(2*8*16*32)+(4*8*16*32)).x = 48.x dans GF(256)
Partager