My favourite image of the week was a picture of the Queen opening the National Cyber Security Centre in London. Her Majesty is looking bemusedly at a large display while a member of staff explains how hackers could target the nation’s electricity supply. The job of the centre’s director, Ciaran Martin, is to protect the nation from such dangers. It’s a heavy responsibility, but at least he doesn’t have to worry that his head of state is a cybersecurity liability.

His counterpart in the United States does not have that luxury. To the astonishment of everyone in the tech community, King Donald is still tweeting and nattering away on his Samsung Galaxy phone, an Android device that in security terms is the equivalent of emmental cheese. When Trump was elected, most people assumed that he would give up his favourite phone, just as Obama had to give up using his beloved BlackBerry, in favour of something that had been “hardened” by the NSA. It hasn’t happened.

So the only question remaining is how many foreign intelligence services have “pwned” the US president’s phone. “Without exaggerating,” writes Nicholas Weaver, a computer security expert at the International Computer Science Institute in Berkeley, “hacking a Galaxy S3 or S4 is the type of project I would assign as homework for my advanced undergraduate classes. It’d be as simple as downloading a suitable exploit –depending on the version, Stagefright will do – and then entice Trump to clicking on a link. Alternatively, one could advertise malware on Breitbart and just wait for Trump to visit.”

So King Donald doesn’t do prudence. But he doesn’t do consistency either. You may recall how he castigated Hillary Clinton for her private email system. Yet his own chronically insecure practices don’t stop him fulminating against all the “illegal leaks” that his nascent administration has already sprung. And he has ordered an internal investigation to find the traitors in their midst.

The Queen at the opening of the National Cyber Security Centre in London. Photograph: Dominic Lipinski/AFP/Getty Images

Not surprisingly, his incoherent rage is having an effect on his subordinates, some of whom, according to the Washington Post, are so fearful of being accused of talking to the media that they have resorted to using a supposedly secure chat app – Confide – that encrypts messages and deletes them as soon as they’re read.

Neat, eh? There is, however, one problem: the law governing the management and custody of presidential records. This says that “documentary materials produced or received by the president, the president’s staff or units or individuals in the executive office of the president the function of which is to advise or assist the president, shall, to the extent practicable, be categorised as presidential records or personal records upon their creation or receipt and be filed separately”. The law does permit a president to dispose of presidential records “that no longer have administrative, historical, informational or evidentiary value” – but only under two conditions: that he obtains the agreement of the national archivist to the shredding and that, if the archivist does not agree, “copies of the disposal schedule are submitted to the appropriate congressional committees at least 60 calendar days of continuous session of Congress in advance of the proposed disposal date”.

How does the use of the Confide app (or any comparable technology) square with these legal requirements? Answer: not at all. So Trump’s courtiers find themselves caught between a rock (their boss’s fury) and a hard place (the courts). In that respect, they are less fortunate than their more paranoid Republican colleagues in Congress who have, it seems, also taken to using Confide to protect themselves from further Russian hacking. At least the congressional users don’t have to worry about breaking the law.

What is astonishing about the chaos prevailing at the court of King Donald is not so much the incompetence that it evinces but what it tells us about the prevailing mindset at the heart of it all. It’s a kind of arrogant, invincible ignorance. And that comes right from the top. Once, when he was asked about cybersecurity policy, Trump replied: “I have a boy who’s 10 years old, he can do anything with a computer. You want something to really go without detection, write it out and have it sent by courier.” The director of the UK’s National Cyber Security Centre may think he has problems, but if I were him I’d count my blessings.