Engaging Iran has been a model of secret diplomacy. It was initiated by then-Secretary of State Hillary Clinton in 2013 through a back channel provided by Oman. The key negotiators were two brilliant “gray men” of diplomacy, former State Department officials William Burns and Jake Sullivan. As the talks became public, Kerry embraced them with a skill and enthusiasm that should put him on the list of potential Democratic presidential nominees if Clinton stumbles or withdraws.

Outreach to Iran was only half the problem. So Obama crafted sticks, as well as carrots. After U.S. intelligence discovered a secret Iranian nuclear-enrichment facility dug into a mountain near Qom, Obama used the revelation to build a strong international coalition, including China and Russia, for sanctions and eventual negotiations. And within days after taking office, he authorized a covert program of cyberattacks against Iran’s enrichment facilities, using what became known as the “Stuxnet” virus.

Obama’s careful stewardship of the negotiating coalition, though it weakened his hand in Ukraine and Syria, has helped maintain pressure on Tehran. Iran had hoped to divide Russia and China from the West; but the past week’s scenes of negotiators shuttling in and out of Switzerland suggested otherwise. As for future cyberwar, if the negotiations should blow up, the Iranians can only guess what else the United States and its friends may have up their digital sleeves.