MCPcopy Create free account
hub / github.com/TheAlgorithms/Java / subBytesDec

Method subBytesDec

src/main/java/com/thealgorithms/ciphers/AES.java:2555–2563  ·  view source on GitHub ↗

substitutes 8-Bit long substrings of the input using the inverse S-Box for decryption and returns the result. @return subtraction Output

(BigInteger ciphertext)

Source from the content-addressed store, hash-verified

2553 * @return subtraction Output
2554 */
2555 public static BigInteger subBytesDec(BigInteger ciphertext) {
2556 int[] cells = splitBlockIntoCells(ciphertext);
2557
2558 for (int i = 0; i < 16; i++) {
2559 cells[i] = INVERSE_SBOX[cells[i]];
2560 }
2561
2562 return mergeCellsIntoBlock(cells);
2563 }
2564
2565 /**
2566 * Cell permutation step. Shifts cells within the rows of the input and

Callers 1

decryptMethod · 0.95

Calls 2

splitBlockIntoCellsMethod · 0.95
mergeCellsIntoBlockMethod · 0.95

Tested by

no test coverage detected