President Donald Trump is decrying leaks that have led to embarrassing stories about his talks with foreign leaders and that this week forced Michael Flynn to resign his job as national security adviser – and experts say the sources could land in prison.

Addressing the leaks about Flynn, Trump said at a Wednesday press conference that information was "illegally – I stress that, illegally – leaked” and said “it’s a criminal act and it’s been going on for a long time, before me, but now it’s really going on.”

The leak about Flynn revealed intercepted communication with Russia's ambassador before Trump took office, including about sanctions. He resigned and acknowledged he misled other administration officials about that contact.

Experts say whoever was responsible for the disclosure and earlier leaks about Trump’s calls with the leaders of Australia and Mexico should brace for possible fallout.

Steven Aftergood, a government secrecy expert at the Federation of American Scientists, says it's probable that information about Trump and Flynn’s communications with foreign officials would be classified, and therefore illegal to disclose without authorization.

"I think it's obviously classified, yes, because it's an intercept," Aftergood says about reported information about Flynn.

Trump's calls with foreign leaders, meanwhile, would presumably be classified as "foreign government information" under Executive Order 13526, Aftergood says. That order allows the president to authorize release of information provided by foreign leaders, he says, but “the situation is different for a leaker, who unilaterally violates presidential instructions. Such a person places himself at risk of administrative or criminal penalties.”

The penalties are potentially severe.

WikiLeaks source Chelsea Manning, for example, was sentenced to 35 years in prison in 2013 for releasing low-level diplomatic communications along with military field reports. Manning, whose sentence was commuted in January by President Barack Obama, was nabbed after confiding to a fellow hacker, yielding Espionage Act, theft and other charges.

The Espionage Act can bring decades in jail and was used with zeal by the Obama administration, often winning plea deals for lesser crimes, though its use to prosecute leaks to the media is controversial.

Louis Clark, executive director of the Government Accountability Project, which supports whistleblowers and defends them against criminal charges, says he's not so sure that leaks about Trump and Flynn are crimes – though he says they certainly could be.

"The way we would present the case is if the document this information came from is not marked as classified, then we don't think it's properly classified, and therefore a person should not be prosecuted," he says.

Still, Clark's organization has defended whistleblowers who sought to work within officials channels, and he says leakers sharing information without approval from the top should be careful and aware of the jeopardy.

Clark says the group, which defends leakers it determines acted in the public interest, advises people to speak with their families before making potentially life-changing decisions.

“Their families may be going through quite a roller coaster ride,” he says. “It’s important to have support going through the process and that begins with the family.”

Obama-era cases do offer lessons for leakers, experts say.

“Never lie to the FBI is the easy one,” says Barry Pollack, a defense attorney who represents WikiLeaks publisher Julian Assange and who helped defend Jeffrey Sterling, who was sentenced to 3 1/2 years in prison in 2015 for providing information about a bungled CIA operation to The New York Times.

“That is a separate offense,” says Pollack, president of the National Association of Criminal Defense Lawyers. “If a person lies to the FBI, the government need not charge or prove a violation of the Espionage Act. It can simply charge the offense of making a false statement.”

Sometimes FBI agents act as though they know less than they do, potentially ensnaring the target.

“If you’re put on the spot, it would be better not to answer the question than to lie – you need to be prepared for that – and that will bring suspicion to them by not answering the question,” Clark says.

Nick Schwellenbach, director of investigations at the Project on Government Oversight, a group that supports but does not provide legal defense to whistleblowers, says "it's obviously a massive risk" to leak classified information and that "in these situations, anonymity is the only protection that exists.”

The ability to easily anonymize conversations has taken significant strides in recent years with widespread availability of encrypted email and phone communications options, potentially allowing leakers to avoid leaving a paper trail.

In past leak prosecutions, such as the one against Sterling and against government North Korea expert Stephen Kim, records of emails and phone calls doomed defendants.

Kim, who pleaded guilty to unauthorized disclosure of national defense information in 2014, received 13 months in prison for revealing information of reportedly slim news value. Kim’s defense attorney, Abbe Lowell, pointed out that phone records showed the Fox News reporter with whom Kim spoke also talked with a National Security Council staff member for his story, and told The Intercept “the government could have found others, but having already vested their target to be Stephen, they never bothered."

Jesselyn Radack, head of the whistleblower and source protection program at ExposeFacts, says it’s important not to make yourself low-hanging fruit for investigators.

“I can't advise anyone to take illegal action, but for people who want to leak information in the public interest that the Trump administration wants kept quiet, it would be wise to take steps to protect yourself at the outset, including retaining legal counsel and using robust encryption,” Radack says.

Radack’s client Edward Snowden, the mass surveillance whistleblower living in Russia, insisted on encrypted communications with journalists before meeting them overseas and later publicly identifying himself, and his leaks have helped popularize use of more secure platforms.

Radack also represented NSA whistleblowers Thomas Drake and William Binney, who were pursued in a leak probe in part because of Drake's contact with a Baltimore Sun reporter, and former CIA agent John Kiriakou, who was imprisoned for emailing reporters a CIA agent's contact information that they could potentially use in connection with stories about torture.

Who exactly has been leaking about Trump and Flynn, and their level of stealth, presently is unknown.

Trump in the past has accused government spy agencies of undermining him, however – a claim incorporated into a court filing Wednesday by conservative legal activist Larry Klayman, who asked for an emergency hearing before a federal judge about the matter's possible connection to his still-pending lawsuit against the NSA’s collection of domestic call records.

Radack says that she’s concerned the Obama administration laid the groundwork for harsh prosecutions by Trump, should his Justice Department uncover the source of unfavorable leaks.

“Trump Administration officials have routinely indicated that they equate dissent with disloyalty and will, in a draconian fashion, personally target individuals who publicly or even internally challenge the administration's policies,” she says.