public static void main(String[] args) {
		Scanner s=new Scanner(System.in);
		//0001001100110100010101110111100110011011101111001101111111110001
		System.out.println("Enter key (binary):");
		String key64=s.next();
		String key56=permKey64(key64);
		System.out.println("perm key:"+key56);
		String L=key56.substring(0,28);
		String R=key56.substring(28,56);
		System.out.println("L:"+L+" R:"+R);
		
		for(int i=0;i<shiftTable.length;++i){
			System.out.println("L"+i+":"+L+" R"+i+":"+R);
			L=shiftn(L,shiftTable[i]);
			R=shiftn(R,shiftTable[i]);
			keys56.add(L+R);
		}
		permKey56();
		for (String string : keys48) {
			System.out.println("key:"+string);
		}
		System.out.println("Enter message(binary):");
		String message=s.next();//="0000000100100011010001010110011110001001101010111100110111101111";
		message=initPerm(message);
		System.out.println("perm msg:"+message);
		L=message.substring(0, 32);
		R=message.substring(32,64);
		System.out.println("L:"+L);
		System.out.println("R:"+R);
		//System.out.println("E(R):"+E(R));
		//System.out.println("Sbox:"+f(E(R),keys48.get(0)));
		String tmpL="",tmpR="";
		//16 rounds
		for(int i=0;i<16;++i){
			tmpL=L;
			tmpR=R;
			L=R;
			R=XOR(tmpL,f(E(tmpR),keys48.get(i)));
		}
		//reverse L and R
		tmpL=L;
		L=R;
		R=tmpL;
		System.out.println("R16L16:"+L+R);
		String encmsg=permInverse(L+R);
		System.out.println("Encrypted msg:"+encmsg);
	}