public static void exportElGamalPrivateKeyParameters(ElGamalPrivateKeyParameters privK, String fileName) throws IOException {
		BigInteger x = privK.getX();
		ElGamalParameters param = privK.getParameters();
		BigInteger g = param.getG();
		BigInteger p = param.getP();

		StringBuilder sb = new StringBuilder();
		sb.append("x:");
		sb.append(x);
		sb.append(System.getProperty("line.separator"));
		sb.append("g:");
		sb.append(g);
		sb.append(System.getProperty("line.separator"));
		sb.append("p:");
		sb.append(p);
		sb.append(System.getProperty("line.separator"));

		File file = new File(fileName);
		if (!file.exists()) {
			file.createNewFile();
		}

		FileWriter fw = new FileWriter(file.getAbsoluteFile());
		BufferedWriter bw = new BufferedWriter(fw);
		bw.write(sb.toString());
		bw.close();

	}