A few weeks ago, President Trump warned former FBI Director James Comey, via Twitter, of course, that he “better hope that there are no ‘tapes’ of our conversations before he starts leaking to the press.” In his testimony before the Senate Intelligence Committee, Mr. Comey said, “Lordy, I hope there are tapes.” Then Mr. Trump ended the suspense and had the last tweet. “I did not make and do not have” any recordings of the conversations with Comey.

The unrecorded Trump and Comey conversation took place in the District of Columbia, which has a “one party consent” rule. That means that if Trump had secretly taped Comey, he would not have broken the law, since he (Trump) was a party to the conversation. The majority of the states follow this practice.

New Hampshire does not. Nor do Massachusetts, Connecticut, and a handful or so of other states. They are “two party” (actually “all party”) consent states, meaning that unless all participants consent to recording a phone call or face-to-face conversation, anyone who does so is breaking the law.

This isn’t like jaywalking. It’s a real crime. Under New Hampshire law, it is a felony to “intercept” someone else’s telecommunications or oral communications. It is slightly less serious if someone participating in a telephone call records it without “all party” consent, but it’s still a misdemeanor.

The law also requires consent before you can record “any verbal communication.” Where the parties to a conversation have a reasonable expectation of privacy (whatever that may be), you can’t hide nearby and record what they said. In those circumstances, electronic eavesdropping is a crime. You also run the risk of a damages claim by the person whose conversation you recorded.

New Hampshire law also makes it a crime to “disclose” a conversation that has been recorded in violation of these laws, but that provision is constitutionality questionable. In a 2001 case, Bartnicki v. Vopper, the United States Supreme Court ruled 6-3 that the First Amendment gives the press the right to publish or broadcast an illegally recorded or intercepted conversation so long as the publisher or broadcaster did not participate in the illegal act.

Nowadays, practically everyone has a cell phone, and citizens take videos of all sorts of things, including police activity. Does that violate the wiretap or eavesdropping laws? No, according to the federal court of appeals in Boston, which decided several years ago that citizens have a “well established” right to film police officers making an arrest in a public place. In response to that decision, New Hampshire’s then-Attorney General sent a written warning to all state and local law enforcement agencies that arresting someone for making such a video was not only illegal but would expose the arresting officer to personal liability.

The state Supreme Court has taken a strict view of the New Hampshire law. In one case a blogger was convicted after he videotaped himself calling a police officer and two Manchester school officials, recorded the calls, and then posted them online. He may have acted “purposefully,” as the jury found, but the law requires a showing that he acted “wilfully.” I have a hard time seeing the difference between the two adverbs, but the court thought there was one and reversed the blogger’s conviction. At both the federal and state levels, the highest courts have taken a very strong position when it comes to treating any form of expression as a crime. The relationship between freedom of expression and the ever-expanding realm of social media presents questions far beyond anything Madison could have imagined when he wrote the First Amendment. Anyone who wants to tweet can do so to his or her heart’s content, subject to the 140 character limit but not, it appears, to the constraints of good taste. The whole point of Twitter and other social media platforms seems to be the voluntary relinquishment of any claim of privacy, although you can “manage” your privacy settings on Facebook and other interactive websites.

The word “hacking” doesn’t appear in the New Hampshire wiretapping statute, but people, including perhaps Russians, seem able to hack at will into private emails as well as restricted or “private” social media accounts. Facebook, with nearly 200 billion users, and Instagram, with 375 million, have webpages dealing with the problem of “hacked accounts.”

Does such hacking constitute an illegal interception under the state wiretapping and eavesdropping law? Probably not, but hackers run a serious risk nonetheless. A federal law called the “Computer Fraud and Abuse Act” and a New Hampshire law on “Computer Crimes” treat hacking as a crime. First, of course, you have to catch the hacker.

Meanwhile, as a practical matter, it pays to be careful of what you say, write, or post.