Development of the attack in Sections 1-3, calculation of Eve's information and numerical calculation of the optimal parameters in Section 4 were supported by the Russian Science Foundation under grant 17-11-01388 and performed in Steklov Mathematical Institute of Russian Academy of Sciences. Calculation of critical error was performed under grant MK-2815.2017.1. Calculation of the equality for the optimal parameters was performed under the project No. 1.669.2016/1.4.