public static void setPublicKeys(Value publicKeyValues)
	{
		// Checks whether the value object has the required fields.
		if(!publicKeyValues.hasChildren(ValueIdentifiers.getElGamalPublicKey()) ||
			!publicKeyValues.hasChildren(ValueIdentifiers.getRsaPublicKey()) ||
			!publicKeyValues.getFirstChild(ValueIdentifiers.getElGamalPublicKey()).hasChildren(ValueIdentifiers.getY()) ||
			!publicKeyValues.getFirstChild(ValueIdentifiers.getElGamalPublicKey()).getFirstChild(ValueIdentifiers.getParameters()).hasChildren(ValueIdentifiers.getP()) ||
			!publicKeyValues.getFirstChild(ValueIdentifiers.getElGamalPublicKey()).getFirstChild(ValueIdentifiers.getParameters()).hasChildren(ValueIdentifiers.getG()) ||
			!publicKeyValues.getFirstChild(ValueIdentifiers.getElGamalPublicKey()).getFirstChild(ValueIdentifiers.getParameters()).hasChildren(ValueIdentifiers.getL())) {
				throw new BadValueException();
		}
		
		Value elGamalPublicKey = publicKeyValues.getFirstChild(ValueIdentifiers.getElGamalPublicKey());
		Value parameters = elGamalPublicKey.getFirstChild(ValueIdentifiers.getParameters());
		Value rsaPublicKeyValue = publicKeyValues.getFirstChild(ValueIdentifiers.getRsaPublicKey());
		BigInteger y = new BigInteger(elGamalPublicKey.getFirstChild(ValueIdentifiers.getY()).strValue());
		BigInteger p = new BigInteger(parameters.getFirstChild(ValueIdentifiers.getP()).strValue());
		BigInteger g = new BigInteger(parameters.getFirstChild(ValueIdentifiers.getG()).strValue());
		int l = Integer.parseInt(parameters.getFirstChild(ValueIdentifiers.getL()).strValue());
		
		Security.setElGamalPublicKey(y, p, g, l);
		Security.setBulletinBoardRSAPublicKey(rsaPublicKeyValue.byteArrayValue().getBytes());
	}