{"id":311027,"date":"2020-10-06T09:00:37","date_gmt":"2020-10-06T09:00:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=311027"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-10-06T09:00:37","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=311027","title":{"rendered":"\u041d\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f, \u0438\u043b\u0438 \u043a\u0430\u043a \u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u043f\u043e\u0434\u043f\u0438\u0441\u0438 Ed25519 \u043d\u0430 Solidity"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/near\/blog\/522202\/\">\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u0438\u0448\u0443\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043e\u0434\u0438\u043d \u0438\u0437 \u0447\u0430\u0441\u0442\u044b\u0445 \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u0437\u0432\u0443\u0447\u0438\u0442 \u0442\u0430\u043a: \u043d\u0435 \u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u043e\u0432 \u044d\u0442\u043e\u0442 \u0441\u043e\u0432\u0435\u0442 \u0447\u0430\u0441\u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442: \u043d\u0443\u0436\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043b\u0438\u0431\u043e \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u043e\u0432\u0441\u0435, \u043b\u0438\u0431\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u0433\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u0438\u0447\u0438\u043d &mdash; \u0434\u0430\u0436\u0435 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u043d\u0438 <a href=\"https:\/\/github.com\/bitcoin\/bips\/blob\/master\/bip-0066.mediawiki\">\u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b<\/a>. \u0412\u043e\u0442 \u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/Ed25519\">Ed25519<\/a> &mdash; \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0442\u0438\u043f \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439, \u043d\u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445, \u043e\u0434\u043d\u0430\u043a\u043e, \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0430. \u0410 \u0432\u0441\u0451 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0438\u0437 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u043d\u0430 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 Ethereum.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0421\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 &mdash; \u044d\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u00ab\u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430\u00bb. \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0442\u0430\u043a: \u043a\u0430\u0436\u0434\u044b\u0439 \u0443\u0437\u0435\u043b, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043e\u0434 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435, \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439: \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0437\u043b\u043e\u043c\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0442 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u0434\u043b\u044f \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0432 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0437\u044f\u0442\u044c \u043f\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0431\u043e\u0301\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0443\u0437\u043b\u043e\u0432. \u0415\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043e\u0434\u0438\u043d \u0443\u0437\u0435\u043b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0434\u0440\u0443\u0433\u0438\u0435 \u0443\u0437\u043b\u044b \u043d\u0435 \u043f\u0440\u0438\u043c\u0443\u0442 \u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0443 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f, \u0432 \u0438\u0442\u043e\u0433\u0435 \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0442\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0448\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0443\u0437\u043b\u043e\u0432.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<h1 id=\"v-chyom-zhe-problema\">\u0412 \u0447\u0451\u043c \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430?<\/h1>\n<p>  <\/p>\n<p>\u0412 Ethereum \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 &mdash; \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 Ethereum (Ethereum virtual machine, EVM).<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 EVM<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>EVM &mdash; \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u0430\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u043d\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c\u043e\u0441\u0442\u044c: \u043b\u044e\u0431\u0430\u044f \u0431\u0435\u0437 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u0431\u0443\u0434\u0443\u0447\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u043e\u0439 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0434\u043e\u043b\u0436\u043d\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 &mdash; \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b, \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0438\u043b\u0438 \u043b\u044e\u0431\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u043d\u0430\u0447\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u0443\u0437\u043b\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442 \u0440\u0430\u0437\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0442\u0438.<\/p>\n<p>  <\/p>\n<p>EVM \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u043e \u0446\u0435\u043d\u043e\u0439 \u044d\u0442\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0438\u0437\u043a\u0430\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u0441\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u044d\u0442\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043a\u0438 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043d\u0430 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 EVM \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 EVM. \u0415\u0441\u043b\u0438 \u0431\u044b \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u0438 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u043b\u0438 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044e \u0432 EVM-\u0431\u0430\u0439\u0442\u043a\u043e\u0434, \u0438\u0437-\u0437\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043a\u043e\u0434 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Ed25519 \u0431\u044b\u043b \u0431\u044b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u0435\u043d &mdash; \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u0445 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0434\u043d\u043e\u0439 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u0431\u044b \u0434\u0430\u0436\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u043f\u043e\u0434\u043f\u0438\u0441\u044c. \u0412\u043c\u0435\u0441\u0442\u043e \u043d\u0438\u0445, \u0434\u043b\u044f EVM \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432, \u0438 \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 &mdash; <a href=\"https:\/\/ru.wikipedia.org\/wiki\/Solidity\">Solidity<\/a>.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<p>EVM \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440, \u0442\u0430\u043a \u0438 \u043e\u0442 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a JVM \u0438\u043b\u0438 WASM. \u0412 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 32- \u0438 64-\u0431\u0438\u0442\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0432 EVM \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 &mdash; 256-\u0431\u0438\u0442\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Ed25519 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430\u0434 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0449\u0438\u043c\u0438\u0441\u044f \u0432 256 \u0431\u0438\u0442.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u044c Ed25519<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>Ed25519 &mdash; \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A1%D1%85%D0%B5%D0%BC%D0%B0_%D0%A8%D0%BD%D0%BE%D1%80%D1%80%D0%B0\">\u0441\u0445\u0435\u043c\u044b \u0428\u043d\u043e\u0440\u0440\u0430<\/a> \u0438 \u044d\u043b\u043b\u0438\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043a\u0440\u0438\u0432\u043e\u0439 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Curve25519\">Curve25519<\/a>. \u0422\u043e\u0447\u043a\u0438 \u043d\u0430 \u043a\u0440\u0438\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a38\/eb6\/5b9\/a38eb65b9f6ccdff295a05433949b325.svg\" alt=\"$(x, y)$\" data-tex=\"inline\"><\/math>, \u043f\u0440\u0438\u0447\u0451\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/839\/f25\/c27\/839f25c2746382debd4f08ea25ad5ecf.svg\" alt=\"$p$\" data-tex=\"inline\"><\/math>, \u0440\u0430\u0432\u043d\u043e\u0433\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c9b\/abe\/f82\/c9babef82849504d9e035c9c300a0f31.svg\" alt=\"$2^{255}-19$\" data-tex=\"inline\"><\/math> &mdash; \u043e\u0442\u0441\u044e\u0434\u0430 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0440\u0438\u0432\u043e\u0439. \u0414\u043b\u044f \u0442\u043e\u0447\u0435\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A6%D0%B8%D0%BA%D0%BB%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B0%D1%8F_%D0%B3%D1%80%D1%83%D0%BF%D0%BF%D0%B0\">\u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443<\/a>, \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0432\u0435\u043d <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d67\/804\/422\/d67804422223a4f45c993bcf47f2e0f7.svg\" alt=\"$8\\cdot l$\" data-tex=\"inline\"><\/math>, \u0433\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/410\/4d6\/5e0\/4104d65e0366e1792efd07e26a2f118d.svg\" alt=\"$l=2^{252}+27742317777372353535851937790883648493$\" data-tex=\"inline\"><\/math> &mdash; \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/30f\/b68\/14e\/30fb6814eea0091044df0e5de33dfbc2.svg\" alt=\"$l$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  <\/p>\n<p>\u0427\u0435\u0440\u0435\u0437 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u0435\u043a \u043c\u043e\u0436\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043a\u0438 \u043d\u0430 \u0447\u0438\u0441\u043b\u043e. \u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f &mdash; \u043f\u043e\u0438\u0441\u043a \u0447\u0438\u0441\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435, \u0431\u0443\u0434\u0443\u0447\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u0434\u0430\u0441\u0442 \u0434\u0440\u0443\u0433\u0443\u044e \u0437\u0430\u0434\u0430\u043d\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 &mdash; \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041d\u0430 \u044d\u0442\u043e\u043c \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b: \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 &mdash; \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/372\/e18\/546\/372e18546a3b7abb94c2672708bc5dfe.svg\" alt=\"$a$\" data-tex=\"inline\"><\/math>, \u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 &mdash; \u0442\u043e\u0447\u043a\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/463\/7bb\/ce1\/4637bbce172517a6fbfd7923feac966e.svg\" alt=\"$A=a\\cdot G$\" data-tex=\"inline\"><\/math> (<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/560\/bd9\/7f2\/560bd97f235311a36dff00db005e6ab5.svg\" alt=\"$G$\" data-tex=\"inline\"><\/math> &mdash; \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430, \u0438\u043c\u0435\u044e\u0449\u0430\u044f \u043f\u043e\u0440\u044f\u0434\u043e\u043a <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/30f\/b68\/14e\/30fb6814eea0091044df0e5de33dfbc2.svg\" alt=\"$l$\" data-tex=\"inline\"><\/math>). \u0417\u043d\u0430\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/372\/e18\/546\/372e18546a3b7abb94c2672708bc5dfe.svg\" alt=\"$a$\" data-tex=\"inline\"><\/math>, \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math>, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u0445\u043e\u0442\u044f \u0441\u0442\u0440\u043e\u0433\u043e \u044d\u0442\u043e \u043d\u0435 \u0434\u043e\u043a\u0430\u0437\u0430\u043d\u043e).<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0438 Ed25519 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/066\/939\/a33\/066939a33475dd671b845469b6526972.svg\" alt=\"$r$\" data-tex=\"inline\"><\/math> \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0442\u043e\u0447\u043a\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2df\/535\/1bf\/2df5351bf595e033bcae98d4d2994906.svg\" alt=\"$R=r\\cdot G$\" data-tex=\"inline\"><\/math>. \u0417\u0430\u0442\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <a href=\"https:\/\/ru.wikipedia.org\/wiki\/SHA-512\">\u0445\u0435\u0448 SHA-512<\/a> \u043e\u0442 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b81\/a7c\/1e9\/b81a7c1e9676b36cc02ddeea5d5f6e51.svg\" alt=\"$R$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math> (\u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430) \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f: <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/564\/6ed\/374\/5646ed374b510383e838efb4e83a03c7.svg\" alt=\"$h=H(R||A||m)$\" data-tex=\"inline\"><\/math> (\u0437\u0434\u0435\u0441\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/bd2\/36a\/859\/bd236a859d121c85d92d1acf80ba3597.svg\" alt=\"$H$\" data-tex=\"inline\"><\/math> &mdash; \u0445\u0435\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1f4\/0ec\/8c7\/1f40ec8c76d8ec7f636fb542a39a95d7.svg\" alt=\"$||$\" data-tex=\"inline\"><\/math> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c \u0441\u043e \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c). \u0417\u0430\u0442\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/010\/6c0\/610\/0106c06105838553471a4d602860d1f0.svg\" alt=\"$s=r+ha\\bmod l$\" data-tex=\"inline\"><\/math> &mdash; \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0430\u0440\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1da\/349\/4bb\/1da3494bbc3c50c7222124c02000f233.svg\" alt=\"$(R,s)$\" data-tex=\"inline\"><\/math>. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/066\/939\/a33\/066939a33475dd671b845469b6526972.svg\" alt=\"$r$\" data-tex=\"inline\"><\/math> \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e, \u0430 \u043f\u0443\u0442\u0451\u043c \u0445\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0447\u0430\u0441\u0442\u044c\u044e \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430, \u043d\u043e \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0438 \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u0438.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043d\u0443\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/564\/6ed\/374\/5646ed374b510383e838efb4e83a03c7.svg\" alt=\"$h=H(R||A||m)$\" data-tex=\"inline\"><\/math> \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a4e\/b49\/610\/a4eb49610fd258dab4fe9639a00b4526.svg\" alt=\"$s\\cdot G=R+h\\cdot A$\" data-tex=\"inline\"><\/math>. \u041d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043b\u044e\u0431\u0430\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043f\u0440\u043e\u0439\u0434\u0451\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e, \u043d\u0435 \u0438\u043c\u0435\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u0430\u0436\u0435 \u0438\u043c\u0435\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439.<\/p>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0414\u0440\u0443\u0433\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 EVM &mdash; \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u0412 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0432 \u00ab\u043e\u0431\u044b\u0447\u043d\u044b\u0445\u00bb \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d\u0430\u0445 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0432 EVM \u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0432\u0435\u0434\u044c \u0437\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u043f\u043b\u0430\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u044b\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c. \u0417\u0430\u0442\u0440\u0430\u0442\u044b \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u043e\u0439, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0433\u0430\u0437 (gas), \u0438, \u0437\u043d\u0430\u044f \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u0433\u0430\u0437\u0430 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u043e\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0418 \u0437\u0434\u0435\u0441\u044c \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u043e\u0434\u0432\u043e\u0445: \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u043b\u043e \u0431\u044b \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441\u0442\u043e\u0438\u043b\u043e \u0431\u044b \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u0447\u0442\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 256-\u0431\u0438\u0442\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e, \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0435\u043c \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0410 \u0432 EVM \u044d\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0442\u043e\u044f\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. \u0417\u043d\u0430\u0447\u0438\u0442, \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0434\u043b\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0439, \u0434\u043b\u044f EVM \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b.<\/p>\n<p>  <\/p>\n<p>\u0415\u0449\u0451 EVM \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445: \u043a\u043e\u0434, \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 (storage). \u041f\u0430\u043c\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c, \u043d\u043e \u0435\u0451 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430. \u041a\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435. \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c, \u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0435\u043c\u0443, \u0434\u0430\u0436\u0435 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435, \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u0440\u043e\u0436\u0435, \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u0434\u0443 \u0438\u043b\u0438 \u043f\u0430\u043c\u044f\u0442\u0438. \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Ed25519 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0415\u0441\u043b\u0438 \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0438\u0445 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u0442\u043e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043e\u0442\u0442\u0443\u0434\u0430, \u0430 \u044d\u0442\u043e \u0434\u043e\u0440\u043e\u0433\u043e. \u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0438\u0445 \u0432 \u043a\u043e\u0434\u0435, \u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 Solidity \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u043c \u044f\u0437\u044b\u043a\u0435 (\u0445\u043e\u0442\u044f Solidity \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u0438 \u00ab\u0437\u0430\u0448\u0438\u0432\u0430\u0442\u044c\u00bb \u0438\u0445 \u0432 \u043a\u043e\u0434, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u0435\u0451 \u043d\u0435\u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u0438). \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 Solidity \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0446\u0438\u043a\u043b\u043e\u0432), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 Solidity \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u043d\u0430 JavaScript.<\/p>\n<p>  <\/p>\n<p><em>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0434\u0430\u043b\u044c\u0448\u0435, \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/gist.github.com\/abacabadabacaba\/cb927b5ebe6db63f00b98902503ffc76#file-generate-verifier-js\">JavaScript-\u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u0434 \u043d\u0430 Solidity<\/a>, \u0430 \u0442\u0430\u043a\u0436\u0435 <a href=\"https:\/\/gist.github.com\/abacabadabacaba\/9c395588c455ca1f7dccfa853d8fd56d#file-verifier-sol\">\u0441\u0430\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 Solidity<\/a>.<\/em><\/p>\n<p>  <\/p>\n<h1 id=\"pervyy-shag-hesh-funkciya-sha-512\">\u041f\u0435\u0440\u0432\u044b\u0439 \u0448\u0430\u0433: \u0445\u0435\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u044f SHA-512<\/h1>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0449\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 Ed25519 &mdash; \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0445\u0435\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u044e SHA-512. \u0418 \u0434\u0430\u0436\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e. \u0412 EVM \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0445\u0435\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u0439: SHA-256, Keccak-256 (\u043f\u043e\u0447\u0442\u0438 SHA-3-256), \u0434\u0430\u0436\u0435 \u0434\u0440\u0435\u0432\u043d\u044f\u044f RIPEMD-160, \u0430 \u0432\u043e\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 SHA-512 \u043d\u0435\u0442. \u0418 \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e SHA-512 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. EVM &mdash; \u044d\u0442\u043e \u0441\u0442\u0435\u043a\u043e\u0432\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430, \u0438 Solidity \u0445\u0440\u0430\u043d\u0438\u0442 \u0432\u0441\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u0441\u0442\u0435\u043a\u0435. \u0425\u043e\u0442\u044f \u0441\u0442\u0435\u043a \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u043e 1024 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c 16 \u0438\u0437 \u043d\u0438\u0445. \u0415\u0441\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430 \u0441\u0442\u0435\u043a\u0435 \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0434\u043d\u0443 \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 16, \u0442\u043e \u043a\u043e\u0434 \u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f &mdash; \u043b\u0438\u0447\u043d\u043e \u044f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u0430\u044f \u043d\u0435\u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043d\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 SHA-512 &mdash; \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0431\u043b\u043e\u043a\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">w[0..15] := \u0431\u043b\u043e\u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f for i in 16 .. 79:     s0 := (w[i-15] ror 1) ^ (w[i-15] ror 8) ^ (w[i-15] &gt;&gt; 7)     s1 := (w[i-2] ror 19) ^ (w[i-2] ror 61) ^ (w[i-2] &gt;&gt; 6)     w[i] := w[i-16] + s0 + w[i-7] + s1  a, b, c, d, e, f, g, h := h0, h1, h2, h3, h4, h5, h6, h7 for i in 0 .. 79:     S0 := (a ror 28) ^ (a ror 34) ^ (a ror 39)     S1 := (e ror 14) ^ (e ror 18) ^ (e ror 41)     ch := (e &amp; f) ^ (~e &amp; g)     maj := (a &amp; b) ^ (a &amp; c) ^ (b &amp; c)     temp1 := h + S1 + ch + k[i] + w[i]     temp2 := S0 + maj     a, b, c, d, e, f, g, h := temp1 + temp2, a, b, c, d + temp1, e, f, g h0, h1, h2, h3 := h0 + a, h1 + b, h2 + c, h3 + d h4, h5, h6, h7 := h4 + e, h5 + f, h6 + g, h7 + h<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 16 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0430 \u0432\u0435\u0434\u044c \u0435\u0449\u0451 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u0436\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u043c\u0435\u0441\u0442\u043e \u043d\u0430 \u0441\u0442\u0435\u043a\u0435. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043a\u043e\u0434, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0443\u0445\u0438\u0449\u0440\u0435\u043d\u0438\u0439: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043b\u043e\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0436\u0438\u0437\u043d\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u044b\u043b\u0438 \u0431\u043b\u0438\u0436\u0435 \u043a \u043a\u043e\u043d\u0446\u0443 \u0441\u0442\u0435\u043a\u0430, \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439. \u0417\u0430\u043e\u0434\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0433\u043a\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f: \u0432\u043c\u0435\u0441\u0442\u043e <code>(e &amp; f) ^ (~e &amp; g)<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>(e &amp; (f ^ g)) ^ g<\/code>, \u0430 \u0432\u043c\u0435\u0441\u0442\u043e <code>(a &amp; b) ^ (a &amp; c) ^ (b &amp; c)<\/code> &mdash; <code>(a &amp; (b | c)) | (b &amp; c)<\/code> (\u0445\u043e\u0442\u044f \u043c\u043e\u0436\u043d\u043e \u0438 <code>(a &amp; (b ^ c)) ^ (b &amp; c)<\/code>). \u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u0438\u0451\u043c: \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0432\u043e\u0440\u043e\u0442 <code>x<\/code>, \u043d\u0443\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0447\u0438\u0441\u043b\u043e <code>x | (x &lt;&lt; 64)<\/code> \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0435 \u0441\u0434\u0432\u0438\u0433 (\u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435 \u0431\u0438\u0442\u044b <code>x<\/code>, \u043a\u0440\u043e\u043c\u0435 \u043c\u043b\u0430\u0434\u0448\u0438\u0445 64). \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u043f\u043e \u0442\u0440\u0438 \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043e\u0442 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0447\u0438\u0441\u043b\u0430, \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code>x | (x &lt;&lt; 64)<\/code> \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0438 \u0440\u0430\u0437\u0430.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f <code>w[i]<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u043d\u043e\u0432\u0435\u0435 <code>w[i-2]<\/code> (\u0442. \u0435. <code>w[i-1]<\/code> \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f), \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b <code>w<\/code> \u043f\u0430\u0440\u0430\u043c\u0438 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 256-\u0431\u0438\u0442\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u0441\u0432\u043e\u0435\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0439 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/SIMD\">SIMD<\/a>). \u0422\u043e\u0442 \u0436\u0435 \u043f\u0440\u0438\u0451\u043c \u0434\u043b\u044f \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u044b \u043e\u0442 \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b \u0441\u0440\u0430\u0437\u0443.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u0449\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0442\u0430\u043a\u0430\u044f: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0435 16 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <code>w<\/code>, \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 16 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0437\u0430\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445, \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0421\u0430\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>w<\/code> \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0447\u0435\u0442\u044b\u0440\u0435, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0446\u0438\u043a\u043b\u044b (\u043f\u043e 16 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439) \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u044b, \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0446\u0438\u043a\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 4,5 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  <\/p>\n<h1 id=\"raspakovka-tochek\">\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u0442\u043e\u0447\u0435\u043a<\/h1>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044d\u0442\u0430\u043f: \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u0442\u043e\u0447\u0435\u043a. \u0425\u043e\u0442\u044f \u0442\u043e\u0447\u043a\u0438 \u043d\u0430 \u043a\u0440\u0438\u0432\u043e\u0439 Curve25519 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a38\/eb6\/5b9\/a38eb65b9f6ccdff295a05433949b325.svg\" alt=\"$(x, y)$\" data-tex=\"inline\"><\/math>, \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043e\u0431\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0440\u0430\u0441\u0442\u043e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e: \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/817\/b92\/407\/817b92407f764f57af9226e50cc788fd.svg\" alt=\"$x$\" data-tex=\"inline\"><\/math> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u0432\u0443\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9b3\/4c4\/da5\/9b34c4da5c757d4982bbd1b6f2e8998a.svg\" alt=\"$y$\" data-tex=\"inline\"><\/math>, \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u043e\u0447\u043a\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0442\u0430\u043a: \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9b3\/4c4\/da5\/9b34c4da5c757d4982bbd1b6f2e8998a.svg\" alt=\"$y$\" data-tex=\"inline\"><\/math> \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0431\u0438\u0442, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439, \u043a\u0430\u043a\u043e\u0435 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/817\/b92\/407\/817b92407f764f57af9226e50cc788fd.svg\" alt=\"$x$\" data-tex=\"inline\"><\/math> \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1d5\/fb4\/8c4\/1d5fb48c410a6e32b2139334258c1670.svg\" alt=\"$p=2^{255}-19$\" data-tex=\"inline\"><\/math>, \u0442\u0430\u043a\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 32 \u0431\u0430\u0439\u0442\u0430. \u041e\u0434\u043d\u0430\u043a\u043e, \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043d\u0443\u0436\u043d\u044b \u043e\u0431\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/817\/b92\/407\/817b92407f764f57af9226e50cc788fd.svg\" alt=\"$x$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  <\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/817\/b92\/407\/817b92407f764f57af9226e50cc788fd.svg\" alt=\"$x$\" data-tex=\"inline\"><\/math> \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e21\/f5f\/0db\/e21f5f0dbf8d0bc66f643308e35bafcf.svg\" alt=\"$x=\\pm\\sqrt{(y^2-1)\/(dy^2+1)}$\" data-tex=\"inline\"><\/math>. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/ceb\/111\/28c\/ceb11128c38ebc350ac24b30d28ae06e.svg\" alt=\"$-d$\" data-tex=\"inline\"><\/math> \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u043c \u0432\u044b\u0447\u0435\u0442\u043e\u043c \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/839\/f25\/c27\/839f25c2746382debd4f08ea25ad5ecf.svg\" alt=\"$p$\" data-tex=\"inline\"><\/math>, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u044f \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e, \u043e\u0434\u043d\u0430\u043a\u043e, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9b3\/4c4\/da5\/9b34c4da5c757d4982bbd1b6f2e8998a.svg\" alt=\"$y$\" data-tex=\"inline\"><\/math>. \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f. \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u044d\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u0442\u044c. \u041f\u0443\u0441\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/201\/453\/cd0\/201453cd0d6cd87f09303e53856dd31a.svg\" alt=\"$\\sqrt{u\/v}$\" data-tex=\"inline\"><\/math>, \u043f\u0440\u0438\u0447\u0451\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a08\/07b\/0fc\/a0807b0fc13e411e3935805127031a24.svg\" alt=\"$v\\ne0$\" data-tex=\"inline\"><\/math>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e <a href=\"https:\/\/ed25519.cr.yp.to\/ed25519-20110926.pdf\">\u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f Ed25519<\/a> \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0442\u0430\u043a\u0443\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0443\u044e \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/665\/d9e\/5e8\/665d9e5e8dca725855493d2cc86795ac.svg\" alt=\"$p\\equiv5\\pmod8$\" data-tex=\"inline\"><\/math>):<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d37\/958\/8cc\/d379588ccbb76209c6ab76a859ee69b1.svg\" alt=\"$\\beta=uv^3(uv^7)^{(p-5)\/8}$\" data-tex=\"inline\"><\/math>.<\/li>\n<li>\u0415\u0441\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fce\/611\/e51\/fce611e517bfd9c5ad5b12e0ed180213.svg\" alt=\"$v\\beta^2=u$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u043e\u0442\u0432\u0435\u0442 \u0440\u0430\u0432\u0435\u043d <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1dd\/491\/b2e\/1dd491b2ef892df0a581af9f5ebc0486.svg\" alt=\"$\\pm\\beta$\" data-tex=\"inline\"><\/math>.<\/li>\n<li>\u0418\u043d\u0430\u0447\u0435, \u0435\u0441\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f36\/44c\/34d\/f3644c34d438f275516d0cfde20f74c6.svg\" alt=\"$v\\beta^2=-u$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u043e\u0442\u0432\u0435\u0442 \u0440\u0430\u0432\u0435\u043d <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d0b\/434\/95c\/d0b43495c4ab0ca2426825b6554f86bd.svg\" alt=\"$\\pm\\sqrt{-1}\\beta$\" data-tex=\"inline\"><\/math>.<\/li>\n<li>\u0418\u043d\u0430\u0447\u0435, \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442? \u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e2c\/caf\/7f7\/e2ccaf7f7493bade6a533133a9bf5db5.svg\" alt=\"$\\beta^8=u^8v^{24}(uv^7)^{p-5}=u^{p+3}v^{7p-11}=(u\/v)^4$\" data-tex=\"inline\"><\/math>, \u043e\u0442\u043a\u0443\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1fa\/0f7\/3b0\/1fa0f73b0af180aad7960b8788755a45.svg\" alt=\"$\\beta^2=\\pm u\/v$\" data-tex=\"inline\"><\/math> \u0438\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a8e\/8ad\/005\/a8e8ad005cc05aa6194ea8ba0af89d7a.svg\" alt=\"$\\beta^2=\\pm\\sqrt{-1}u\/v$\" data-tex=\"inline\"><\/math>. \u0415\u0441\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0435 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e (\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d08\/a43\/419\/d08a434198528aac641afda1768f1b85.svg\" alt=\"$u\\ne0$\" data-tex=\"inline\"><\/math>), \u0442\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u044f \u0438\u0437 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8c1\/a3a\/5df\/8c1a3a5df0f73dd1226e764bb8d216f7.svg\" alt=\"$u\/v$\" data-tex=\"inline\"><\/math> \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/868\/105\/27d\/86810527d78297cd61deac5bc8203ad9.svg\" alt=\"$\\sqrt{-1}$\" data-tex=\"inline\"><\/math> \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u043d\u044b\u043c \u0432\u044b\u0447\u0435\u0442\u043e\u043c. \u0415\u0441\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a01\/c5f\/b9e\/a01c5fb9ee41d1a8ba77e68aff2e45e4.svg\" alt=\"$\\beta^2=-u\/v$\" data-tex=\"inline\"><\/math>, \u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/723\/6c6\/60b\/7236c660b950aa72ad216744393b7161.svg\" alt=\"$(\\sqrt{-1}\\beta)^2=u\/v$\" data-tex=\"inline\"><\/math>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043e\u0442\u0432\u0435\u0442, \u0435\u0441\u043b\u0438 \u043e\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u044d\u0442\u0443 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0433\u043a\u0430 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c: \u0432\u043c\u0435\u0441\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d37\/958\/8cc\/d379588ccbb76209c6ab76a859ee69b1.svg\" alt=\"$\\beta=uv^3(uv^7)^{(p-5)\/8}$\" data-tex=\"inline\"><\/math> \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3ba\/739\/4c0\/3ba7394c01a8d47db21ddefabf4ff485.svg\" alt=\"$\\beta=u(uv)^{(p-5)\/8}$\" data-tex=\"inline\"><\/math>. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/956\/332\/bb4\/956332bb419c5cab8488d64cee806f52.svg\" alt=\"$\\beta^8=u^8(uv)^{p-5}=u^{p+3}v^{p-5}=(u\/v)^4$\" data-tex=\"inline\"><\/math>, \u0434\u0430\u043b\u044c\u0448\u0435 \u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1c1\/778\/187\/1c1778187263268cc347012d16da61e2.svg\" alt=\"$v$\" data-tex=\"inline\"><\/math> \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e2b\/1e0\/8fb\/e2b1e08fb963c5ccde704a8389faeddf.svg\" alt=\"$v^{2^{250}-1}$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7e5\/565\/2a9\/7e55652a9fec0be7bd0aaf4e89559e02.svg\" alt=\"$v^{11}$\" data-tex=\"inline\"><\/math> \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/839\/f25\/c27\/839f25c2746382debd4f08ea25ad5ecf.svg\" alt=\"$p$\" data-tex=\"inline\"><\/math>, \u044d\u0442\u0430 \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/839\/f25\/c27\/839f25c2746382debd4f08ea25ad5ecf.svg\" alt=\"$p$\" data-tex=\"inline\"><\/math> (\u0432 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u043d\u0430\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0430\u0434\u0434\u0438\u0442\u0438\u0432\u043d\u0430\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430).<\/p>\n<p>  <\/p>\n<h1 id=\"dvoynoe-umnozhenie\">\u0414\u0432\u043e\u0439\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435<\/h1>\n<p>  <\/p>\n<p>\u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/036\/25a\/da1\/03625ada1fe4b20213f5946cfbef1126.svg\" alt=\"$sG=R+hA$\" data-tex=\"inline\"><\/math>. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u0442\u043e\u0447\u043a\u0438 (<math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b81\/a7c\/1e9\/b81a7c1e9676b36cc02ddeea5d5f6e51.svg\" alt=\"$R$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math>), \u043d\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u044d\u0442\u0430, \u0434\u0435\u043b\u0430\u044e\u0442 \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443: \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6fd\/a3f\/060\/6fda3f060b5183283183b760be0864b9.svg\" alt=\"$sG-hA$\" data-tex=\"inline\"><\/math>, \u0437\u0430\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u044e\u0442 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442 \u0441 \u0437\u0430\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b81\/a7c\/1e9\/b81a7c1e9676b36cc02ddeea5d5f6e51.svg\" alt=\"$R$\" data-tex=\"inline\"><\/math>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0441\u0451, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f &mdash; \u044d\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6fd\/a3f\/060\/6fda3f060b5183283183b760be0864b9.svg\" alt=\"$sG-hA$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/13a\/34e\/f51\/13a34ef516aeca8dedbed7ecc4b6ef49.svg\" alt=\"$sG$\" data-tex=\"inline\"><\/math> \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9f8\/10d\/1ad\/9f810d1adc8fa5dae569e3379051b232.svg\" alt=\"$hA$\" data-tex=\"inline\"><\/math>, \u043d\u043e \u044d\u0442\u043e \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e. \u0411\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 &mdash; \u00ab\u0443\u0434\u0432\u043e\u0438\u0442\u044c \u0438 \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u0442\u044c\u00bb (double-and-add), \u0432 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">result := 0 for bit_index in n-1 .. 0:     result := double(result)     if s &amp; (1&lt;&lt;bit_index) != 0:         result := add(result, G)     if h &amp; (1&lt;&lt;bit_index) != 0:         result := subtract(result, A)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08d\/9fa\/efb\/08d9faefbe272bdf8fbb80773542e343.svg\" alt=\"$n$\" data-tex=\"inline\"><\/math> &mdash; \u0447\u0438\u0441\u043b\u043e \u0431\u0438\u0442 \u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f9d\/da2\/695\/f9dda26950cb67bd3ecef956c5341c14.svg\" alt=\"$s$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/517\/4f4\/9cc\/5174f49cc4f41fc5c4802c76f4c76c5a.svg\" alt=\"$h$\" data-tex=\"inline\"><\/math>. \u042d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0431\u0438\u0442\u044b \u0432 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f9d\/da2\/695\/f9dda26950cb67bd3ecef956c5341c14.svg\" alt=\"$s$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/517\/4f4\/9cc\/5174f49cc4f41fc5c4802c76f4c76c5a.svg\" alt=\"$h$\" data-tex=\"inline\"><\/math>, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u043e \u0441\u0442\u0430\u0440\u0448\u0435\u0433\u043e, \u0438 \u043f\u0440\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u0430 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/560\/bd9\/7f2\/560bd97f235311a36dff00db005e6ab5.svg\" alt=\"$G$\" data-tex=\"inline\"><\/math> \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443 (\u0438\u043b\u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u0435\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math>). \u042d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08d\/9fa\/efb\/08d9faefbe272bdf8fbb80773542e343.svg\" alt=\"$n$\" data-tex=\"inline\"><\/math> \u0443\u0434\u0432\u043e\u0435\u043d\u0438\u0439 \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/08d\/9fa\/efb\/08d9faefbe272bdf8fbb80773542e343.svg\" alt=\"$n$\" data-tex=\"inline\"><\/math> (\u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c) \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0435\u0441\u043b\u0438 \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0431\u0438\u0442\u044b \u0447\u0438\u0441\u0435\u043b <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f9d\/da2\/695\/f9dda26950cb67bd3ecef956c5341c14.svg\" alt=\"$s$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/517\/4f4\/9cc\/5174f49cc4f41fc5c4802c76f4c76c5a.svg\" alt=\"$h$\" data-tex=\"inline\"><\/math> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f9c\/3c8\/e48\/f9c3c8e488ead4696749012f5ece6d13.svg\" alt=\"$0$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3e4\/c77\/a6e\/3e4c77a6e7c579a778fa84a18b6f4be0.svg\" alt=\"$1$\" data-tex=\"inline\"><\/math> \u0441 \u0440\u0430\u0432\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e. \u041d\u043e \u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c. \u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u043c \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043e\u043d \u00ab\u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u00bb \u043e\u0434\u0438\u043d \u0431\u0438\u0442 \u0432 \u0447\u0438\u0441\u043b\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f9d\/da2\/695\/f9dda26950cb67bd3ecef956c5341c14.svg\" alt=\"$s$\" data-tex=\"inline\"><\/math> \u0438\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/517\/4f4\/9cc\/5174f49cc4f41fc5c4802c76f4c76c5a.svg\" alt=\"$h$\" data-tex=\"inline\"><\/math>, \u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u043b \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u0440\u0430\u0442\u043d\u044b\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/560\/bd9\/7f2\/560bd97f235311a36dff00db005e6ab5.svg\" alt=\"$G$\" data-tex=\"inline\"><\/math> \u0441 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430\u043c\u0438 \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/629\/49c\/c28\/62949cc2886126a1d03b7c9a0a24c515.svg\" alt=\"$2^k$\" data-tex=\"inline\"><\/math> \u0434\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6ce\/e24\/5c6\/6cee245c67203d121d50ef9e566e21e1.svg\" alt=\"$2^{k+1}-1$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/44c\/562\/936\/44c562936a615ceeecfca5c080e31de8.svg\" alt=\"$k+1$\" data-tex=\"inline\"><\/math> \u0431\u0438\u0442! \u042d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">result := 0 for bit_index in n-1 .. k:     result := double(result)     if s &amp; (1&lt;&lt;bit_index) != 0:         result := add(result, Gmul[s &gt;&gt; (bit_index-k)])         s := s &amp; ((1 &lt;&lt; (bit_index-k)) - 1)     if h &amp; (1&lt;&lt;bit_index) != 0:         result := subtract(result, Amul[h &gt;&gt; (bit_index-k)])         h := h &amp; ((1 &lt;&lt; (bit_index-k)) - 1)<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0439 \u0431\u0438\u0442, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u0438 \u0435\u0433\u043e, \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0431\u0438\u0442. \u0417\u0430\u0442\u0435\u043c \u043e\u043d \u00ab\u0432\u044b\u0440\u0435\u0437\u0430\u0435\u0442\u00bb \u044d\u0442\u0438 \u0431\u0438\u0442\u044b \u0438\u0437 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f9d\/da2\/695\/f9dda26950cb67bd3ecef956c5341c14.svg\" alt=\"$s$\" data-tex=\"inline\"><\/math> \u0438\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/517\/4f4\/9cc\/5174f49cc4f41fc5c4802c76f4c76c5a.svg\" alt=\"$h$\" data-tex=\"inline\"><\/math>, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e. \u041f\u0440\u0430\u0432\u0434\u0430, \u0443 \u044d\u0442\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0435\u0441\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> \u043c\u043b\u0430\u0434\u0448\u0438\u0445 \u0431\u0438\u0442 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0434\u0432\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0414\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f9d\/da2\/695\/f9dda26950cb67bd3ecef956c5341c14.svg\" alt=\"$s$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/560\/bd9\/7f2\/560bd97f235311a36dff00db005e6ab5.svg\" alt=\"$G$\" data-tex=\"inline\"><\/math> \u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043a\u0440\u0430\u0442\u043d\u044b\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/560\/bd9\/7f2\/560bd97f235311a36dff00db005e6ab5.svg\" alt=\"$G$\" data-tex=\"inline\"><\/math> \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u044b \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u0437\u0430\u0448\u0438\u0442\u044b \u0432 \u043a\u043e\u0434. \u042f \u0443\u043c\u043d\u043e\u0436\u0438\u043b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f9d\/da2\/695\/f9dda26950cb67bd3ecef956c5341c14.svg\" alt=\"$s$\" data-tex=\"inline\"><\/math> \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/629\/49c\/c28\/62949cc2886126a1d03b7c9a0a24c515.svg\" alt=\"$2^k$\" data-tex=\"inline\"><\/math>, \u0430 \u043a\u0440\u0430\u0442\u043d\u044b\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/560\/bd9\/7f2\/560bd97f235311a36dff00db005e6ab5.svg\" alt=\"$G$\" data-tex=\"inline\"><\/math> &mdash; \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dfa\/ea8\/b15\/dfaea8b15069e25c7ed3993a976650f0.svg\" alt=\"$2^{-k}\\bmod l$\" data-tex=\"inline\"><\/math>. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/629\/49c\/c28\/62949cc2886126a1d03b7c9a0a24c515.svg\" alt=\"$2^k$\" data-tex=\"inline\"><\/math> \u043c\u043b\u0430\u0434\u0448\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> \u0431\u0438\u0442 \u0443 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f9d\/da2\/695\/f9dda26950cb67bd3ecef956c5341c14.svg\" alt=\"$s$\" data-tex=\"inline\"><\/math> \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u043d\u0443\u043b\u0435\u0432\u044b\u0435.<\/li>\n<li>\u0414\u043b\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/517\/4f4\/9cc\/5174f49cc4f41fc5c4802c76f4c76c5a.svg\" alt=\"$h$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math> \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u042f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0443\u043c\u043d\u043e\u0436\u0438\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/517\/4f4\/9cc\/5174f49cc4f41fc5c4802c76f4c76c5a.svg\" alt=\"$h$\" data-tex=\"inline\"><\/math> \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/dfa\/ea8\/b15\/dfaea8b15069e25c7ed3993a976650f0.svg\" alt=\"$2^{-k}\\bmod l$\" data-tex=\"inline\"><\/math> \u0438 \u0437\u0430\u0442\u0435\u043c \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/629\/49c\/c28\/62949cc2886126a1d03b7c9a0a24c515.svg\" alt=\"$2^k$\" data-tex=\"inline\"><\/math>, \u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0435\u0436\u0438\u0442 \u0432 \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/30f\/b68\/14e\/30fb6814eea0091044df0e5de33dfbc2.svg\" alt=\"$l$\" data-tex=\"inline\"><\/math>. \u0415\u0441\u043b\u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math> \u043d\u0435 \u043b\u0435\u0436\u0438\u0442 \u0432 \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/30f\/b68\/14e\/30fb6814eea0091044df0e5de33dfbc2.svg\" alt=\"$l$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/173\/fd6\/e07\/173fd6e07a6248d512fc5f09560d3e5c.svg\" alt=\"$(h2^{-k}\\bmod l)\\cdot2^k$\" data-tex=\"inline\"><\/math> \u043d\u0435 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044e \u043d\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/517\/4f4\/9cc\/5174f49cc4f41fc5c4802c76f4c76c5a.svg\" alt=\"$h$\" data-tex=\"inline\"><\/math>, \u0430 \u0435\u0441\u043b\u0438 \u0432\u043c\u0435\u0441\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/30f\/b68\/14e\/30fb6814eea0091044df0e5de33dfbc2.svg\" alt=\"$l$\" data-tex=\"inline\"><\/math> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b0d\/261\/270\/b0d261270ce99ba78556ca5e0058e9d8.svg\" alt=\"$8l$\" data-tex=\"inline\"><\/math> (\u043f\u043e\u043b\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0433\u0440\u0443\u043f\u043f\u044b), \u0442\u043e \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0ff\/b9c\/a75\/0ffb9ca75b13042cfe0bc1a2c50c3d45.svg\" alt=\"$2^{-k}$\" data-tex=\"inline\"><\/math>. \u0412 \u0438\u0442\u043e\u0433\u0435, \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a: \u0432\u043c\u0435\u0441\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/517\/4f4\/9cc\/5174f49cc4f41fc5c4802c76f4c76c5a.svg\" alt=\"$h$\" data-tex=\"inline\"><\/math> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/011\/501\/324\/011501324b9e292785afdda2f8407db1.svg\" alt=\"$h+8l-2^k$\" data-tex=\"inline\"><\/math> (\u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a31\/392\/f71\/a31392f71d06b0a578ef032f33269d57.svg\" alt=\"$h-2^k$\" data-tex=\"inline\"><\/math> \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b0d\/261\/270\/b0d261270ce99ba78556ca5e0058e9d8.svg\" alt=\"$8l$\" data-tex=\"inline\"><\/math>), \u0430 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435: <code>result := subtract(result, Amul[(1 &lt;&lt; k) + h])<\/code>, \u0442\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/16d\/a50\/7b2\/16da507b2fc389688ef0659939dcc647.svg\" alt=\"$k$\" data-tex=\"inline\"><\/math> \u043c\u043b\u0430\u0434\u0448\u0438\u0445 \u0431\u0438\u0442, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u0431\u0430\u0432\u043a\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/629\/49c\/c28\/62949cc2886126a1d03b7c9a0a24c515.svg\" alt=\"$2^k$\" data-tex=\"inline\"><\/math> \u043d\u0443\u0436\u043d\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u0440\u0430\u0442\u043d\u044b\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/493\/c1c\/008\/493c1c008018df9bed4910321f29ff00.svg\" alt=\"$A$\" data-tex=\"inline\"><\/math> \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u043e\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/629\/49c\/c28\/62949cc2886126a1d03b7c9a0a24c515.svg\" alt=\"$2^k$\" data-tex=\"inline\"><\/math> \u0434\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6ce\/e24\/5c6\/6cee245c67203d121d50ef9e566e21e1.svg\" alt=\"$2^{k+1}-1$\" data-tex=\"inline\"><\/math>.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c70\/8e5\/434\/c708e5434f493356304a46d3301ef8b0.svg\" alt=\"$k=3$\" data-tex=\"inline\"><\/math>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0431\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0442\u0440\u0430\u0442\u0430\u043c\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u0447\u0451\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0435\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435.<\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441: \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435 \u0438 \u0443\u0434\u0432\u043e\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u0435\u043a. \u041e\u0431\u044b\u0447\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 \u0440\u0430\u0441\u0447\u0451\u0442\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/839\/f25\/c27\/839f25c2746382debd4f08ea25ad5ecf.svg\" alt=\"$p$\" data-tex=\"inline\"><\/math> \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u0440\u043e\u0436\u0435 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0412 EVM \u044d\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0442\u043e\u044f\u0442 \u043f\u043e\u0447\u0442\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u043b\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u0412 \u044d\u0442\u043e\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0443\u043b \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430 \u044d\u043b\u043b\u0438\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u0440\u0438\u0432\u044b\u0445 &mdash; <a href=\"https:\/\/hyperelliptic.org\/EFD\/\">Explicit-Formulas Database<\/a>. \u0412\u043e\u0442 <a href=\"https:\/\/hyperelliptic.org\/EFD\/g1p\/auto-twisted-extended-1.html\">\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441 \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c\u0438<\/a> \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043a\u0440\u0438\u0432\u043e\u0439, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f Curve25519. \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0444\u043e\u0440\u043c\u0443\u043b \u0443\u043a\u0430\u0437\u0430\u043d\u0430 <a href=\"https:\/\/eprint.iacr.org\/2008\/522.pdf\">\u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 \u0441\u0442\u0430\u0442\u044c\u044f<\/a>. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435\u0442 \u0432 EFD, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u044b\u043c\u0438, \u0430 \u043a\u0430\u043a\u0438\u0435 \u043d\u0435\u0442. \u041d\u0435\u043f\u043e\u043b\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c: \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u0430\u0445, \u043d\u043e \u043d\u0430 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0434\u0430\u0442\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 -2 \u0438\u043b\u0438 -4 (<a href=\"https:\/\/hyperelliptic.org\/EFD\/g1p\/auto-twisted-extended-1.html\">\u0441\u043c. \u0441\u043f\u0438\u0441\u043e\u043a<\/a>), \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u043b\u043d\u044b\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 (\u0445\u043e\u0442\u044f \u043e\u043d\u0438 \u0438 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435). \u0412 \u0438\u0442\u043e\u0433\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u044b \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u00abmadd-2008-hwcd-3\u00bb \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u00abdbl-2008-hwcd\u00bb \u0434\u043b\u044f \u0443\u0434\u0432\u043e\u0435\u043d\u0438\u044f (\u0442\u0430\u043c \u043d\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0432\u044b\u0431\u043e\u0440\u0430). \u041e\u0434\u043d\u0430\u043a\u043e, \u044f \u0432\u043d\u0451\u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044f \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b. \u0422\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b (extended projective coordinates) &mdash; \u0442\u0430\u043a\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c62\/ff2\/5ef\/c62ff25ef4caeaeaef7122a489ef9d07.svg\" alt=\"$Y$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/274\/25a\/3cd\/27425a3cdf6cdf9dea5baa307429b5a7.svg\" alt=\"$Z$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/175\/f98\/839\/175f98839ab732db76d5f20cd6ce2ce9.svg\" alt=\"$T$\" data-tex=\"inline\"><\/math>, \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/786\/4d8\/1fe\/7864d81fe722fc4be54de2c0a5193162.svg\" alt=\"$x=X\/Z$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/43a\/6ea\/aa6\/43a6eaaa6c097b4a88488a6bb8629020.svg\" alt=\"$y=Y\/Z$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c9e\/7ba\/0af\/c9e7ba0af2ba3f4e063b41a0e2ae6bb6.svg\" alt=\"$xy=T\/Z$\" data-tex=\"inline\"><\/math>. \u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u0444\u043e\u0440\u043c\u0443\u043b\u0435 \u0434\u043b\u044f \u0443\u0434\u0432\u043e\u0435\u043d\u0438\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/175\/f98\/839\/175f98839ab732db76d5f20cd6ce2ce9.svg\" alt=\"$T$\" data-tex=\"inline\"><\/math> \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442 \u0435\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f &mdash; \u0443\u0434\u0432\u043e\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u0430\u043a \u043f\u0440\u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0442\u0430\u043a \u0438 \u043f\u0440\u0438 \u0443\u0434\u0432\u043e\u0435\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d07\/cc5\/b26\/d07cc5b26db621faab45e0e0b54ede62.svg\" alt=\"$U$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c62\/ff2\/5ef\/c62ff25ef4caeaeaef7122a489ef9d07.svg\" alt=\"$Y$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/836\/e59\/247\/836e59247dee9dc566df40f0f1d606e8.svg\" alt=\"$V$\" data-tex=\"inline\"><\/math>, \u0442\u0430\u043a\u0438\u0445 \u0447\u0442\u043e <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/61c\/a01\/eec\/61ca01eecd0af8cd72d8d682509b49fa.svg\" alt=\"$x=X\/U$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/97b\/d0e\/c13\/97bd0ec1355fd463890a8bf9e3ddc0c9.svg\" alt=\"$y=Y\/V$\" data-tex=\"inline\"><\/math>, \u0430 \u0437\u0430\u0442\u0435\u043c \u044d\u0442\u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0435, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0447\u0435\u0442\u044b\u0440\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f (\u0438\u043b\u0438 \u0442\u0440\u0438, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/175\/f98\/839\/175f98839ab732db76d5f20cd6ce2ce9.svg\" alt=\"$T$\" data-tex=\"inline\"><\/math>). \u042f \u0440\u0435\u0448\u0438\u043b \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u0447\u043a\u0438 \u0432 \u0432\u0438\u0434\u0435 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6d6\/a4f\/78f\/6d6a4f78fbacd6edecc018ce8ad3e364.svg\" alt=\"$X$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d07\/cc5\/b26\/d07cc5b26db621faab45e0e0b54ede62.svg\" alt=\"$U$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c62\/ff2\/5ef\/c62ff25ef4caeaeaef7122a489ef9d07.svg\" alt=\"$Y$\" data-tex=\"inline\"><\/math>, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/836\/e59\/247\/836e59247dee9dc566df40f0f1d606e8.svg\" alt=\"$V$\" data-tex=\"inline\"><\/math>, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043e\u0434\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0443\u0434\u0432\u043e\u0435\u043d\u0438\u0438 \u0438\u0437-\u0437\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/175\/f98\/839\/175f98839ab732db76d5f20cd6ce2ce9.svg\" alt=\"$T$\" data-tex=\"inline\"><\/math>.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u044f \u043f\u0440\u043e\u0434\u0443\u043c\u0430\u043b \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a. \u0424\u043e\u0440\u043c\u0443\u043b\u044b madd \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0435 \u0441\u043c\u0435\u0448\u0430\u043d\u043d\u043e\u0435 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (mixed addition) &mdash; \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0442\u043e\u0447\u0435\u043a, \u0447\u0442\u043e\u0431\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u041c\u043d\u0435 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e: \u0443 \u043c\u0435\u043d\u044f \u0432\u043e\u0441\u0435\u043c\u044c \u0442\u043e\u0447\u0435\u043a \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043e \u0435\u0449\u0451 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u0438 \u0435\u0449\u0451 \u0432\u043e\u0441\u0435\u043c\u044c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f; \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u044f \u0438\u0445 \u0432 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0444\u043e\u0440\u043c\u0443, \u043c\u043e\u0436\u043d\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0430 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043a\u043e\u043b\u043e \u0441\u0442\u0430. \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435: <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f17\/c3b\/414\/f17c3b414df08c6cec01a832da9ab0ee.svg\" alt=\"$((y+x)\/2, (y-x)\/2, xyd)$\" data-tex=\"inline\"><\/math>. \u041f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0431\u043e\u043b\u0435\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/125\/471\/fc8\/125471fc83873da99827413f02f57f6f.svg\" alt=\"$(y+x, y-x, xy\\cdot2d)$\" data-tex=\"inline\"><\/math>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 libsodium) \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043e\u0434\u043d\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 2, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432 EVM \u0441\u0442\u043e\u0438\u0442, \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\/\/ \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435: \/\/ \u0422\u043e\u0447\u043a\u0430 1: (x1, u1, y1, v1), x=x1\/u1, y=y1\/v1. \/\/ \u0422\u043e\u0447\u043a\u0430 2: (s2, d2, t2), s2=(y+x)\/2, d2=(y-x)\/2, t2=x*y*d. \/\/ \u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435: \/\/ \u0422\u043e\u0447\u043a\u0430 3: (x3, u3, y3, v3), x=x3\/u3, y=y3\/v3.  \/\/ \u0422\u043e\u0447\u043a\u0430 (x4, y4, z4, t4) - \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u0442\u043e\u0447\u043a\u0430 1, \u043d\u043e \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u0445. x4 := x1 * v1 y4 := y1 * u1 z4 := u1 * v1 t4 := x1 * y1  \/\/ \u0414\u0430\u043b\u0435\u0435 \u0441\u043c. \u0444\u043e\u0440\u043c\u0443\u043b\u044b madd-2008-hwcd-3. s4 := y4 + x4 d4 := y4 - x4 a := d4 * d2 \/\/ (y4-x4)*(y2-x2)\/2, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 A\/2. b := s4 * s2 \/\/ (y4+x4)*(y2+x2)\/2, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 B\/2. c := t4 * t2 \/\/ \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 C\/2.              \/\/ D\/2 - \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e z4, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e. x3 := b - a  \/\/ E\/2. u3 := z4 + c \/\/ G\/2. y3 := b + a  \/\/ H\/2. v3 := z4 - c \/\/ F\/2. \/\/ \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f x3, u3, y3, v3 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 E, G, H, F \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u043c 1\/2, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f x3\/u3 \u0438 y3\/v3 \u0442\u0435 \u0436\u0435 \u0441\u0430\u043c\u044b\u0435.<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434 \u0434\u043b\u044f \u0443\u0434\u0432\u043e\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">\/\/ \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435: \/\/ \u0422\u043e\u0447\u043a\u0430 1: (x1, u1, y1, v1), x=x1\/u1, y=y1\/v1. \/\/ \u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435: \/\/ \u0422\u043e\u0447\u043a\u0430 2: (x2, u2, y2, v2), x=x2\/u2, y=y2\/v2.  \/\/ \u0422\u043e\u0447\u043a\u0430 (x3, y3, z3) - \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u0442\u043e\u0447\u043a\u0430 1, \u043d\u043e \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u0445. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 t3 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. x3 := x1 * v1 y3 := y1 * u1 z3 := u1 * v1  \/\/ \u0414\u0430\u043b\u0435\u0435 \u0441\u043c. \u0444\u043e\u0440\u043c\u0443\u043b\u044b dbl-2008-hwcd. xx := x3 * x3 \/\/ A. yy := y3 * y3 \/\/ B. xy := x3 * y3 \/\/ \u0410 \u0432\u043e\u0442 \u0437\u0434\u0435\u0441\u044c \u0432\u044b\u0433\u043e\u0434\u043d\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c E \u043a\u0430\u043a 2xy, \u0430 \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u0442\u0430\u043c. zz := z3 * z3 x2 := xy + xy \/\/ E. u2 := yy - xx \/\/ G. y2 := yy + xx \/\/ -H. v2 := zz + zz - u2 \/\/ -F. \/\/ \u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 -1 \u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 y2 \u0438 v2 \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0449\u0451 \u043e\u0434\u043d\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f: \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e <code>addmod<\/code> (\u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e). \u0415\u0441\u043b\u0438 \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0435 \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/fa1\/1e4\/94d\/fa11e494df43a4d7b4353cb8b3121814.svg\" alt=\"$2^{255}$\" data-tex=\"inline\"><\/math>, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (\u043e\u043d\u043e \u0434\u0435\u0448\u0435\u0432\u043b\u0435), \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0438\u0442 256-\u0431\u0438\u0442\u043d\u044b\u0439 \u0442\u0438\u043f. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043e\u0434\u043d\u0430\u043a\u043e, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u043b\u043e\u0436\u0438\u0442\u044c \u0442\u0440\u0438 \u0447\u0438\u0441\u043b\u0430, \u0442\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e\u0435 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e.<\/p>\n<p>  <\/p>\n<h1 id=\"proverka-rezultata\">\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430<\/h1>\n<p>  <\/p>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043d\u0443\u0436\u043d\u043e \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u0442\u044c. \u042d\u0442\u043e \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e: \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/61c\/a01\/eec\/61ca01eecd0af8cd72d8d682509b49fa.svg\" alt=\"$x=X\/U$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/97b\/d0e\/c13\/97bd0ec1355fd463890a8bf9e3ddc0c9.svg\" alt=\"$y=Y\/V$\" data-tex=\"inline\"><\/math>, \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043b\u0430\u0434\u0448\u0438\u0439 \u0431\u0438\u0442 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/817\/b92\/407\/817b92407f764f57af9226e50cc788fd.svg\" alt=\"$x$\" data-tex=\"inline\"><\/math> \u043d\u0430 \u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0430\u0440\u0448\u0435\u0433\u043e \u0431\u0438\u0442\u0430 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9b3\/4c4\/da5\/9b34c4da5c757d4982bbd1b6f2e8998a.svg\" alt=\"$y$\" data-tex=\"inline\"><\/math>. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e &mdash; \u0437\u0430\u0442\u0440\u0430\u0442\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f (\u043e\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b97\/149\/3d0\/b971493d0b7474568e9c48471dc63996.svg\" alt=\"$p-2$\" data-tex=\"inline\"><\/math>), \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437: \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8af\/85f\/4ed\/8af85f4ed06e0b5a69649439ac54a61c.svg\" alt=\"$(UV)^{-1}$\" data-tex=\"inline\"><\/math>, \u0438\u0437 \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/687\/41a\/682\/68741a682c45558505dcea9a77b4b3a0.svg\" alt=\"$U^{-1}=(UV)^{-1}V$\" data-tex=\"inline\"><\/math> \u0438 <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/048\/73e\/208\/04873e2083158ab5f647f343e47dc7f9.svg\" alt=\"$V^{-1}=(UV)^{-1}U$\" data-tex=\"inline\"><\/math>. \u0423\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <math><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b81\/a7c\/1e9\/b81a7c1e9676b36cc02ddeea5d5f6e51.svg\" alt=\"$R$\" data-tex=\"inline\"><\/math>, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0432 \u043f\u043e\u0434\u043f\u0438\u0441\u0438. \u0415\u0441\u043b\u0438 \u0441\u043e\u0432\u043f\u0430\u043b\u0430, \u0442\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f. \u0412\u043e\u0442 \u0438 \u0432\u0441\u0451.<\/p>\n<p>  <\/p>\n<h1 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>  <\/p>\n<p>\u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432 NEAR \u043d\u0435\u0442 \u043d\u0443\u0436\u0434\u044b \u0432 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0438\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f\u0445 \u0441 \u043a\u043e\u0434\u043e\u043c. \u0421\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 Rust \u0438 AssemblyScript (\u043f\u043e\u0445\u043e\u0436 \u043d\u0430 TypeScript) \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043e\u0434 NEAR, \u0438 \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043d\u043b\u0430\u0439\u043d-IDE \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/examples.near.org\/\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u0432\u0441\u0435\u043c\u0438 \u043d\u043e\u0432\u043e\u0441\u0442\u044f\u043c\u0438 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0432 <a href=\"https:\/\/t.me\/near_protocol\">\u0433\u0440\u0443\u043f\u043f\u0435 \u0432 \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u0435<\/a> \u0438 \u0432 <a href=\"https:\/\/vk.com\/nearprotocol\">\u0433\u0440\u0443\u043f\u043f\u0435 \u0412\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u0435<\/a>, \u0430 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u0432 <a href=\"https:\/\/twitter.com\/NEARProtocol\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0442\u0432\u0438\u0442\u0442\u0435\u0440\u0435<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0414\u043e \u0441\u043a\u043e\u0440\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447!<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/near\/blog\/522202\/\"> https:\/\/habr.com\/ru\/company\/near\/blog\/522202\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/near\/blog\/522202\/\">\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u0438\u0448\u0443\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043e\u0434\u0438\u043d \u0438\u0437 \u0447\u0430\u0441\u0442\u044b\u0445 \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u0437\u0432\u0443\u0447\u0438\u0442 \u0442\u0430\u043a: \u043d\u0435 \u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u043e\u0432 \u044d\u0442\u043e\u0442 \u0441\u043e\u0432\u0435\u0442 \u0447\u0430\u0441\u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442: \u043d\u0443\u0436\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u043b\u0438\u0431\u043e \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u043e\u0432\u0441\u0435, \u043b\u0438\u0431\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u0433\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u0438\u0447\u0438\u043d &mdash; \u0434\u0430\u0436\u0435 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u043d\u0438 <a href=\"https:\/\/github.com\/bitcoin\/bips\/blob\/master\/bip-0066.mediawiki\">\u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b<\/a>. \u0412\u043e\u0442 \u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/Ed25519\">Ed25519<\/a> &mdash; \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0442\u0438\u043f \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439, \u043d\u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445, \u043e\u0434\u043d\u0430\u043a\u043e, \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0430. \u0410 \u0432\u0441\u0451 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0438\u0437 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u043d\u0430 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 Ethereum.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-311027","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311027","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=311027"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311027\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}