{"id":266035,"date":"2015-09-21T12:20:02","date_gmt":"2015-09-21T08:20:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=266035"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=266035","title":{"rendered":"\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f RC5 \u0438 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 python"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6ba\/a47\/468\/6baa474684cf46b9a5cdb8df9256d1ff.png\" align=\"left\"\/>  <\/p>\n<h4><font color=\"DarkOrchid\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c RC5<\/font><\/h4>\n<p>  \u0412 \u0441\u0432\u043e\u0451\u043c \u043f\u043e\u0441\u0442\u0435, \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f RC5 \u0438 \u043c\u043e\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 python. \u0414\u0430\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0435\u0439\u0448\u0438\u043c \u043a\u0440\u0438\u043f\u0442\u043e\u043b\u043e\u0433\u043e\u043c \u0420\u043e\u043d\u0430\u043b\u044c\u0434\u043e\u043c <s>\u041c\u0430\u043a\u0434\u043e\u043d\u0430\u043b\u044c\u0434\u043e\u043c<\/s> \u0420\u0438\u0432\u0435\u0441\u0442\u043e\u043c \u2014 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b RSA \u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u0439 \u0444\u0438\u0440\u043c\u044b. \u041f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 RC5 \u0441\u0442\u043e\u0438\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c \u0440\u044f\u0434\u0443 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438 \u043a\u0430\u043a IDEA \u0438 Blowfish. \u0410\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u0430 RC \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c, \u043b\u0438\u0431\u043e Rivest Cipher, \u043b\u0438\u0431\u043e Ron&#8217;s Code, \u0447\u0442\u043e \u0432 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u0451\u0442 \u043d\u0430\u043c \u00ab\u0448\u0438\u0444\u0440 \u0420\u043e\u043d\u0430 \u0420\u0438\u0432\u0435\u0441\u0442\u0430\u00bb. \u0417\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5><font color=\"DarkOrchid\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/font><\/h5>\n<p>  \u041f\u0440\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:  <\/p>\n<ul>\n<li> \u0420\u0430\u0437\u043c\u0435\u0440 \u0441\u043b\u043e\u0432\u0430 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7c1\/26b\/714\/7c126b714976467f91143fd8cd0896e1.gif\" title=\"w\"\/> <u>\u0432 \u0431\u0438\u0442\u0430\u0445<\/u>. RC5 \u0448\u0438\u0444\u0440\u0443\u0435\u0442 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043f\u043e \u0434\u0432\u0430 \u0441\u043b\u043e\u0432\u0430; \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f 16, 32 \u0438 64. \u0414\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0431\u0440\u0430\u0442\u044c \u0440\u0430\u0432\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c\u0443 \u0441\u043b\u043e\u0432\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f 32-\u0431\u0438\u0442\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7c1\/26b\/714\/7c126b714976467f91143fd8cd0896e1.gif\" title=\"w\"\/> = 32 \u0438 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d 64 \u0431\u0438\u0442\u0430 <\/li>\n<li> \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0443\u043d\u0434\u043e\u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/db6\/2af\/3df\/db62af3df14d400d9a6fcb90aba772ec.gif\" title=\"R\"\/> \u2014 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043e\u0442 0 \u0434\u043e 255 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u041f\u0440\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 0 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442<\/li>\n<li> \u0420\u0430\u0437\u043c\u0435\u0440 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/689\/67a\/db5\/68967adb55484926a0baa4235f81008b.gif\" title=\"b\"\/> <u>\u0432 \u0431\u0430\u0439\u0442\u0430\u0445<\/u> \u2014 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043e\u0442 0 \u0434\u043e 255 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 RC5-<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/dd4\/f15\/5a0\/dd4f155a07ab41e7897c736673315d4b.gif\" title=\"w\/R\/b\"\/>;<br \/>  \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, RC5-32\/12\/16 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c RC5 c 64-\u0431\u0438\u0442\u043d\u044b\u043c \u0431\u043b\u043e\u043a\u043e\u043c, 12 \u0440\u0430\u0443\u043d\u0434\u0430\u043c\u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 16-\u0431\u0430\u0439\u0442\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c(\u0434\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0420\u0438\u0432\u0435\u0441\u0442\u043e\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430).<\/p>\n<p>  \u0420\u0430\u0431\u043e\u0442\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u044d\u0442\u0430\u043f\u043e\u0432:  <\/p>\n<ul>\n<li> \u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430<\/li>\n<li> \u0421\u0430\u043c\u043e \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 <\/li>\n<\/ul>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441 \u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Python listing<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">class RC5:     def __init__(self, W, R, key):         self.W = W         self.R = R         self.key = key <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h5><font color=\"DarkOrchid\">\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430<\/font><\/h5>\n<p>  \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u044d\u0442\u0430\u043f\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0439, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e, \u0441 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c 3 \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:  <\/p>\n<ul>\n<li> \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430 <\/li>\n<li> \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 <\/li>\n<li> \u041f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u043a\u043b\u044e\u0447\u0435\u0439 <\/li>\n<\/ul>\n<p>  <\/p>\n<h6><font color=\"Crimson\">\u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0430<\/font><\/h6>\n<p>  \u0415\u0441\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043b\u044e\u0447\u0430(\u0432 \u0431\u0430\u0439\u0442\u0430\u0445) \u043d\u0435 \u043a\u0440\u0430\u0442\u0435\u043d <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/841\/f89\/820\/841f898209ed4e65982fa3507c3d61b4.gif\" title=\"w\/8\"\/>, \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0443\u043b\u0435\u0432\u044b\u043c\u0438 \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \u0434\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043a\u0440\u0430\u0442\u043d\u043e\u0433\u043e <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/841\/f89\/820\/841f898209ed4e65982fa3507c3d61b4.gif\" title=\"w\/8\"\/>. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u044e\u0447 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/3d2\/fae\/eae\/3d2faeeae4234504a669f0e335f87a0a.gif\" title=\"L[0]..L[c]\"\/>, \u0433\u0434\u0435 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/297\/0ce\/6da\/2970ce6daa7a46839defe962f142c1ee.gif\" title=\"c=w\/8\"\/>. \u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u043c\u044b \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447 \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043f\u043e <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/841\/f89\/820\/841f898209ed4e65982fa3507c3d61b4.gif\" title=\"w\/8\"\/> \u0431\u0430\u0439\u0442 (2, 4, 8 \u0434\u043b\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7c1\/26b\/714\/7c126b714976467f91143fd8cd0896e1.gif\" title=\"w\"\/> 16, 32, 64 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e) \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/95d\/fc1\/2ab\/95dfc12ab992442d8e0baa9b59dbb76a.gif\" title=\"L\"\/>.<br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/59a\/ae5\/40e\/59aae540e7d14fb88a64e2ec6527e91e.gif\" title=\"w=32, R=12, b=7\"\/> \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043a\u043b\u044e\u0447\u0430 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/977\/272\/06a\/97727206a58c42b39aab7b1af18eb75b.gif\" title=\"key=b&#39;testkey&#39;\"\/> \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/45c\/8f0\/f76\/45c8f0f7688347c0b903e4077dffa2a9.gif\" title=\"L[0]=b&#39;test\"\/> \u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/62b\/7c5\/44c\/62b7c544cee84108952cda1d41c449ef.gif\" title=\"L[1]=b&#39;key\\x00\"\/> (\u043f\u043e\u0434 0 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0431\u0430\u0439\u0442).<\/p>\n<p>  \u041e\u043f\u0438\u0448\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Python listing<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def __keyAlign(self):     while len(self.key) % (self.W \/\/ 8): # \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043b\u044e\u0447 \u0431\u0430\u0439\u0442\u0430\u043c\u0438 \\x00         self.key += b'\\x00'     self.c = len(self.key) \/\/ (self.W \/\/ 8)     L, key = [], bin(int.from_bytes(self.key, byteorder='little'))[2:] # \u0444\u0443\u043d\u043a\u0446\u0438\u044f from_bytes \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0431\u0430\u0439\u0442 \u0432 \u0447\u0438\u0441\u043b\u043e     for i in range(self.c): # \u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 L         L.append(int(key[:self.W], 2))         key = key[self.W:]     self.L = L <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h6><font color=\"Crimson\">\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439<\/font><\/h6>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0448\u0430\u0433\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/221\/729\/299\/22172929927c44e78492510919530986.gif\" title=\"Pw\"\/> \u0438 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/87d\/7bd\/447\/87d7bd4478a14e95b4018b58f8cbde70.gif\" title=\"Qw\"\/> \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0444\u043e\u0440\u043c\u0443\u043b\u0430\u043c:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/401\/dff\/ab7\/401dffab738f4136ac0d7e8f754c5cb4.gif\" title=\"Pw=Odd((f-1)*2^w)\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/12e\/daf\/229\/12edaf22966f4423934930647dab1197.gif\" title=\"Qw=Odd((e-2)*2^w\"\/>,<br \/>  \u0433\u0434\u0435<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c59\/d36\/b94\/c59d36b94cee44c6bee5d4cac3dc7bbf.gif\" title=\"Odd\"\/> \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u0434\u043e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u043d\u0435\u0447\u0435\u043d\u0442\u043d\u043e\u0433\u043e<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/ce9\/9c0\/021\/ce99c0021628462caec8c946ede58d23.gif\" title=\"exp\"\/> \u2014 <a href=\"https:\/\/ru.wikipedia.org\/w\/index.php?title=%D0%AD%D0%BA%D1%81%D0%BF%D0%BE%D0%BD%D0%B5%D0%BD%D1%82%D0%B0&amp;oldid=73138883\">\u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0442\u0430<\/a><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/2be\/c16\/22a\/2bec1622a29549f7848bd142880bf544.gif\" title=\"f\"\/> \u2014 <a href=\"https:\/\/ru.wikipedia.org\/w\/index.php?title=%D0%97%D0%BE%D0%BB%D0%BE%D1%82%D0%BE%D0%B5_%D1%81%D0%B5%D1%87%D0%B5%D0%BD%D0%B8%D0%B5&amp;oldid=73115047\">\u0437\u043e\u043b\u043e\u0442\u043e\u0435 \u0441\u0435\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0443\u0436\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7c1\/26b\/714\/7c126b714976467f91143fd8cd0896e1.gif\" title=\"w\"\/>:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c8d\/571\/691\/c8d5716915f243f2835f285b7d66e779.gif\" title=\"P16=B7E1\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/546\/575\/7ca\/5465757ca0074b39b3c28c4e1b5fb4ce.gif\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/18a\/0ed\/b20\/18a0edb205c049dc981bdbed9504298d.gif\" title=\"P32=B7E15163\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c9c\/5ac\/713\/c9c5ac7130734277b6d2b1b95d23b6b6.gif\" title=\"Q32=9E3779B9\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b7c\/4d8\/3ed\/b7c4d83ed96049ba9bbbc4f260808593.gif\" title=\"P64=B7E151628AED2A6B\"\/> <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/4bf\/d25\/3c2\/4bfd253c201047af81fc02579b8f360a.gif\" title=\"Q64=9E3779B97F4A7C15\"\/>,<br \/>  \u0432\u0441\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u0432\u0441\u0451 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/14c\/031\/840\/14c0318409954c5299dfb5d47f23963f.gif\" title=\"S[0]..S[2*r+1]\"\/>, \u0433\u0434\u0435<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/412\/214\/c3b\/412214c3bc3346a2a1a93a62eb4257ed.gif\" title=\"S[0]=Pw\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8ba\/b2a\/76e\/8bab2a76ef2c417f8f640af2c57e0180.gif\" title=\"S[i+1]=S[i]+Qw\"\/><\/p>\n<p>  \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Python listing<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">    def __const(self): # \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442         if self.W == 16:             return (0xB7E1, 0x9E37) # \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f P \u0438 Q \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0435\u043d\u043d\u043e         elif self.W == 32:             return (0xB7E15163, 0x9E3779B9)         elif self.W == 64:             return (0xB7E151628AED2A6B, 0x9E3779B97F4A7C15)       def __keyExtend(self): # \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 S         P, Q = self.__const()         self.S = [(P + i * Q) % 2 ** self.W for i in range(2 * self.R + 1)] <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h6><font color=\"Crimson\">\u041f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u0435<\/font><\/h6>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043b\u0438\u0448\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 L \u0438 S \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0446\u0438\u043a\u043b:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/2c3\/679\/2ab\/2c36792abd0643d0993a70bbbecba30c.gif\" title=\"A=S[i]=(S[i]+A+A)&lt;&lt;&lt;3\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/5eb\/110\/1f6\/5eb1101f6b844bd689f89e7b59b6796d.gif\" title=\"B=L[j]=(L[j]+A+B)&lt;&lt;&lt;(A+B)\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/d5c\/802\/7d5\/d5c8027d5b354704b4ae8a96a409bfac.gif\" title=\"i=(i+1)mod(2*R+1)\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7c3\/ee2\/617\/7c3ee2617e9d4618908d2b489af696f7.gif\" title=\"j=(j+1)mod(c)\"\/>, \u0433\u0434\u0435<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/ee8\/f29\/e84\/ee8f29e843cf42afb91e4c5a56b5a497.gif\" title=\"i,j,A,B\"\/> \u2014 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0432\u043d\u044b 0<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/910\/e20\/582\/910e20582dbf4209948fc6736599cb3c.gif\" title=\"L,S\"\/> \u2014 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0448\u0430\u0433\u0430\u0445<br \/>  \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/06e\/d7a\/f42\/06ed7af42295476eaa99fad335d5ed77.gif\" title=\"N\"\/> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a88\/735\/712\/a8873571264b43b4b2626caca9b6dd5d.gif\" title=\"N=3*max(c, 2*R+1)\"\/><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Python listing<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def __shuffle(self):     m = max(self.c, 2 * self.R + 1)     i, j, A, B = 0, 0, 0, 0     for k in range(3 * m):         A = self.S[i] = self.__lshift((self.S[i] + A + B), 3)         B = self.L[j] = self.__lshift((self.L[j] + A + B), A + B)         i = (i + 1) % (2 * self.R + 1)         j = (j + 1) % self.c <\/code><\/pre>\n<p>  lshift \u0438 rshift(\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0441\u044f \u043d\u0430\u043c \u0447\u0443\u0442\u044c \u043d\u0438\u0436\u0435) \u044d\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u0434\u0432\u0438\u0433\u0430 \u0432\u043b\u0435\u0432\u043e \u0438 \u0432\u043f\u0440\u0430\u0432\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<br \/>  \u042f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0438\u0445 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u0437\u043b\u0438\u0448\u043d\u0438\u043c\u0438, \u0430 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 github(\u0441\u0441\u044b\u043b\u043a\u0430 \u0432 \u043a\u043e\u043d\u0446\u0435)  <\/div>\n<\/div>\n<h5><font color=\"DarkOrchid\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430<\/font><\/h5>\n<p>  <\/p>\n<h6><font color=\"Crimson\">\u0428\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/font><\/h6>\n<p>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u0435\u0442\u044c \u0424\u0435\u0439\u0441\u0442\u0435\u043b\u044f, \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0440\u0430\u0443\u043d\u0434\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439(\u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e) \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/062\/12e\/cda\/06212ecda1674f018670146136481463.gif\" title=\"A=((A+B)&lt;&lt;&lt;B)+S[2*r]mod2^w\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/ae2\/6e6\/f33\/ae26e6f3304b4f8dbe25893894c14473.gif\" title=\"B=((A+B)&lt;&lt;&lt;A)+S[2*r+1]mod2^w\"\/>,<br \/>  \u0433\u0434\u0435<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/030\/a67\/91f\/030a6791f03a498ea4e3a868477e2147\" title=\"r\"\/> \u2014 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0440\u0430\u0443\u043d\u0434\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 1<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8f9\/c29\/383\/8f9c29383c5a48c58346a52f3f20b533.gif\" title=\"S[n]\"\/> \u2014 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/213\/8f7\/ed1\/2138f7ed1bdd46eeb7393549f5661cd7.gif\" title=\"&lt;&lt;&lt;n\"\/> \u2014 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u0434\u0432\u0438\u0433\u0430 \u043d\u0430 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/805\/dd5\/53f\/805dd553f8a541069d6eb5c511a49c25.gif\" title=\"n\"\/> \u0431\u0438\u0442\u043e\u0432 \u0432\u043b\u0435\u0432\u043e<\/p>\n<p>  \u0412 \u043d\u0443\u043b\u0435\u0432\u043e\u043c \u0440\u0430\u0443\u043d\u0434\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u043f\u0435\u0440\u0432\u044b\u0445 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u043d\u0430 \u0448\u0438\u0444\u0440\u0443\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/3ef\/39f\/3d0\/3ef39f3d0e98473da28752fd8850aa44.gif\" title=\"A=(A+S[0])mod2^w\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/57f\/7b1\/a8f\/57f7b1a8f3e8495ea9de91b0467b94ff.gif\" title=\"B=(B+S[1])mod2^w\"\/><\/p>\n<p>  \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0434 \u0440\u0430\u0443\u043d\u0434\u043e\u043c \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0434\u0432\u0443\u043c \u0440\u0430\u0443\u043d\u0434\u0430\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432, \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0435\u0442\u0435\u0439 \u0424\u0435\u0439\u0441\u0442\u0435\u043b\u044f. \u0417\u0430 \u0440\u0430\u0443\u043d\u0434 RC5 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0431\u043b\u043e\u043a \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u0440\u0430\u0443\u043d\u0434\u0430 \u0441\u0435\u0442\u0438 \u0424\u0435\u0439\u0441\u0442\u0435\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u043f\u043e\u0434\u0431\u043b\u043e\u043a \u2014 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0431\u043b\u043e\u043a\u0430.<\/p>\n<p>  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Python listing<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def encrypt(self, inpFileName, outFileName): # \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0438 \u0438\u043c\u044f \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430     with open(inpFileName, 'rb') as inp, open(outFileName, 'wb') as out: # \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438         while True:             text = inp.read(self.W \/\/ 4) # \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u0431\u0430\u0439\u0442             if not text: # \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u0435\u0441\u043b\u0438 \u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u043f\u0443\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443(\u043c\u0430\u0441\u0441\u0438\u0432 \u0431\u0430\u0439\u0442)                  break             text = text.ljust(self.W \/\/ 4, b'\\x00') # \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0447\u0438\u0442\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u0447\u0442\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0431\u043b\u043e\u0447\u043d\u043e\u0433\u043e \u0448\u0438\u0444\u0440\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0435\u0451 \u043d\u0443\u043b\u0435\u0432\u044b\u043c\u0438 \u0431\u0430\u0439\u0442\u0430\u043c\u0438             A = int.from_bytes(text[:self.W \/\/ 8], byteorder='little')             B = int.from_bytes(text[self.W \/\/ 8:], byteorder='little')             A = (A + self.S[0]) % 2 ** self.W # \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0440\u0430\u0443\u043d\u0434             B = (B + self.S[1]) % 2 ** self.W             for i in range(1, self.R):                  A = (self.__lshift((A ^ B), B)                      + self.S[2 * i]) % 2 ** self.W                 B = (self.__lshift((A ^ B), A)                      + self.S[2 * i + 1]) % 2 ** self.W             out.write(A.to_bytes(self.W \/\/ 8, byteorder='little') +                      B.to_bytes(self.W \/\/ 8, byteorder='little')) # \u0437\u0430\u043f\u0438\u0441\u044c \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u0430\u0439\u043b <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h6><font color=\"Crimson\">\u0420\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u043d\u0438\u0435<\/font><\/h6>\n<p>  \u0420\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0442.\u0435. \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0446\u0438\u043a\u043b:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/255\/df6\/edb\/255df6edbdd24c7ab507969c618719d2.gif\" title=\"B=(((B-S[2*r+1])mod2^w)&gt;&gt;&gt;A)+A\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e50\/a47\/9e5\/e50a479e53de4dffaaefaa941f9f629f.gif\" title=\"A=(((A-S[2*r])mod2^w)&gt;&gt;&gt;B)+B\"\/>,<br \/>  \u0433\u0434\u0435<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/951\/d3f\/197\/951d3f197a2f4ab993d02776d74edde6.gif\" title=\"&gt;&gt;&gt;n\"\/> \u2014 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u0434\u0432\u0438\u0433\u0430 \u0432\u043f\u0440\u0430\u0432\u043e<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/030\/a67\/91f\/030a6791f03a498ea4e3a868477e2147\" title=\"r\"\/> \u2014 \u043d\u043e\u043c\u0435\u0440 \u0440\u0430\u0443\u043d\u0434\u0430 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0442.\u0435. \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/db6\/2af\/3df\/db62af3df14d400d9a6fcb90aba772ec.gif\" title=\"R\"\/> \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0435\u0439.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0434\u043b\u044f \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0440\u0430\u0443\u043d\u0434\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b57\/61d\/ab0\/b5761dab08b54b67b8e1cad5c2432b4c.gif\" title=\"B=(B-S[1])mod2^w\"\/><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/2b2\/755\/9df\/2b27559df7cf4e839ab3200800381b59.gif\" title=\"A=(A-S[0])mod2^w\"\/><\/p>\n<p>  \u041a\u043e\u0434 \u0442\u0443\u0442:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Python listing<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def decrypt(self, inpFileName, outFileName):     with open(inpFileName, 'rb') as inp, open(outFileName, 'wb') as out:         while True:             text = inp.read(self.W \/\/ 4)             if not text:                 break             A = int.from_bytes(text[:self.W \/\/ 8], byteorder='little')             B = int.from_bytes(text[self.W \/\/ 8:], byteorder='little')             for i in range(self.R - 1, 0, -1):                 B = self.__rshift(                     ((B - self.S[2 * i + 1]) % 2 ** self.W), A) ^ A                 A = self.__rshift(                     ((A - self.S[2 * i]) % 2 ** self.W), B) ^ B             B = (B - self.S[1]) % 2 ** self.W             A = (A - self.S[0]) % 2 ** self.W             res = (A.to_bytes(self.W \/\/ 8, byteorder='little')                    + B.to_bytes(self.W \/\/ 8, byteorder='little'))             out.write(res.rstrip(b'\\x00')) # \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0431\u0430\u0439\u0442\u044b <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0440\u0430\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442 \u2014 \u0432 \u043d\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e 2 \u0438 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/788\/48d\/443\/78848d443f704e81b1a2b1e2a402aec7.gif\" title=\"2^w\"\/>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0434\u0432\u0438\u0433\u0438 \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0431\u0438\u0442\u043e\u0432. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0438\u0437 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043a\u0430\u043a \u0440\u0435\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0432 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u0445 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u0434\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 RC5 \u0442\u0430\u043a\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 Madryga, \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u043c \u0448\u0438\u0440\u043e\u043a\u043e\u0433\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f), \u2014 \u0441\u0434\u0432\u0438\u0433 \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0431\u0438\u0442\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043e\u0434\u043d\u0430\u043a\u043e, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u043a\u0440\u0438\u043f\u0442\u043e\u0430\u043d\u0430\u043b\u0438\u0437 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. \u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0435\u0433\u043e \u0432\u0430\u0436\u043d\u043e\u0435 \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u043e \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043b\u0435\u0433\u0447\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043b\u0435\u0433\u0447\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>  \u041a\u043e\u0434 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 <a href=\"https:\/\/github.com\/tbb\/pyRC5\/blob\/master\/RC5.py\">github<\/a>.  <\/p>\n<h6><font color=\"Crimson\">\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u0440\u0438\u043f\u0442\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0430<\/font><\/h6>\n<p>  <\/p>\n<ul>\n<li> \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 \u043a\u043b\u044e\u0447\u0435\u0439 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u043a\u0440\u044b\u0442\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u043c \u043a\u0440\u0438\u043f\u0442\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c. \u0412 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u044d\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/li>\n<li> \u0414\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0440\u0438\u043f\u0442\u043e\u0430\u043d\u0430\u043b\u0438\u0437 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u0435\u043d \u043f\u0440\u0438 \u0430\u0442\u0430\u043a\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u043c\u0430 RC5-32-12-16, \u0432 \u043b\u0443\u0447\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/400\/ce4\/8ad\/400ce48adc824d56a0f2134c94e0e3ff.gif\" title=\"2^44\"\/> \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432 \u0434\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0430\u0442\u0430\u043a\u0438. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 18-20(\u0438 \u0431\u043e\u043b\u044c\u0448\u0435) \u0440\u0430\u0443\u043d\u0434\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u043e 12 \u0432\u0441\u043a\u0440\u044b\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u0440\u0438\u043f\u0442\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/li>\n<\/ul>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0432\u0437\u043b\u043e\u043c\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 RC5 (\u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0430\u0443\u043d\u0434\u043e\u0432 \u0438 \u0441 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u043c \u043a\u043b\u044e\u0447\u043e\u043c) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043a\u043b\u044e\u0447\u0430 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0427\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 RC5 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u0441\u0442\u043e\u0439\u043a\u043e\u0441\u0442\u0438. \u041d\u0430 \u044d\u0442\u043e\u043c \u0438 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c. \u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.       <\/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=\"http:\/\/habrahabr.ru\/post\/267295\/\"> http:\/\/habrahabr.ru\/post\/267295\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6ba\/a47\/468\/6baa474684cf46b9a5cdb8df9256d1ff.png\" align=\"left\"\/>  <\/p>\n<h4><font color=\"DarkOrchid\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c RC5<\/font><\/h4>\n<p>  \u0412 \u0441\u0432\u043e\u0451\u043c \u043f\u043e\u0441\u0442\u0435, \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f RC5 \u0438 \u043c\u043e\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0435\u0433\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 python. \u0414\u0430\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0435\u0439\u0448\u0438\u043c \u043a\u0440\u0438\u043f\u0442\u043e\u043b\u043e\u0433\u043e\u043c \u0420\u043e\u043d\u0430\u043b\u044c\u0434\u043e\u043c <s>\u041c\u0430\u043a\u0434\u043e\u043d\u0430\u043b\u044c\u0434\u043e\u043c<\/s> \u0420\u0438\u0432\u0435\u0441\u0442\u043e\u043c \u2014 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b RSA \u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u0439 \u0444\u0438\u0440\u043c\u044b. \u041f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 RC5 \u0441\u0442\u043e\u0438\u0442 \u0432 \u043e\u0434\u043d\u043e\u043c \u0440\u044f\u0434\u0443 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438 \u043a\u0430\u043a IDEA \u0438 Blowfish. \u0410\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u0430 RC \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c, \u043b\u0438\u0431\u043e Rivest Cipher, \u043b\u0438\u0431\u043e Ron&#8217;s Code, \u0447\u0442\u043e \u0432 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u0451\u0442 \u043d\u0430\u043c \u00ab\u0448\u0438\u0444\u0440 \u0420\u043e\u043d\u0430 \u0420\u0438\u0432\u0435\u0441\u0442\u0430\u00bb. \u0417\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.  <\/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-266035","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/266035","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=266035"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/266035\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=266035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=266035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=266035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}