public static byte[] Kinverse(byte[] t, BigInteger n, int L) {
        byte[] output = new byte[L];
        for (int i = 0; i < L; i++) {
            output[i] =  t[(int) kappa(t.length, n, i + 1)];
        }
        return output;
    }