(Adds quotes, background)
MOSCOW, June 4 (Reuters) - Russian Internet giant Yandex said on Tuesday it wanted to abide by the law but not to violate its users' privacy after a media report said security services had demanded it hand over its encryption keys.
The RBC media portal reported earlier on Tuesday that Russia's Federal Security Service (FSB) had asked Yandex to hand over encryption keys for its Yandex.Pochta mail service and Yandex.Disk file hosting service.
That would allow the FSB, the main successor agency to the Soviet-era KGB, to easily access people's communications.
Yandex had not yet complied with the FSB's request, which was made several months ago, as such a move could provide access to user passwords for the whole of Yandex's ecosystem, the report said.
Russia has ramped up Internet controls in the last five years, requiring social networks to store Russian user data on servers within the country and search engines to delete some search results.
"The law talks about providing information 'necessary to decode messages', which does not entail a demand for (encryption) keys to be handed over which are needed for decoding all of the traffic," a spokesman for Yandex said in a written comment.
The spokesman said it was possible to follow the law without violating user privacy.
"We consider it important to observe the balance between security and user privacy, and also to take into account the principles of equal regulation for all market participants." (Reporting by Maria Tsvetkova; writing by Tom Balmforth; editing by Andrew Osborn)