public static BigInteger[] encrypt(final int[] label, final int C) {
//        System.out.println("========== start encrypt ==========");
//        System.out.println("C: " + C);

        Arrays.sort(label);
        int N = (int) Math.ceil(C * 2.0 / validLength);
        BigInteger[] plain = new BigInteger[N];
        BigInteger[] cipher = new BigInteger[N];

//        System.out.println("nMsg: " + N);
//        System.out.println("cStep: " + cStep);

        long t0 = System.currentTimeMillis();
        int p = 0;
        int count = 0;
        while (count < N) {
            // clear and fill bitset
            bs.clear();
            while (p < label.length && label[p] < (count + 1) * cStep) {
                bs.set(label[p++] % cStep * 2);
            }
            // encrypt
//            plain[count] = new BigInteger(signum, bs.toByteArray());    // here we don't care about endianness
            cipher[count] = paillier.Encryption(new BigInteger(signum, bs.toByteArray()));

//            System.out.println("plain:  " + plain[count].toString(2));
//            System.out.println("cipher: " + cipher[count].toString(2));
//            System.out.println("dectypt:" + paillier.Decryption(cipher[count]).toString(2));

            count++;
        }

//        System.out.println("count: " + count);
//        System.out.println("time elapsed (ms): " + (System.currentTimeMillis() - t0));
//        System.out.println("========== end encrypt ==========");

        return cipher;
    }