Since the search last week of the office, home, hotel room, and safe deposit box of Michael Cohen, President Trump’s personal attorney, lots of lawyers have been squaring off about an important legal issue that rarely gets banner-headline billing: How does the government, armed with a warrant for a criminal suspect’s digital files, go about sorting through those files in a way that ensures that constitutional and legal rights are not violated?

The risks of wrongful privacy invasions are too great to leave to the prosecutors when the government seizes digital data. Such files should be reviewed in the first instance by a neutral party, or “special master,” appointed by and answerable to the court, to ensure that the prosecutors and investigators get the evidence they are authorized to look for. They should not be allowed to roam widely through digital files that may contain terabytes of private information.

Cohen has claimed that because he is an attorney — for Trump and others — some of the seized files may be entirely off-limits to the government because they are protected by the attorney–client privilege. President Trump’s lawyers have made similar arguments. Both have asked the court to allow their legal teams to have the first cut at the seized files in order to review them for privilege, and then to produce the remainder to the government or a special master. The government has countered that the court should allow a so-called “taint team,” made up of prosecutors who are not assigned to the case and who are technically walled off from those working on the case, to do the sorting. The court is now considering the parties’ arguments and is expected to rule quickly.

How the court decides this issue is not just of interest to Trump and Cohen, but to everyone. As we continue our march into an ever-more-digital world, how the Fourth Amendment adapts to account for major changes in how we store our “papers” and other constitutionally protected materials will significantly shape our society’s notions of privacy, justice, fairness, and government power. We’ve always had concerns about government overreach in criminal investigations, and those concerns are heightened when prosecutors and police can seize massive amounts of data — the equivalent of every file in your office, your photo albums, your diaries, your personal letters, the contents of your dresser drawers, and more, all at once.

The Cohen case has so far been seen through the lens of the attorney–client privilege. Invoking the attorney–client privilege is not an absolute shield from being subject to government search warrants. However, the fact that the search yielded so many electronic devices makes this an issue of even broader constitutional importance. According to Cohen’s attorney, in addition to 10 boxes of paper documents, the government seized more than a dozen of Cohen’s electronic devices in its search of his office, home, hotel room, and safe deposit box.

As the government’s lawyer, Thomas McKay, conceded in court on Monday, the “real volume” of material will come from electronic files. That’s because a single large hard drive could contain libraries’ worth of stuff. And the immense storage capacities of digital drives, computers, and phones mean that all of the information covered by a given warrant will reside alongside a great deal of other information that the government has no justification to have at all.

This state of affairs creates a serious risk — as in any case involving the seizure of digital information — that the government might see files or other information that were never covered by the original warrant. Under the Fourth Amendment, a warrant must be based on two important elements: probable cause that evidence of a crime will be found, and particularity — the principle requiring a warrant to be tailored to the target of the search and the materials it is expected to yield. These constitutional requirements ensure that the government only takes what it has good reason to access.

When the government executes a search warrant, it sometimes stumbles into things it never anticipated finding. When such things are incriminating and are located in “plain view” — meaning that they are encountered by law enforcement during the reasonable execution of a lawful search — the government is entitled to seize them. For example, if government agents execute a warrant to seize a rifle in your apartment and they unexpectedly find drugs in your guitar case, the drugs are fair game, since the rifle might have been stored there. But if the government is searching for a rifle and finds drugs in your spice box, it generally won’t be allowed to charge you for possessing them, because looking for a rifle in a spice box is not reasonable.

While the “plain view” doctrine might make some sense when the search involves physical objects, searches of digital files present serious challenges to it. For example, the government can’t always search a hard drive for photographs without opening Microsoft Word documents, since photographs could be saved inside such files. As a result, a full-blown “plain view” doctrine as applied to a search of a computer or smartphone could mean that even a narrow warrant for very particular items could end up allowing the government to search the whole computer or phone, and seize anything incriminating it finds there.

Unless they are limited by specific court instructions, the use of government-staffed “taint teams” would not solve this problem. After all, such teams still work for the government, and may seek to exploit the plain view doctrine, or seek a new warrant for information they come across in the sorting process (based on information it never had a right to have in the first place). A special master — or, perhaps, a magistrate judge — appointed by a neutral district court judge would ensure that an independent party plays the role of filter, and that the actual search is strictly limited by the bounds of the warrant.

That is why, in various cases, the ACLU has argued that courts should appoint special masters to review seized digital material in these kinds of situations. Having a non-governmental party determine whether each document’s seizure has been individually supported by a valid warrant ensures that digital searches remain tailored to evidence for which the government has probable cause (and, as in the Cohen case, are not subject to a valid claim of attorney-client or other privilege). The procedure ensures that when unforeseen issues arise — for example, claims by third parties that some of the seized information is actually theirs — the government does not automatically gain access to information to which it will ultimately not be entitled. (Here, for example, the lawyer for Stormy Daniels, whom Cohen paid $130,000 in 2016, has claimed that his client may have a strong privacy interest in some of the seized material.)

In a 2010 case involving a government search of records related to drug testing of Major League Baseball players, the Ninth Circuit Court of Appeals explained that “the process of segregating electronic data that is seizable from that which is not must not become a vehicle for the government to gain access to data which it has no probable cause to collect.” In a concurring opinion, five judges of that court suggested that before obtaining warrants to conduct digital searches, the government should forswear entirely any reliance on the plain-view doctrine in order to ensure strict compliance with the Fourth Amendment.

In the Cohen case, because the government obtained a warrant for some of the seized material, the Trump–Cohen proposal to have a “first cut” of what the government has seized would seem to be an end-run around what a court already authorized. But the government’s plea to use its own “taint team,” in part because it is more “efficient,” would pose serious risks in the other direction. At yesterday’s hearing, Judge Kimba Wood explained that she has “faith in the Southern District U.S. Attorney’s office,” emphasizing that “their integrity is unimpeachable.” But how to manage searches of digital information, like any other evidence, is not a matter of expediency or any party’s good faith — it’s a matter of ensuring that the government complies with the Constitution.

That was apparently not lost on Judge Wood, who told the parties that she was considering ordering the use of a special master in the Cohen investigation. She should — not least because if she does, she will be ensuring that anyone subject to a seizure of electronic devices will have a prominent example to point to when claiming these constitutional protections in the future.