A Canadian man pleaded guilty in a U.S. court Tuesday to charges stemming from a massive breach at Yahoo that authorities say was directed by two Russian intelligence agents and affected at least a half billion user accounts.

Karim Baratov appeared in a jail jumpsuit before a federal judge and entered the pleas to one count of conspiracy to commit computer fraud and abuse and eight counts of aggravated identity theft. He gave "yes" and "no" answers to questions from the judge about his pleas, but said nothing more.

He is scheduled for sentencing on Feb. 20.

U.S. law enforcement officials call the 22-year-old Baratov a "hacker-for-hire" and say he was paid by members of Russia's Federal Security Service to access more than 80 accounts.

Outside court Tuesday, Baratov's attorneys said their client hacked only eight accounts and did not know that he was working for Russian agents connected to the Yahoo breach. Baratov was arrested in Hamilton, Ont., in March and later agreed to forgo an extradition hearing and face the U.S. charges.

"He's been transparent and forthright with the government since he got here," said one of his attorneys, Andrew Mancilla.

The Russian agents, Dmitry Dokuchaev and Igor Sushchin, used the information they stole from Yahoo to spy on Russian journalists, U.S. and Russian government officials and employees of financial services and other private businesses, according to prosecutors.

Dokuchaev, Sushchin and a third Russian national, Alexsey Belan, were also named in the indictment filed in February, though it's not clear whether they will ever step foot in an American courtroom since there's no extradition treaty with Russia.

Though the U.S. government had previously charged individual Russian hackers with cybercrime — as well as hackers directly linked to the Chinese and Iranian governments — this was the first criminal case to name as defendants sitting members of the FSB, Russia's federal security service, for hacking charges, the Justice Department said.

Yahoo user accounts began being compromised at least as early as 2014.

Prosecutors say Dokuchaev and Sushchin turned to Baratov after learning that one of their targets had accounts at webmail providers other than Yahoo.