Noah Feldman / Bloomberg News

To be the swing voter, you have to be willing to swing. In the last three weeks, U.S. Supreme Court Justice Anthony Kennedy has shown how it’s done.

First he wrote the majority opinion in a landmark 5-4 case establishing a constitutional right to an adequate lawyer in plea-bargaining negotiations. Then, as a coda, he wrote the majority opinion in a 5-4 case allowing jails to strip-search anyone being put into the general prison population — even without suspicion, and even after the most trivial misdemeanor arrest.

What principle, if any, explains Kennedy’s vote in the strip-search case? Kennedy-watchers know that he is deeply sympathetic to arguments based on human dignity. His perception of dignity led him to vote to preserve the core of Roe v. Wade in 1992, and to write the two opinions that more or less created constitutional rights for gay people.

The plaintiff in the strip-search case was arrested after a routine traffic stop and jailed for a minor outstanding warrant that may well have been a mistake. Before entering the jail, he was forced to strip, lift his genitals, squat and cough. If that isn’t an assault on human dignity, you might think, what is?

The short answer is that Kennedy couldn’t find a violation of dignity for the petitioner because almost everyone committed to a jail or prison gets similar treatment. To find that all of these people are having their most basic rights violated every day would have been too disruptive to the basic practices of criminal justice.

As a result, instead of arguing about dignity, the justices disagreed about the practical question of whether invasive strip-searches are reasonably necessary to serve the interests of the jails and prisons. Kennedy’s majority opinion said that they were.

It’s hard to avoid the conclusion that the strip-searches, however well-intentioned when first instituted, now function to humiliate people being put behind bars, sending the message that they are now essentially nonpersons, under the full control of the state.

Yet, it’s worth noting, not even Breyer argued that all strip-searches of people entering jail should be unconstitutional. There is a reason: Privacy, as we know it, is dying. The death is slow and gradual. But it is starting to look inevitable. Supreme Court justices, in general, and Kennedy in particular, rarely fight the trend of history.

There are two main drivers pushing privacy into the dustbin of history, and both are related to technology. One is the increasing effectiveness of government surveillance. Cameras follow you in most public places in London today, and New York is catching up. Diffusion scanners at the airport already show you essentially naked. The government’s ability to do these things causes many of us to think it is reasonable for it to do so.

The other driving force is our increasing willingness to sacrifice privacy for practical advantage. When you sign up for a free Gmail account, you agree to allow a computer program to read all your emails. This is hardly a secret: The ads that pop up on your browser often relate to the text of the e-mail you have sent or received. Google Inc. gambled that people would rationalize the loss of privacy by saying that no human was reading the text. Google was right.

The justices cannot help but be affected by these trends. Privacy is defined constitutionally by “reasonable expectation” of what should be private. This may sound circular, but it is in fact inevitable. The concept of privacy is inherently flexible, and the less we value it, the less our judicial institutions will protect it for us.

Prison inmates, who have less control over their daily lives than anyone, are the most vulnerable to the sacrificing of privacy interests. But here they are really just guinea pigs for the rest of us. The next time airport security tells you to put your hands over your head and hold that vulnerable position for seven seconds, ask yourself: Is this the posture of a free man?