8080;: = ((F9 and $ 7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $ 1B1B1B1B);: = F2 and $ 80808080;: = ((F2 and $ 7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $ 1B1B1B1B);: = F4 and $ 80808080;: = ((F4 and $ 7F7F7F7F) shl 1) xor ((U - (U shr 7 )) and $ 1B1B1B1B);: = F9 xor F8; [I * 4 + 2]: = F2 xor F4 xor F8 xor
(((F2 xor F9) shl 24) or ((F2 xor F9) shr 8)) xor
(((F4 xor F9) shl 16) or ((F4 xor F9) shr 16)) xor ((F9 shl 8) or (F9 shr 24));: = ExpandedKey [I * 4 + 3];: = F9 and $ 80808080;: = ((F9 and $ 7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $ 1B1B1B1B);: = F2 and $ 80808080;: = ((F2 and $ 7F7F7F7F) shl 1) xor ((U - (U shr 7)) and $ 1B1B1B1B);: = F4 and $ 80808080;: = ((F4 and $ 7F7F7F7F) shl 1) xor ((U - (U shr 7 )) and $ 1B1B1B1B);: = F9 xor F8; [I * 4 + 3]: = F2 xor F4 xor F8 xor
(((F2 xor F9) shl 24) or ((F2 xor F9) shr 8)) xor
(((F4 xor F9) shl 16) or ((F4 xor F9) shr 16)) xor ((F9 shl 8) or (F9 shr 24));;; ExpandAESKeyForDecryption (const Key : TAESKey128; var ExpandedKey: TAESExpandedKey128); (Key, ExpandedKey);
// Підготовка ключа (розширення) (ExpandedKey);
// Розширення ключа для дешифрування; DecryptAES (const InBuf: TAESBuffer; const Key: TAESExpandedKey128; OutBuf: TAESBuffer);, T1: array [0 .. 3] of longword;, W1, W2, W3: longword;
// Ініціалізація [0]: = PLongWord (@ InBuf [0]) ^ xor Key [40]; [1]: = PLongWord (@ InBuf [4]) ^ xor Key [41] ; [2]: = PLongWord (@ InBuf [8]) ^ xor Key [42]; [3]: = PLongWord (@ InBuf [12]) ^ xor Key [43];
// Преобразованіявиполняются 10 разів
// раунд 1: = InverseTable [Byte (T0 [0])]; W1: = InverseTable [Byte (T0 [3] shr 8)];: = InverseTable [Byte (T0 [2 ] shr 16)]; W3: = InverseTable [Byte (T0 [1] shr 24)]; [0]: = (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16)) ((W3 shl 24) or (W3 shr 8))) xor Key [36];: = InverseTable [Byte (T0 [1])]; W1: = InverseTable [Byte (T0 [0 ] shr 8)];: = InverseTable [Byte (T0 [3] shr 16)]; W3: = InverseTable [Byte (T0 [2] shr 24)]; [1]: = (W0 xor ((W1 shl 8 ) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16)) ((W3 shl 24) or (W3 shr 8))) xor Key [37];: = InverseTable [Byte (T0 [ 2])]; W1: = InverseTable [Byte (T0 [1] shr 8)];: = InverseTable [Byte (T0 [0] shr 16)]; W3: = InverseTable [Byte (T0 [3] shr 24) ]; [2]: = (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16)) ((W3 shl 24) or (W3 shr 8)) ) xor Key [38];: = InverseTable [Byte (T0 [3])]; W1: = InverseTable [Byte (T0 [2] shr 8)];: = InverseTable [Byte (T0 [1] shr 16)] ; W3: = InverseTable [Byte (T0 [0] shr 24)]; [3]: = (W0 xor ((W1 shl 8) or (W1 shr 24)) xor ((W2 shl 16) or (W2 shr 16 )) ((W3 shl 24) or (W3 shr 8))) xor Key [39];
// раунд 2: = InverseTable [Byte (T1 [0])]; W1: = InverseTable [Byte (T1 [3] shr 8)];: = InverseTable [By...