In what the Justice Department has labeled a terrorist attack, on December 6 Saudi Air Force 2nd Lt. Mohammed al-Shamrani shot and killed three U.S. Navy sailors.

That attack led to the serious vetting of all Saudi military members being trained in the United States. About 10 days ago, more than 20 of them were deported to Saudi Arabia because jihadist materials or child pornography (or both) were found on their personal computers.

Al-Shamrani reportedly had two iPhones and shot both of them during the December 6 attack. The FBI asked Apple to help it access the information on the phones, and Apple reportedly declined.

This brings about the latest round in the ongoing Apple versus FBI controversy about access to information that people seek to hide by protecting that information by passwords on their cellphones. Apple, we must note, is not the only company on that side of the controversy.

In a January 14 press conference, Attorney General William Barr upped the ante, calling on Apple to decode al-Shamrani’s password to enable the FBI to access its information. Barr said, “This situation perfectly illustrates why it is critical that the public be able to get access to digital evidence.” He also said that Apple had given the Justice Department no substantive assistance.

Barr also said, “It’s very important for us to know with whom and about what the shooter was communicating before he died.”

An Apple spokesman responded, saying that Apple had helped. He said the company had provided a “wide variety of information” when first contacted by law enforcement, “including iCloud backups, account information and transactional data for multiple accounts.”

In practical law enforcement terms, Barr is clearly right. But that’s not the answer to the basic question of whether or not Apple is obligated to provide the government with a “back door” enabling it to spy on anyone using any of its cellphones.

Among Apple’s valuable products are the security features on its cellphones. It probably spends an enormous amount of money creating and maintaining its “iOS” software, which is frequently updated, in part, to maintain that security.

The nub of the issue is that the government cannot legally compel Apple to create that sort of “back door” and give it to the government, enabling it to surveil any iPhone. That would, of course, require Apple to continue to provide iterations of the “back door” that could still penetrate updated Apple software.

Although the government has extraordinary powers — through the courts — to compel production of evidence in criminal cases, it cannot require a private company to manufacture or produce anything such as the software it would like to have to decode passwords on Apple cellphones. (As we’ll see in a minute, it may not be necessary for the government to do more than hire people who can break into the cellphones themselves.)

Barr’s frustration is clearly understandable. Intelligence that could be found on al-Shamrani’s cellphones — or on any others in similar situations — could have considerable value that will necessarily diminish with the passage of time. If al-Shamrani had had confederates who were planning other attacks, the information on his cellphones could have led the FBI to interdicting those attacks. Even now, that information could be used to identify other terrorists with whom al-Shamrani was exchanging information.

Apple is right to continue its refusal to create a “back door” into its software. The potential for governmental abuse of access to private information was conclusively demonstrated in the FBI’s and CIA’s abuse of their powers in the “Crossfire Hurricane” investigation of President Trump’s 2016 campaign and his post-election transition before he took office.

As I have written many times, the Foreign Intelligence Surveillance Act (FISA) is intended to allow the intelligence community to spy on people acting in behalf of a foreign government or terrorist network who may be conducting espionage or terrorist activities against the United States. That power is exercised through Fourth Amendment surveillance warrants obtained from the FISA court (the FISC), which operates, necessarily, in secret.

During the “Crossfire Hurricane” investigation, the FBI and the CIA (and perhaps the NSA) illegally obtained FISC surveillance warrants by defrauding the court. The government agents swore to the truth of the allegations — as we know, based entirely on the “Steele dossier” — which were not verified by any independent investigation.

When he was Deputy FBI director, Andrew McCabe told the House Permanent Select Committee on Intelligence that the FBI would never have applied for the FISC warrants it sought and obtained against Carter Page (a minor Trump adviser) if the Steele dossier had not existed. Yet the FBI never told the FISC that the dossier was bought and paid for by the Hillary Clinton campaign and thus was nothing more than totally unreliable campaign propaganda.

Were Apple — or any of the other cellphone manufacturers — to create back doors into its software for the government, the same sort of abuses could occur. Facebook and other social media have to deal with the same problem because of their plans for encryption.

State and federal prosecutors have, for years, been demanding that cellphone manufacturers comply with judicial subpoenas for access to criminals’ cellphones.

In 2015, Syed Farook and Tashfeen Malik killed 14 people in San Bernardino, California. The FBI sued Apple to compel it to create new software enabling law enforcement to access one of the San Bernardino shooter’s cellphone. The suit became moot when the FBI managed to unlock Farook’s iPhone without Apple’s help.

As noted above, Apple continues to improve the security of its cellphone software to protect users’ information. But the FBI and others also continue their research into ways to overcome the iPhone’s security.

The Cellbrite company reportedly advertises that it can crack the security of any cellphone. Another company, Grayshift, may be able to do the same. The FBI could hire these companies, or train their own people, to decrypt cellphones. The NSA probably already has such people.

Once that capability is established, by contract or by hiring, it would be simple for the FBI to quickly obtain a search warrant from a federal court authorizing it to gain access to a cellphone used in criminal or terrorist activity. Yes, that power could be abused. But, given the FISA abuses during the 2016 campaign (and in the subsequent transition), most courts are likely to require clearly verified information in the search warrant applications.

Some will argue that anyone’s ability to keep private information private is eroding so quickly that the Fourth Amendment is obsolete. Companies such as Clearview AI are doing their best to make it so.

Clearview AI has reportedly devised a facial recognition software that can take a public photo — taken by security cameras that are proliferating across the world — and compare it with photos people have posted on their social media accounts such as Facebook, Twitter, and many more. CIearview claims to have over three billion such photos on file.

The company has already provided the software to the FBI and other law enforcement agencies. Clearview’s and other such software will quickly become commonplace and more sophisticated.

The Fourth Amendment isn’t eroded by facial recognition software. If you choose to post your face on social media, you lose the expectation of privacy that the Fourth protects. It is much harder to justify surveillance of city streets traveled by millions of innocent people. That amendment protects your privacy against searches (without probable cause that a crime has been or is being committed) of your home, car, person, or place of business.

Any law-enforcement tool can be abused and will eventually be.

Someone, sometime, in some law enforcement agency will abuse capabilities provided by Clearview AI and others by, for example, surveilling someone without probable cause that they are engaged in criminal activity. That’s exactly what happened in the FBI–CIA “Crossfire Hurricane” investigation.

Apple should stick to its position and continue to refuse the FBI’s demands. The FBI, in turn, can get search warrants and use its own and its contractors’ abilities to crack the passwords on individual cellphones involved in criminal or terrorist activities. The Fourth Amendment is essential to maintaining our democratic form of government, just like every other part of the Bill of Rights.

If only the Democrats understood that.