Former FBI Director James Comey said on Thursday that he gave a memo describing his conversations with U.S. President Donald Trump to a "close friend" and told him to share its contents with a reporter, a revelation that sparked sharp criticism from Trump's lawyer.

In testimony to the Senate Intelligence Committee, Comey said he wanted to get his account of his conversations with Trump into the public sphere in the hope it would prompt the appointment of a special counsel, as later occurred, to oversee the investigation into Russia's alleged meddling in the 2016 presidential election.

The conversations included one in which Comey said he believed Trump had pressured him in February to drop a probe into former national security adviser Michael Flynn as part of the broader Russia investigation.

Comey said he had asked "a close friend" who was a Columbia Law School professor to get his story out after Trump fired him as director of the Federal Bureau of Investigation on May 9.

Daniel Richman, a professor of criminal law at Columbia, confirmed to Reuters he was the person referred to in Comey's testimony. Richman, who is listed as an adviser to Comey in his official biography on the school's website, did not respond to further requests for comments.

During his time in office, Trump has raged against the press and its use of anonymous sources.

Following Comey's testimony, Trump's personal lawyer, Marc Kasowitz sharply criticized Comey for leaking what he called "privileged communications" between the president and the then-FBI director.

He tried to link Comey with others in the government who he said had selectively and illegally leaked classified information to undermine the administration and suggested that Comey might have broken the law.

It would be up to the appropriate authorities to determine whether the leak should be investigated, Kasowitz said.

Comey could not be reached for immediate comment.

Some legal experts said Comey's actions did not run afoul of the law.

Faiza Patel, co-director of public policy group Brennan Center for Justice, noted that Comey testified that he was careful to avoid putting classified information in memos memorializing his conversations with Trump.

Other experts said Kasowitz's claim that Comey leaked "privileged" information was off the mark, citing the fact that Trump previously had disclosed details about his interactions with Comey.

To leak his memo, Comey chose someone who has publicly defended him in the past, including his handling of the investigation into Hillary Clinton's emails.

A 1984 graduate of Yale Law School, Richman clerked for the U.S. Supreme Court Justice Thurgood Marshall. He served as chief appellate attorney in the U.S. Attorney’s Office in Manhattan from 1987 to 1992, when Comey was also a prosecutor in that office.

Richman went on to join the faculty of Fordham University School of Law and moved to Columbia in 2007. He has also served as a consultant to the U.S. Justice and Treasury departments on criminal matters and on advisory committees to former New York Mayor Michael Bloomberg and New York state Governor Eliot Spitzer.

After Comey's testimony, a surge of Web searches for Richman appeared to overwhelm the Columbia Law School's website.

"Columbia Law's site is down at the moment. We are working on a solution. Stay tuned," the school said in a posting on Twitter.