private void keccakf() {
        long[] B = new long[25];
        long[] C = new long[5];
        long[] D = new long[5];
        for (int n = 0; n < 24; n++) {
            for (int x = 0; x < 5; x++) {
                C[x] = A[index(x, 0)] ^ A[index(x, 1)] ^ A[index(x, 2)] ^ A[index(x, 3)] ^ A[index(x, 4)];
            }
            for (int x = 0; x < 5; x++) {
                D[x] = C[index(x - 1)] ^ bitsRotateLeft(C[index(x + 1)], 1);
                for (int y = 0; y < 5; y++) {
                    A[index(x, y)] ^= D[x];
                }
            }
            for (int x = 0; x < 5; x++) {
                for (int y = 0; y < 5; y++) {
                    int i = index(x, y);
                    B[index(y, x * 2 + 3 * y)] = bitsRotateLeft(A[i], R[i]);
                }
            }
            for (int x = 0; x < 5; x++) {
                for (int y = 0; y < 5; y++) {
                    int i = index(x, y);
                    A[i] = B[i] ^ (~B[index(x + 1, y)] & B[index(x + 2, y)]);
                }
            }
            A[0] ^= RC[n];
        }
    }