If Russia really tried to throw the United States election to Mr Donald Trump, what then? Did the hacking violate international law? And if so, what can the US do to retaliate?
The short answer is that trying to change the outcome of another country's election does violate a well-recognised principle of international law, and the US would be legally justified in taking "proportionate countermeasures". But, in a painful twist, the best precedent comes from a 1986 case the US lost and never accepted.
There are essentially two ways to establish a principle of international law: by treaty or by custom - and there's no explicit treaty prohibiting nations from intervening in one another's affairs. That makes non-intervention a principle of customary international law - albeit a custom sometimes honoured more in the breach.
The idea that states should leave one another alone certainly makes sense. On some level, the whole theory of national sovereignty - the cornerstone of modern international law - depends on that idea.
The Founding Fathers' favourite international law theorist, Emmerich de Vattel, put it this way in 1758: "It clearly follows from the liberty and independence of nations that each has the right to govern itself as it thinks proper, and that no one of them has the least right to interfere in the government of another." At a minimum, non-intervention means not using coercive force in another country. Russia, of course, didn't use force to intervene in the US election, the way it did in Crimea, for example.
But the International Court of Justice has interpreted the principle of non-intervention to extend beyond force. Its most notable discussion of the issue came in the 1986 case of Nicaragua v US.
There, in Paragraph 205 of the judgment, the court said it was unlawful for a state to intervene in a way "bearing on matters in which each State is permitted, by the principle of State sovereignty, to decide freely" - and that included "the choice of a political, economic, social and cultural system, and the formulation of foreign policy".
In a 2005 case, the international court said expressly that the principle as described in the Nicaragua case prohibits a state "to intervene, directly or indirectly, with or without armed force, in support of the internal opposition within a State". That's pretty close to what Russia is alleged to have done: intervene without armed force in support of one party in a US election.
Violations of international law are funny things. Because there is no international super-sovereign, the fact of a violation doesn't usually trigger immediate legal consequences.
The US could certainly sue Russia in the International Court of Justice. But it would have to get over the embarrassment of citing the Nicaragua decision - which went against the US and awarded reparations to Nicaragua for the Americans' support of the Contras, in violation of the principle of non-intervention.
To make matters worse, the US never accepted the result in the Nicaragua case. After appearing in court to say that the international court didn't properly have jurisdiction over it, the US took its ball and went home, refusing to appear and argue during the merits stage.
Subsequently, the US made sure to veto United Nations Security Council resolutions that would have required it to comply with the judgment - a total of six times.
But if the US were nevertheless to seek retaliation against Russia, what remedy would be allowed?
The court in the Nicaragua case said that violations of the non-intervention principle would justify "proportionate countermeasures". It made it clear, however, that if the original intervention didn't involve force, countermeasures couldn't involve the use of force, which would be disproportionate.
That means the Russian hacking probably can't be construed as an act of war, at least not of the kind that would justify armed retaliation.
The international court declined to say exactly what would count as a proportionate countermeasure. But it did suggest that a country that's been victim of an intervention might be able to "exercise… some right analogous to the right of collective self-defence".
That raises the possibility that the lawful response to Russian efforts to disrupt US elections might be to try to disrupt the Russian political process in return. Ordinarily, that would be an unlawful violation of Russian sovereignty. But just as a violent attack justifies the use of force in return, dirty tricks might justify dirty tricks.
I'm not sure that approach would be wise. As a democracy, the US should be interested in assuring the cleanness of elections - especially because open democracies are the most vulnerable to foreign intervention. Nevertheless, the theoretical possibility exists.
Whether or not the US chooses to retaliate against Russia, we'd do well to keep in mind that as a global superpower, we in the US have done more than our fair share of intervening in other countries' affairs.
Russian hacking is an outrage, to be sure. But perhaps the best solution would lie in re-evaluating our own democratic values, so that leaks and fake news don't determine elections in the future.
• Noah Feldman is a professor of constitutional and international law at Harvard University and was a clerk to US Supreme Court Justice David Souter.