substitutes 8-Bit long substrings of the input using the S-Box and returns the result. @return subtraction Output
(BigInteger ciphertext)
| 2537 | * @return subtraction Output |
| 2538 | */ |
| 2539 | public static BigInteger subBytes(BigInteger ciphertext) { |
| 2540 | int[] cells = splitBlockIntoCells(ciphertext); |
| 2541 | |
| 2542 | for (int i = 0; i < 16; i++) { |
| 2543 | cells[i] = SBOX[cells[i]]; |
| 2544 | } |
| 2545 | |
| 2546 | return mergeCellsIntoBlock(cells); |
| 2547 | } |
| 2548 | |
| 2549 | /** |
| 2550 | * substitutes 8-Bit long substrings of the input using the inverse S-Box |
no test coverage detected