{"id":276051,"date":"2016-03-14T11:53:02","date_gmt":"2016-03-14T08:53:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=276051"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=276051","title":{"rendered":"\u041a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 GF(256) \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u0430\u0433\u0438\u0438"},"content":{"rendered":"<br \/>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0411\u0443\u0434\u0443\u0447\u0438 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u043e\u043c \u044f \u043f\u043e\u0441\u0435\u0449\u0430\u044e \u0437\u0430\u043d\u044f\u0442\u0438\u044f \u043f\u043e \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438. \u0418 \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f \u044d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043d\u0435 \u043c\u043e\u0433 \u043e\u0431\u043e\u0439\u0442\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/Advanced_Encryption_Standard\">AES<\/a>.<\/p>\n<p>  \u041f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0432\u0441\u0442\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0435\u0439 GF(2^8), \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u0411\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b: \u0431\u0438\u0442\u043e\u0432\u0430\u044f \u043c\u0430\u0433\u0438\u044f \u0434\u043b\u044f \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u043b\u044f, \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0437\u0430\u043c\u0435\u043d \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<p>  \u0412\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 C++14. \u041f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u0441\u0442\u0438\u043b\u0435 \u0421\u0438.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0427\u0442\u043e \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u044f<\/b><\/p>\n<div class=\"spoiler_text\"><a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D0%BE%D0%BD%D0%B5%D1%87%D0%BD%D0%BE%D0%B5_%D0%BF%D0%BE%D0%BB%D0%B5\">https:\/\/ru.wikipedia.org\/wiki\/\u041a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u043f\u043e\u043b\u0435<\/a><\/p>\n<p>  <b>\u041f\u043e\u043b\u0435 GF(p)<\/b><\/p>\n<p>  \u0421\u043f\u0435\u0440\u0432\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0435 \u0441 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 GF(p).<\/p>\n<p>  \u0415\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u2014 \u0447\u0438\u0441\u043b\u0430 <img decoding=\"async\" src=\"\/\/tex.s2cms.ru\/svg\/%5C%7B0%2C%201%2C%20...%2C%20p-1%5C%7D\" alt=\"\\{0, 1, ..., p-1\\}\"\/>. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e p.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438 p=7:<\/p>\n<p>  2 + 6 = 8%7 = 1<br \/>  4 * 3 = 12%7 = 5<\/p>\n<p>  <b>\u041f\u043e\u043b\u0435 GF(p^q)<\/b><\/p>\n<p>  \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0435\u0439 GF(p) \u0441\u0442\u0440\u043e\u044f\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043e\u0431\u0449\u0438\u0435 \u043f\u043e\u043b\u044f GF(p^q), p \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0435, q \u2014 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u0435.<\/p>\n<p>  \u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u043b\u0435\u0439 \u2014 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d\u044b \u043d\u0430\u0434 \u043f\u043e\u043b\u0435\u043c GF(p):<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/tex.s2cms.ru\/svg\/%5C%7B0%2C%201%2C%202%2C%20%5Cldots%20%2C%20p-1%2C%20x%2C%20%5Cldots%20(p-1)x%2C%20...%20%2C%20x%5E%7Bq-1%7D%2C%20%5Cldots%20%2C%20(p-1)x%5E%7Bq-1%7D%5C%7D\" alt=\"\\{0, 1, 2, \\ldots , p-1, x, \\ldots (p-1)x, ... , x^{q-1}, \\ldots , (p-1)x^{q-1}\\}\"\/><\/p>\n<p>  \u0421\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u043e\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d\u043e\u0432.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438 p=2, q=3:<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/tex.s2cms.ru\/svg\/(x%20%2B%201)%20%2B%20(x%5E2%20%2B%201)%20%3D%20(x%5E2%20%2B%20x)\" alt=\"(x + 1) + (x^2 + 1) = (x^2 + x)\"\/><\/p>\n<p>  \u0421 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0447\u0443\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d Q(x) \u0441\u0442\u0435\u043f\u0435\u043d\u0438 q, \u043d\u0435\u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c\u044b\u0439 \u043d\u0430\u0434 GF(p) (\u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0443\u0445 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d\u043e\u0432 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u0434\u0430\u044e\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0439). \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e \u0434\u043b\u044f \u043b\u044e\u0431\u044b\u0445 p \u0438 q \u0442\u0430\u043a\u043e\u0439 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.<br \/>  \u041a\u043e\u0433\u0434\u0430 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d Q(x) \u0432\u044b\u0431\u0440\u0430\u043d, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0434\u0432\u0443\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 a*b \u043f\u043e\u043b\u044f \u043d\u0443\u0436\u043d\u043e:<\/p>\n<ol>\n<li>\u041d\u0430\u0439\u0434\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438\u0445 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d\u043e\u0432 a(x)*b(x)<\/li>\n<li>\u041d\u0430\u0439\u0442\u0438 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043d\u0430 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d Q(x). \u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c a*b<\/li>\n<\/ol>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438 p=2, q=3:<\/p>\n<p>  Q(x) = x^3 + x + 1 (\u041d\u0435\u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c\u044b\u0439 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d)<\/p>\n<p>  a = x^2 + 1, b = x^2 <br \/>  a(x) * b(x) = x^4 + x^2 <br \/>  (x^4 + x^2) % Q(x) = (x^4 + x^2 \u2014 x*Q(x)) % Q(x) = (x^3 + x) % Q(x) = (x^3 + x \u2014 Q(x)) % Q(x) = 1 = a * b<\/p>\n<p>  \u041f\u0440\u0438 p=3, q=2:<\/p>\n<p>  Q(x) = x^2 + x + 2 (\u041d\u0435\u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c\u044b\u0439 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d)<\/p>\n<p>  a = x+2<br \/>  b = 2x + 2<br \/>  a(x) * b(x) = 2<em>x^2 + (6%3) * x + (4%3) = 2<\/em>x^2 + 1<br \/>  (2<em>x^2 + 1) % Q(x) = (2<\/em>x^2 + 1 \u2014 2Q(x)) % Q(x) = ((-2%3)x + (-3%3)) % Q(x) = x % Q(x) = x  <\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>  \u0418\u0442\u0430\u043a, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u043f\u043e\u043b\u0435 GF(256) \u043d\u0430\u0434 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d\u043e\u043c x^8 + x^4 + x^3 + x + 1:<\/p>\n<ol>\n<li>\u0423\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435<\/li>\n<li>\u041d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e<\/li>\n<\/ol>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u043b\u044f:<\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0443\u043c \u2014 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d\u043e\u0432 \u043d\u0430\u0438\u0432\u043d\u044b\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">uint16_t polynomeMul(uint8_t a, uint8_t b){       unsigned rez = 0;     for(int i=0; i&lt;8; ++i){          rez ^= a * b&(1&lt;&lt;i) \/\/ \u041f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e 2 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d b_i * (x^i) * a(x)     }     return rez; } <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f \u0437\u0430\u0434\u0443\u043c\u0430\u043b\u0441\u044f \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0430\u043b\u044c\u0448\u0435. \u0410 \u0434\u0430\u043b\u044c\u0448\u0435 \u043c\u0435\u043d\u044f \u0436\u0434\u0430\u043b \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0415\u0432\u043a\u043b\u0438\u0434\u0430 \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d\u043e\u0432, \u0438 \u0445\u043e\u0442\u044c \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0441\u0442\u0440\u0430\u0448\u043d\u043e, \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c. \u0410 \u043d\u0435\u043b\u044c\u0437\u044f \u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043a\u0430\u043a-\u043d\u0438\u0431\u0443\u0434\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e? \u0416\u0430\u043b\u044c \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0434\u043d\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0438\u0442\u044c \u0434\u0432\u0430 \u0442\u0430\u043a\u0438\u0445 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d\u0430, \u043d\u0430\u0439\u0442\u0438 \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439.<\/p>\n<p>  \u0410 \u0442\u043e\u0447\u043d\u043e \u043b\u0438 \u043d\u0435\u043b\u044c\u0437\u044f? \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043d\u0430\u043c \u043c\u0435\u0448\u0430\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d\u043e\u0432 \u0438\u043c\u0435\u0435\u043c:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"\/\/tex.s2cms.ru\/svg\/(%5Csum_i%20a_i*x%5Ei)%20*%20(%5Csum_i%20b_i*x%5Ei)%20%3D%20%5Csum_i%20%5Csum_%7Bn%3D0%7D%5E%7Bi%7D%20a_n%20b_%7Bi-n%7D%20x%5Ei\" alt=\"(\\sum_i a_i*x^i) * (\\sum_i b_i*x^i) = \\sum_i \\sum_{n=0}^{i} a_n b_{i-n} x^i\"\/><\/div>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b \u0432 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043e\u0447\u0442\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"\/\/tex.s2cms.ru\/svg\/(%5Csum_i%20a_i*2%5Ei)%20*%20(%5Csum_i%20b_i*2%5Ei)%20%3D%20%5Csum_i%20%5Csum_%7Bn%3D0%7D%5E%7Bi%7D%20a_n%20b_%7Bi-n%7D%202%5Ei\" alt=\"(\\sum_i a_i*2^i) * (\\sum_i b_i*2^i) = \\sum_i \\sum_{n=0}^{i} a_n b_{i-n} 2^i\"\/><\/div>\n<p>  \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d\u043e\u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <img decoding=\"async\" src=\"\/\/tex.s2cms.ru\/svg\/%5Csum_%7Bn%3D0%7D%5E%7Bi%7D%20a_n%20b_%7Bi-n%7D\" alt=\"\\sum_{n=0}^{i} a_n b_{i-n}\"\/> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043f\u0440\u0438 <img decoding=\"async\" src=\"\/\/tex.s2cms.ru\/svg\/x%5Ei\" alt=\"x^i\"\/>.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 \u0432\u044b\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0447\u0438\u0441\u0435\u043b \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0440\u043d\u043e \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0440\u0430\u0437\u0440\u044f\u0434\u0435 \u043c\u043e\u0433\u043b\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u043c\u0435\u043d\u044f\u044e\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e.<\/p>\n<p>  \u041a\u0430\u043a \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f? \u041e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"\/\/tex.s2cms.ru\/svg\/(%5Csum_i%20a_i*2%5E%7B4i%7D)%20*%20(%5Csum_i%20b_i*2%5E%7B4i%7D)%20%3D%20%5Csum_i%20%5Csum_%7Bn%3D0%7D%5E%7Bi%7D%20a_n%20b_%7Bi-n%7D%202%5E%7B4i%7D\" alt=\"(\\sum_i a_i*2^{4i}) * (\\sum_i b_i*2^{4i}) = \\sum_i \\sum_{n=0}^{i} a_n b_{i-n} 2^{4i}\"\/><\/div>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d\u043e\u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u043d\u0435 \u0432\u044b\u0448\u0435 7 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0432\u044b\u0448\u0435 14, \u0440\u0430\u0437\u0440\u044f\u0434\u0443 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u043c\u043c\u0430 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0438\u0437 15 \u043d\u0443\u043b\u0435\u0439 \u0438 \u0435\u0434\u0438\u043d\u0438\u0446 (\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043b\u0435\u0433\u043a\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 8), \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443 \u0432 \u0441\u0443\u043c\u043c\u0443 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e 2, \u0432\u044b\u0434\u0435\u043b\u0438\u0432 \u043c\u043b\u0430\u0434\u0448\u0438\u0439 \u0431\u0438\u0442.<\/p>\n<p>  \u0418 \u0442\u0430\u043a, \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u043b\u0438\u043d\u043e\u043c \u043a\u0430\u043a \u0447\u0438\u0441\u043b\u043e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0431\u043b\u043e\u043a\u0443 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u043b\u043e\u043a \u0438\u0437 4 \u0431\u0438\u0442, \u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">uint64_t polynomeMul(uint64_t a, uint64_t b){      return (a*b) & 0x1111111111111111; \/\/ & 0b0001000100010001... } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u043b\u044f \u0413\u0430\u043b\u0443\u0430.<\/p>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u043e\u043b\u0438\u043d\u043e\u043c <img decoding=\"async\" src=\"\/\/tex.s2cms.ru\/svg\/x%5E8%20%2B%20x%5E4%20%2B%20x%5E3%20%2B%20x%20%2B%201\" alt=\"x^8 + x^4 + x^3 + x + 1\"\/>. \u0412 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a q = 0x100011011. \u041d\u0435\u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u043c \u0433\u043b\u0430\u0437\u043e\u043c \u0432\u0438\u0434\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0443\u043b\u0435\u0432\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0430\u0440\u0448\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430. \u041f\u0440\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 Q(x) \u043d\u0430 \u043f\u043e\u043b\u0438\u043d\u043e\u043c \u0432\u0438\u0434\u0430 <img decoding=\"async\" src=\"\/\/tex.s2cms.ru\/svg\/x%5En(a_0%20%2B%20a_1*x%20%2B%20a_2*x%5E2%20%2B%20a_3*x%5E4)\" alt=\"x^n(a_0 + a_1*x + a_2*x^2 + a_3*x^4)\"\/> \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u043e\u043b\u0438\u043d\u043e\u043c:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"\/\/tex.s2cms.ru\/svg\/x%5E%7Bn%2B8%7D(a_0%20%2B%20a_1*x%20%2B%20a_2*x%5E2%20%2B%20a_3*x%5E4)%20%2B%20%5Csum_i%5E%7Bn%2B7%7Db_i%20x%5Ei\" alt=\"x^{n+8}(a_0 + a_1*x + a_2*x^2 + a_3*x^4) + \\sum_i^{n+7}b_i x^i\"\/><\/div>\n<p>  \u0438\u043b\u0438 \u043f\u043e\u043b\u0438\u043d\u043e\u043c, \u0441\u0442\u0430\u0440\u0448\u0438\u0435 \u0431\u043b\u043e\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c <img decoding=\"async\" src=\"\/\/tex.s2cms.ru\/svg\/a_0%2C%20a_1%2C%20a_2%2C%20a_3\" alt=\"a_0, a_1, a_2, a_3\"\/>. \u042d\u0442\u0438\u043c \u043c\u044b \u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"cpp\">uint64_t galuaMul(uint64_t a, uint64_t b){      uint64_t mul = polynomeMul(a, b);     const uint64_t basePolynome = 0x100011011;     mul ^= polynomeMul(basePolynome, mul&gt;&gt;48&lt;&lt;16); \/\/ \u0412\u044b\u0447\u0438\u0442\u0430\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 Q(x) \u0438 \u0441\u0442\u0430\u0440\u0448\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0438\u043c\u0435\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f (\u0441\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0445 \u043d\u0430 4 \u0431\u043b\u043e\u043a\u0430), \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u044b\u043c\u0438 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 12 \u043c\u043b\u0430\u0434\u0448\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432     mul ^= polynomeMul(basePolynome, mul&gt;&gt;32); \/\/ \u0422\u0430\u043a\u0438\u043c \u0436\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u043d\u043e\u0433\u043e\u0447\u043b\u0435\u043d \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 8 \u0441\u0442\u0435\u043f\u0435\u043d\u0438, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u0432 mul.     return mul; } <\/code><\/pre>\n<p>  \u0421 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e \u043d\u0435\u043c\u0443.<\/p>\n<p>  \u0412\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0435 \u0431\u0435\u0437 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 0 \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0443 \u0438\u0437 255 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041e\u0442\u0441\u044e\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 x \u043d\u0430\u0439\u0434\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u043e r, \u0440\u0430\u0432\u043d\u043e\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f\u044b, \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u044d\u0442\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c, \u0442\u0430\u043a\u043e\u0435 \u0447\u0442\u043e x^r = 1. \u0422\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u043e\u0434\u0433\u0440\u0443\u043f\u043f\u044b \u2014 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0433\u0440\u0443\u043f\u043f\u044b, <img decoding=\"async\" src=\"\/\/tex.s2cms.ru\/svg\/x%5E%7B255%7D%20%3D%20x%5E%7Bkr%7D%20%3D%20(x%5Er)%5Ek%20%3D%201\" alt=\"x^{255} = x^{kr} = (x^r)^k = 1\"\/>, \u0447\u0442\u043e \u0441 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0447\u0442\u043e <img decoding=\"async\" src=\"\/\/tex.s2cms.ru\/svg\/x%20*%20x%5E%7B254%7D%20%3D%201\" alt=\"x * x^{254} = 1\"\/>. \u0422\u043e\u0433\u0434\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438\u043c\u0435\u0435\u043c <img decoding=\"async\" src=\"\/\/tex.s2cms.ru\/svg\/x%5E%7B-1%7D%20%3D%20x%5E%7B254%7D\" alt=\"x^{-1} = x^{254}\"\/>:<\/p>\n<pre><code class=\"cpp\">uint64_t galuaPow(uint64_t a, unsigned n){     \/\/ \u0411\u044b\u0441\u0442\u0440\u043e\u0435 \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u044c.     if(n==0){         return 1;     }else if(n%2 == 0){         return galuaPow(galuaMul(a, a), n\/2); \/\/ (a*a)^(n\/2)     }else{         uint64_t square = galuaMul(a, a);         return galuaMul(galuaPow(square, n\/2), a); \/\/ a * (a*a)^[n\/2]      } } uint64_t galuaInverse(uint64_t a){     return galuaPow(a, 254); } <\/code><\/pre>\n<p>  \u0412\u0441\u0435? \u0410\u0445, \u0434\u0430, \u043d\u0443\u0436\u043d\u043e \u0443\u043c\u0435\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0431\u0430\u0439\u0442\u044b \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u043b\u043e\u0431 \u0446\u0438\u043a\u043b\u043e\u043c, \u043d\u043e \u043d\u0435 \u0441\u0435\u0433\u043e\u0434\u043d\u044f. \u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0433\u043e\u043b\u043e\u0441 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u044f\u0437\u043d\u044b\u0439 \u0442\u0440\u044e\u043a. \u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432 \u043d\u0435 \u044f \u043b\u0438 \u0447\u0438\u0442\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u044e <a href=\"https:\/\/habrahabr.ru\/post\/276957\/\">\u041e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043e \u043f\u043e\u0434\u0441\u0447\u0451\u0442\u0435 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445 \u0431\u0438\u0442\u043e\u0432<\/a>?<\/p>\n<p>  \u041e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u0431\u0430\u0439\u0442 \u043a\u0430\u043a 0bABCDEFGH. \u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u044d\u0442\u043e \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 0b1001001 \u0442\u0440\u0435\u0445 \u043c\u043b\u0430\u0434\u0448\u0438\u0445 \u0431\u0438\u0442:<\/p>\n<p>  0bFGH * 0b1001001 = 0bFGHFGHFGH<\/p>\n<p>  0bFGHFGHFGH | 0b100010001 = 0bF000G000H, \u0438\u043b\u0438 \u0442\u0440\u0438 \u043c\u043b\u0430\u0434\u0448\u0438\u0445 \u0431\u0438\u0442\u0430 \u0432\u0441\u0442\u0430\u043b\u0438 \u043d\u0430 \u0441\u0432\u043e\u0438 \u043c\u0435\u0441\u0442\u0430.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0434\u0435\u043b\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0434 \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u0431\u0438\u0442 \u0438 \u0441\u0442\u0430\u0440\u0448\u0435\u0439 \u043f\u0430\u0440\u043e\u0439. \u0422\u0440\u044e\u043a \u0431\u044b\u043b \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043d. \u041d\u043e \u0442\u0440\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u0442\u043e \u043a\u0430\u043a \u0442\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e. \u041d\u0435\u043b\u044c\u0437\u044f \u043b\u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0432 \u0440\u0430\u0437 \u043f\u043e 4 \u0431\u0438\u0442\u0430? \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0431\u0438\u0442 \u044f \u0441\u0443\u043c\u0435\u043b \u043d\u0430\u0439\u0442\u0438 \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u0443 \u0447\u0435\u0442\u0432\u0435\u0440\u043a\u0443 \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d72\/614\/72c\/d7261472cb414547b8097a66d0e389f6.png\" alt=\"image\"\/><\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043c\u043b\u0430\u0434\u0448\u0438\u0435 \u0431\u0438\u0442\u044b 7, 6, 1, 0 \u0431\u043b\u043e\u043a\u043e\u0432. \u0414\u043b\u044f \u043d\u0438\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0431\u0438\u0442\u0430 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043c\u0435\u0441\u0442\u0435 \u0438 \u0447\u0442\u043e \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u043e, \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430 \u0441\u0447\u0435\u0442 \u043c\u043b\u0430\u0434\u0448\u0438\u0445 (\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0445) \u0431\u0438\u0442.<\/p>\n<p>  \u041a\u0430\u043a \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u0434\u0432\u0443\u0445 \u043f\u0430\u0440\u043d\u044b\u0445 \u0447\u0435\u0442\u0432\u0435\u0440\u043e\u043a \u0431\u0438\u0442 \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b. \u041d\u0435\u0443\u0434\u0430\u0447\u0430? \u041d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c. \u0415\u0441\u043b\u0438 \u043c\u044b \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u043c\u044c \u0438\u0437 \u0432\u043e\u0441\u044c\u043c\u0438 \u0431\u0438\u0442 \u043d\u0430 \u0441\u0432\u043e\u0438 \u043c\u0435\u0441\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432 2 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435 8, \u0432\u043e\u0434\u0440\u0443\u0437\u0438\u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043d\u0430 \u0441\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u0434\u0432\u0438\u0433\u043e\u043c.<\/p>\n<pre><code class=\"cpp\">uint64_t extendToGalua(uint8_t a){      return (a & 0xC3) * 0x249249 & 0x11000011 |            (a & 0x1C) * 0x1240 & 0x00011100|            (a & 0x20) &lt;&lt; 15; } <\/code><\/pre>\n<p>  \u0421 \u0441\u0436\u0430\u0442\u0438\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0434\u0435\u043b\u0430 \u043e\u0431\u0441\u0442\u043e\u044f\u0442 \u043f\u0440\u043e\u0449\u0435. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u043a \u0441\u0436\u0430\u0442\u044c 4 \u0431\u0438\u0442\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6a4\/eae\/d93\/6a4eaed930de4e1dbe3504d94d932e3d.png\" alt=\"image\"\/><\/p>\n<p>  \u0421 \u0443\u0447\u0435\u0442\u043e\u043c \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"cpp\">uint8_t shrinkFromGalua(uint64_t a){      return (a & 0x11110000) * 0x249 &gt;&gt; 21 & 0xF0 |            (a & 0x00001111) * 0x249 &gt;&gt; 9 & 0x0F; } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u041f\u0443\u0441\u0442\u044c \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440<\/h2>\n<p>  \u0417\u0430\u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u043e\u0440\u043e\u0433\u0438\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u0439\u0442 \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439? \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u043a\u0446\u0438\u0438 \u044f \u043f\u043e\u044f\u0441\u043d\u044e \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0435\u0451 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u0430\u0433\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044e.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0432\u0441\u0435\u043c \u0440\u0430\u043d\u0435\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <i>constexpr<\/i> (\u0441 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0441++14). \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432.<\/p>\n<pre><code class=\"cpp\">\/\/ \u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0443\u043a\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 contexpr static uint8_t inverse(uint8_t x){     return shrinkFromGalua(galuaInverse(extendToGalua(x))); } &lt;p&gt;template&lt;int N, int\u2026 Data&gt; class GaluaTable{ public: static constexpr auto&amp; data = GaluaTable&lt;N-1, inverse(N-1), Data\u2026&gt;::data; }&lt;\/p&gt;  &lt;p&gt;template&lt;int\u2026 Data&gt; class GaluaTable&lt;0, Data\u2026&gt; public: static constexpr uint8_t data[] = {Data\u2026}; }&lt;\/p&gt;  &lt;p&gt;template&lt;int\u2026 Data&gt; constexpr uint8_t GaluaTable&lt;0, Data\u2026&gt;::data[];&lt;\/p&gt; <\/code><\/pre>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GaluaTable&lt;256&gt;::data.<\/p>\n<p>  \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 data \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u043a\u0430\u043a GaluaTable&lt;255, inverse(255)&gt;::data. \u041e\u043d\u0430 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 GaluaTable&lt;254, inverse(254), inverse(255)&gt;::data \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0448\u0430\u0433\u0443 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u0432\u0438\u0434\u0430: GaluaTable&lt;m, inverse(m), inverse(m+1), \u2026, inverse(255)&gt;. \u0418 \u0442\u0430\u043a \u043f\u043e\u043a\u0430 m \u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0435\u0442 0.<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 m \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442 0 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 (\u0410 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e). \u0422\u0443\u0442 \u0442\u043e \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0435 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432 Data\u2026 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c \u043c\u0430\u0441\u0441\u0438\u0432, \u0437\u0430\u0438\u043c\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u0441\u0435\u043c\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438.<\/p>\n<p>  Data\u2026 \u043d\u0430 \u044d\u0442\u043e \u0448\u0430\u0433\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0438\u0447\u0435\u043c \u0438\u043d\u044b\u043c \u043a\u0430\u043a inverse(0), inverse(1), \u2026, inverse(255), \u0447\u0442\u043e \u043d\u0430\u043c \u0438 \u0431\u044b\u043b\u043e \u043d\u0443\u0436\u043d\u043e.<\/p>\n<p>  <b>\u0412\u044b\u0432\u043e\u0434<\/b>: \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044f \u0443\u0431\u0438\u043b \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0447\u0435\u043c \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u0431\u044b \u043d\u0430 \u043d\u0430\u0438\u0432\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e (\u0432\u043f\u0440\u043e\u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0437\u0430\u043d\u044f\u043b \u043d\u0430\u0431\u043e\u0440 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0438\u0434\u0435\u044f \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u0434\u0443\u043c\u0430\u0442\u044c.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u0447\u0435\u043c-\u043b\u0438\u0431\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439.       <\/p>\n<div class=\"clear\"><\/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:\/\/habrahabr.ru\/post\/279197\/\"> https:\/\/habrahabr.ru\/post\/279197\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<br \/>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0411\u0443\u0434\u0443\u0447\u0438 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u043e\u043c \u044f \u043f\u043e\u0441\u0435\u0449\u0430\u044e \u0437\u0430\u043d\u044f\u0442\u0438\u044f \u043f\u043e \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438. \u0418 \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f \u044d\u0442\u043e\u0442 \u043a\u0443\u0440\u0441 \u043d\u0435 \u043c\u043e\u0433 \u043e\u0431\u043e\u0439\u0442\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/Advanced_Encryption_Standard\">AES<\/a>.<\/p>\n<p>  \u041f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0432\u0441\u0442\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0435\u0439 GF(2^8), \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u0411\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b: \u0431\u0438\u0442\u043e\u0432\u0430\u044f \u043c\u0430\u0433\u0438\u044f \u0434\u043b\u044f \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u043b\u044f, \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0437\u0430\u043c\u0435\u043d \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<p>  \u0412\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 C++14. \u041f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u0441\u0442\u0438\u043b\u0435 \u0421\u0438.  <\/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-276051","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/276051","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=276051"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/276051\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=276051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=276051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=276051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}