The British government intercepted the emails and phone calls of foreign dignitaries attending the 2009 G20 meetings in London, according to the latest tranche of leaks released by the Guardian.
Among other tactics, the British intelligence agency GCHQ set up fake internet cafes for delegates to use in order to log their keystrokes, broke into their BlackBerries, and kept round-the-clock records of phone calls during the summit. Meanwhile, Americans monitored the phone calls of former Russian president and current prime minister Dmitri Medvedev.
The revelations have already infuriated Russia and Turkey, and they are sure to raise some eyebrows at this week's G8 summit, which is also being hosted by Great Britain.
"At a time when international co-operation depends on mutual trust, respect and transparency, such behaviour by an allied country is unacceptable," a spokesman at the Turkish foreign ministry said.
And yet, spying on your allies has long been a staple of international diplomacy -- dating back to the first embassies established by 16th century Italian city-states, where cryptanalysts would slice open the wax seals of intercepted, coded messages with hot knives before deciphering them.
Before the advent of email, modern spy agencies had to break codes hidden within telegraphs in order to read them. And in at least once case in the early 20th century, the U.S. government used surveillance and codecracking to score a major diplomatic victory against Japan during a major international meeting.
Herbert Yardley was a former railroad telegrapher who later became a government "code clerk." He proved the value of his code-breaking chops throughout World War I, and after the war the State Department officially set up a "Cipher Bureau." (As if that name wasn't nefarious-sounding enough, it was also known as "The Black Chamber.") It was America's first permanent code-cracking agency, and it was the precursor for today's National Security Agency. Yardley became the head, setting up the offices on East 38th Street in New York, across the street from a department store. He and his wife lived on one floor, and the bureau took up the rest of the building.
(Why New York? "Washington is overrun with spies," Yardley said, without any apparent irony.)
At the time, diplomatic messages were written not only in foreign languages, but also with some words substituted with numbers or code words. It was the Cipher Bureau's job to make sense of the code and then translate the entire message.
David Kahn, who has written extensively about Yardley and code-breaking, said it was not unlike solving a puzzle:
"It was about looking at frequencies and guessing at what they were," Kahn said.