WASHINGTON — James B. Comey’s testimony on Thursday that he orchestrated the disclosure of his account of his discussions with President Trump has raised questions about the ethical and legal implications of his actions.

“My judgment was, I needed to get that out into the public square,” said Mr. Comey, whom Mr. Trump fired last month as F.B.I. director. “And so I asked a friend of mine to share the content of the memo with a reporter. Didn’t do it myself, for a variety of reasons. But I asked him to because I thought that might prompt the appointment of a special counsel. And so I asked a close friend of mine to do it.” The friend, Daniel Richman, a Columbia Law School professor, gave the information to a journalist at The New York Times.

Mr. Trump and his defenders have responded to Mr. Comey’s testimony by denouncing him as a leaker.

What is a leak?

The word “leak” has no official legal definition. But the term usually refers to the act of providing confidential information to the public in a surreptitious way and without official authorization.