Of all the differences between President Donald Trump and his predecessor Barack Obama, arguably the one likely to have the greatest impact is their attitudes to data encryption.

Both have had lone wolf terror attacks on their watch when a gunman went on a rampage killing innocent bystanders.

Both have waded into the long-running row between the FBI and Apple on whether police should be able to grab data stored on encrypted phones, a debate that is also playing out in Scotland with the introduction of new cyber kiosks.

But their opinions on how to tackle the problem are widely different. As President Trump sees it, giving law enforcement access to the information they need to fight crime and terrorism is a matter of common sense.

Protecting encryption – the process that keeps sensitive electronic data secure – is a much lesser priority.

“We are helping Apple all of the time on TRADE and so many other issues, and yet they refuse to unlock phones used by killers, drugs dealers and other violent criminal elements,” Mr Trump tweeted on January 14 after Apple was asked to help the FBI access the phones of a Saudi aviation student who killed three sailors at a Pensacola, Florida naval air base.

“They will have to step up to the plate and help our great Country NOW.”

The response has been swift, with Apple, privacy campaigners and tech experts arguing that the issue is far more complicated than the “low-information decision maker” President makes it.

Any mechanism that allows the FBI to access data can also be exploited by hackers and repressive governments, they point out.

But could the solution really as simple as Mr Trump says? Certainly, any decision will have far-reaching implications: for the criminal justice system; for the tech sector and the way they create all future services and products; and for billions of mobile phone users.

That Mr Obama set out his stall nearly four years ago – after Apple refused to open the locked phones of the suspect in a mass shooting at San Bernardino in 2015 – is an indication of how long this battle between has been running, and the complexities involved.

Speaking in March 2016, the then president made a case for mobile devices to be built in a way that would allow the government to gain access to personal data if needed, but pressed the point that a compromise that respected Americans’ privacy and civil liberties had to be found.

“Setting aside the specific case between the FBI and Apple… we’re going to have to make some decisions about how we balance these respective risks,” Mr Obama said.

“My conclusion so far is that you cannot take an absolutist view.”

That, of course, is exactly what Mr Trump has just done.

As the President knows well, it’s easier for voters to grasp the threat posed by killers and drugs dealers than a foreign government snooping on an opponent.

And while there is no shortage of tech executives condemning encryption backdoors, few people really care.

A survey commissioned by Privacy International last month found that 45.6 per cent of Britons haven’t given much consideration to what happens to the data stored on their phones, and 44.3% were unaware that phone apps use cloud storage.

Nor does it help that the tactics adopted by tech companies are as transparent as mud.

Although encryption is crucial to preserving sensitive data, the real motivation behind Facebook’s campaign for greater privacy is protecting revenues.

Their future depends on them being able to dodge any attempt to regulate their services.

Cynics might even argue that WhatsApp’s lawsuit against an Israeli tech company, NSO Group, which it claims planted spyware in the phones of 1,400 users, is a sideshow aimed at garnering the support of privacy campaigners and distracting from their years-long looseness with user data.

The FBI is playing a similar game. Although they’ve aired their demands for access to the Pensacola shooter’s phone at a TV conference, the FBI has had the means to break into iPhones for years.

US law enforcement officers regularly use tools from at least two third-party vendors, Cellebrite and Grayshift, to exploit vulnerabilities in tech products by using software that guesses the passwords.

It was how they eventually managed to crack the phones of the San Bernardino shooter after Apple refused to help.

What started as a debate between privacy versus security has been reduced to who we trust the most: tech companies or the government.

The way forward might be to borrow from both Mr Trump and Mr Obama’s playbooks.

This approach is evident in Germany, which has embraced encryption, but focuses instead on lawful means of hacking to obtain communications to gather evidence of crimes.

Similarly, Police Scotland is using cyber kiosks to bypass passwords and filter the contents of smartphones, as part of a major investment into tackling cybercrime.

A move in this direction in the US requires a compromise on both sides.

It would also be dangerous for the US to ban encrypted products, for all the reasons tech firms and privacy campaigners have pointed out.

But in stating their position, they should avoid demonising the police for using all means necessary to fight crime.