Russian Prime Minister Dmitry Medvedev has said he doubts the legitimacy of Ukraine's new authorities.