{"id":2970,"date":"2009-03-10T09:45:15","date_gmt":"2009-03-10T06:45:15","guid":{"rendered":"http:\/\/studentpmr.ru\/?p=2970"},"modified":"2009-03-10T09:45:15","modified_gmt":"2009-03-10T06:45:15","slug":"%d0%b1%d0%bb%d0%be%d1%87%d0%bd%d1%8b%d0%b9-%d1%88%d0%b8%d1%84%d1%80-tea","status":"publish","type":"post","link":"https:\/\/studentpmr.ru\/?p=2970","title":{"rendered":"\u0411\u043b\u043e\u0447\u043d\u044b\u0439 \u0448\u0438\u0444\u0440 TEA"},"content":{"rendered":"<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u043d\u043e \u0441\u0442\u043e\u0439\u043a\u0438\u0445 \u043a\u0440\u0438\u043f\u0442\u043e\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u2013 TEA (Tiny Encryption Algorithm).<br \/>\n\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 :<br \/>\n\u0420\u0430\u0437\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430 \u2013 64 \u0431\u0438\u0442\u0430.<br \/>\n\u0414\u043b\u0438\u043d\u0430 \u043a\u043b\u044e\u0447\u0430 \u2013 128 \u0431\u0438\u0442.<!--more--><br \/>\n\u0412 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0441\u0435\u0442\u044c \u0424\u0435\u0439\u0448\u0442\u0435\u043b\u044f \u0441 \u0434\u0432\u0443\u043c\u044f \u0432\u0435\u0442\u0432\u044f\u043c\u0438 \u0432 32 \u0431\u0438\u0442\u0430 \u043a\u0430\u0436\u0434\u0430\u044f.<br \/>\n\u041e\u0431\u0440\u0430\u0437\u0443\u044e\u0449\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f F \u043e\u0431\u0440\u0430\u0442\u0438\u043c\u0430.<br \/>\n\u0421\u0435\u0442\u044c \u0424\u0435\u0439\u0448\u0442\u0435\u043b\u044f \u043d\u0435\u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u0430 \u0438\u0437-\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0435\u0433\u043e &#171;\u0418\u041b\u0418&#187;, \u0430 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<br \/>\n\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043a\u043e\u0434 \u043a\u0440\u0438\u043f\u0442\u043e\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f PASCAL.<br \/>\ntype TLong2=array[0.. 1] of longint;<br \/>\nTLong2x2=array[0.. 1] of TLong2;<br \/>\nconst Delta=$9E3779B9;<br \/>\nvar   key:TLong2x2;<br \/>\nprocedure EnCryptRouting(var data);<br \/>\nvar y,z,sum:longint; a:byte;<br \/>\nbegin<br \/>\ny:=TLong2(data)[0];z:=TLong2(data)[1];sum:=0;<br \/>\nfor a:=0 to 31 do<br \/>\nbegin<br \/>\ninc(sum,Delta);<br \/>\ninc(y,((z shl 4)+key[0,0]) xor (z+sum) xor ((z shr 5)+key[0,1]));<br \/>\ninc(z,((y shl 4)+key[1,0]) xor (y+sum) xor ((y shr 5)+key[1,1]));<br \/>\nend;<br \/>\nTLong2(data)[0]:=y;TLong2(data)[1]:=z<br \/>\nend;<br \/>\n\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 1.<\/p>\n<p>\u0420\u0438\u0441.1.<br \/>\n\u041e\u0442\u043b\u0438\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0447\u0435\u0440\u0442\u043e\u0439 \u043a\u0440\u0438\u043f\u0442\u043e\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 TEA \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440. \u041f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0434 32-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 ASSEMBLER \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u043e \u043c\u0430\u043b\u043e\u043c \u043e\u0431\u044a\u0435\u043c\u0435 \u043a\u043e\u0434\u0430. \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u0435\u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0432\u044b\u0437\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0446\u0438\u043a\u043b \u0424\u0435\u0439\u0448\u0442\u0435\u043b\u044f 32 \u0440\u0430\u0437\u0430 (\u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e &#171;\u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445&#187; \u0438\u0437-\u0437\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u043d\u043e \u0441\u0442\u043e\u0439\u043a\u0438\u0445 \u043a\u0440\u0438\u043f\u0442\u043e\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u2013 TEA (Tiny Encryption Algorithm). \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 : \u0420\u0430\u0437\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430 \u2013 64 \u0431\u0438\u0442\u0430. \u0414\u043b\u0438\u043d\u0430 \u043a\u043b\u044e\u0447\u0430 \u2013 128 \u0431\u0438\u0442.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"_links":{"self":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/2970"}],"collection":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2970"}],"version-history":[{"count":1,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/2970\/revisions"}],"predecessor-version":[{"id":2971,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/2970\/revisions\/2971"}],"wp:attachment":[{"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}