public static Pair<BigInteger, BigInteger> sign(boolean deb,
			String message, BigInteger publcG, BigInteger publicP,
			BigInteger publicQ, BigInteger privateX) {
		debug = deb;
		debugMode("=== CREATING SIGNATURE ===", true);

		// K
		debugMode("Creating auxiliar variable K .......... ", false);
		BigInteger k = new BigInteger(publicQ.bitLength(), new SecureRandom());
		while (k.compareTo(publicQ) != -1 && k.compareTo(BigInteger.ZERO) != 1) {
			k = new BigInteger(publicQ.bitLength(), new SecureRandom());
		}
		debugMode("[OK]", true);

		// R
		debugMode("Creating R .......... ", false);
		BigInteger r = publcG.modPow(k, publicP).mod(publicQ);
		debugMode("[OK]", true);

		// S
		debugMode("Creating S .......... ", false);
		MessageDigest md = null;
		BigInteger s = BigInteger.ONE;
		try {
			md = MessageDigest.getInstance("SHA-1");
			md.update(message.getBytes());
			BigInteger hash = new BigInteger(md.digest());
			s = (k.modInverse(publicQ).multiply(hash.add(privateX.multiply(r))))
					.mod(publicQ);
		} catch (Exception e) {
			e.printStackTrace();
		}
		debugMode("[OK]", true);
		Pair<BigInteger, BigInteger> result = new Pair<BigInteger, BigInteger>(
				r, s);
		return result;
	}