{"id":176513,"date":"2013-04-15T18:08:03","date_gmt":"2013-04-15T14:08:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=176513"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=176513","title":{"rendered":"<span class=\"post_title\">\u0411\u0435\u0440\u0435\u043c \u043f\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u0432 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 MEGA<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" align=\"left\" src=\"http:\/\/habrastorage.org\/storage2\/f5b\/2db\/72c\/f5b2db72c9de0dd1cc3718061439ef93.jpg\"\/>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u0435\u0440\u0435 \u0441\u043a\u0430\u043d\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 MEGA \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u044b \u043e \u0435\u0433\u043e \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0431\u0443\u0440\u043b\u0438\u043b\u0438 \u0438 \u0437\u0430\u0442\u0438\u0445\u043b\u0438. \u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u0441\u0435\u0440\u0432\u0438\u0441 \u0436\u0438\u0432\u0435\u0442 \u0441\u0432\u043e\u0435\u0439 \u0436\u0438\u0437\u043d\u044c\u044e \u0438 \u0435\u0433\u043e \u043d\u0438\u043a\u0442\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u043e\u043b\u043e\u043c\u0430\u043b. \u0418\u0437 \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043e\u0432 \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0431\u044b\u043b \u0443\u043f\u0443\u0449\u0435\u043d \u0442\u0435\u0440\u043c\u0438\u043d \u00abUser Controlled Encryption\u00bb (UCE, \u0438\u043b\u0438 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f), \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u0438\u0447\u0438\u0442\u0441\u044f MEGA. \u041f\u043e\u0434 \u0441\u043b\u043e\u0432\u043e\u043c \u00ab\u0443\u043f\u0443\u0449\u0435\u043d\u00bb \u044f \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0432\u0438\u0436\u043e\u043a, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0439\u0441\u044f \u0432 JavaScript \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. <\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0430\u043c \u0441\u0435\u0440\u0432\u0438\u0441 MEGA \u043f\u043e\u0434 \u044d\u0442\u0438\u043c \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0442\u043e, \u0447\u0442\u043e \u043a\u043b\u044e\u0447\u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0430 \u0432\u0441\u044f <u>\u0438\u0445<\/u> \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0431\u044b\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043e\u0432 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u043d\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0435\u0441\u0442\u043e\u0439\u043a\u0438\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b <strike>\u0438 \u0447\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0435 \u043f\u043b\u043e\u0445\u043e \u0438 \u043c\u044b \u0432\u0441\u0435 \u0443\u043c\u0440\u0435\u043c, \u0430 \u043d\u0430\u0448\u0438 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442 \u0424\u0421\u0411<\/strike>. \u042d\u0442\u043e \u043f\u043e\u0434\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u043e \u043c\u0435\u043d\u044f \u043d\u0430 \u043c\u044b\u0441\u043b\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u00abUCE\u00bb \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u043f\u043e\u0434 \u0441\u0432\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0440\u0430\u0437\u043b\u043e\u0436\u0443 \u043f\u043e \u043f\u043e\u043b\u043e\u0447\u043a\u0430\u043c \u043c\u0430\u0433\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0434\u0432\u0443\u0445 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442\u0430\u0445 JavaScript-\u043a\u043e\u0434\u0430 MEGA \u0438 \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0442\u044c \u0432\u043e\u043b\u043d\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u043b\u044e\u0431\u0438\u0442\u044c \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0434\u0432\u0443\u0445\u0444\u0430\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u043c \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. <a name=\"habracut\"><\/a><\/p>\n<h1>MEGA, UCE \u0438 \u0432\u0441\u0435-\u0432\u0441\u0435-\u0432\u0441\u0435<\/h1>\n<p>\u0418\u0442\u0430\u043a, \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0441\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u043e\u043b\u044f \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430\/\u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<h2>JavaScript<\/h2>\n<p>\u041a\u0430\u043a \u0432\u0430\u043c \u0443\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0432\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 JavaScript, \u0432 \u043a\u043e\u0434\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b SHA-256 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c. \u0421\u0430\u043c\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u0443 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043e\u043d\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u0438\u043d BLOB, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0434\u0430\u0435\u0442\u0441\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443. \u041f\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443 js-\u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0438\u0445 \u043f\u0438\u0441\u0430\u043b\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u043b\u044e\u0434\u0438 \u0438 \u043f\u043e\u0440\u043e\u0439 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0437\u0430\u0431\u0430\u0432\u043d\u044b\u0435 \u043f\u0435\u0440\u043b\u044b, \u043a\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0430, \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. <\/p>\n<p>  <a href=\"http:\/\/instacod.es\/70276\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/2af\/4d9\/9ce\/2af4d99ce2a8cba221567abf361cd89f.png\"\/><\/a><\/p>\n<p>  <a href=\"http:\/\/instacod.es\/67689\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/1a3\/95a\/e0d\/1a395ae0d86e426a5ce2a32e7f42cecb.png\"\/><\/a><\/p>\n<p>  <a href=\"http:\/\/instacod.es\/70307\"><img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/86c\/dc8\/0a5\/86cdc80a5be33f29f8b399f6b3880ccc.png\"\/><\/a><\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0441\u0430\u0439\u0442\u0430 \u044f \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u043e\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u0435\u043b\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u0447\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c. \u0421\u0430\u043c \u043a\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e \u0438 \u0431\u0435\u0437 \u0438\u0437\u043b\u0438\u0448\u043d\u0435\u0439 \u043d\u0430\u043a\u0440\u0443\u0442\u043a\u0438 \u0432 \u0432\u0438\u0434\u0435 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u0432: \u0441\u0430\u0439\u0442 \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0440\u0435\u043c\u044f \u0441\u043e\u0442\u043d\u044f\u043c\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c 8000 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0441\u0430\u0439\u0442\u0430 \u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u0435\u0433\u043e \u043a\u043e\u0434 \u0431\u044b\u043b\u043e \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<p>  \u0418\u0437 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 MEGA \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 jQuery (\u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0438\u043a\u0443\u0434\u0430), Ext JS \u0438 <a href=\"http:\/\/crypto.stanford.edu\/sjcl\/\">SJCL<\/a>. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043a\u0430\u043a \u0440\u0430\u0437 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u044f\u0434\u0440\u043e \u0441 AES-\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c. SJCL \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u0443\u0441\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u0431\u0430\u0439\u0442-\u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432: \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u043e\u043d\u044f\u0442\u044c \u0431\u0430\u0439\u0442\u044b \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0435, \u043e\u043d\u0438 \u00ab\u0441\u0436\u0438\u043c\u0430\u044e\u0442\u0441\u044f\u00bb \u0432 \u0444\u043e\u0440\u043c\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u043d\u0443\u0435\u0442\u0441\u044f a32. \u0415\u0433\u043e \u0441\u0443\u0442\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0431\u0430\u0439\u0442 \u043f\u0430\u043a\u0443\u0435\u0442\u0441\u044f \u0432 32-\u0431\u0438\u0442\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0434\u043b\u0438\u043d\u044b. \u0422\u043e \u0435\u0441\u0442\u044c, \u043a\u0430\u0436\u0434\u044b\u0435 4 \u0431\u0430\u0439\u0442\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043e\u0434\u0438\u043d \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0439 int. \u0412 \u043a\u043e\u0434\u0435 \u0441\u0430\u0439\u0442\u0430 \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0434 \u0438\u043c\u043f\u0440\u043e\u0432\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c {a32 array, string, base64 string}.<\/p>\n<h2>\u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f<\/h2>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0434\u043b\u0435\u0436\u0438\u0442 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044e, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li><b>\u041c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0438\u043c\u0435\u0435\u0442 \u0434\u043b\u0438\u043d\u0443 \u0432 128 \u0431\u0438\u0442. \u0414\u0430 \u0438 \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0434\u043b\u0438\u043d\u0430 \u0432\u0441\u0435\u0445 \u043a\u043b\u044e\u0447\u0435\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0440\u0430\u0432\u043d\u0430 128 \u0431\u0438\u0442.<\/li>\n<li><b>\u0417\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 RSA<\/b>: \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0439 \u043c\u044b\u0448\u0438 \u0438 \u0432\u0432\u043e\u0434\u0430 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0430\u043a\u0446\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0430\u0441\u0441\u0438\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u0430\u043c, \u0430 \u0443 \u043c\u0435\u043d\u044f \u0441\u0442\u043e\u044f\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/li>\n<li><b>\u0418\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0441\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u044b<\/b>, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441. \u041a\u043b\u044e\u0447\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0444\u0430\u0439\u043b\u0430, \u0434\u043b\u044f \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0430\u043c \u044d\u0442\u043e\u0442 \u043a\u043b\u044e\u0447, \u0430 \u0434\u043b\u044f \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u2014 \u043a\u043b\u044e\u0447, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b.<\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u0411\u043b\u0438\u0436\u0435 \u043a \u043a\u043e\u0434\u0443<\/h3>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447 \u0438 \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0435\u0433\u043e \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<br \/>  \u042f \u0442\u0443\u0442 \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043d\u0430 \u0431\u0443\u043c\u0430\u0436\u043a\u0435 \u044d\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0438 \u0434\u0430\u0431\u044b \u0434\u0430\u0442\u044c \u0432\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u044c \u0432\u0441\u044e \u0441\u0443\u0442\u044c \u0431\u0435\u0437\u0443\u043c\u0438\u044f, \u0434\u0430\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0444\u043e\u0442\u043a\u0443:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/408\/652\/388\/40865238884a8b9df7548702d35c12c5.png\"\/><\/p>\n<h4>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h4>\n<p>\u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u0439, \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0430\u043d\u043a\u0435\u0442\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0433\u0443\u0447\u0430\u044f \u043a\u0443\u0447\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043d\u043e \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>api_createuser<\/code>:<\/p>\n<pre><code class=\"javascript\">\/\/ \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0435\u0433\u043e \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430 function api_createuser(ctx, invitecode, invitename, uh) { \tvar i; \tvar ssc = Array(4); \/\/ session self challenge, will be used to verify password \tvar req, res; \tif (!ctx.passwordkey) { \t\tctx.passwordkey = Array(4); \t\tfor (i = 4; i--;) ctx.passwordkey[i] = rand(0x100000000); \t} \tif (!u_k) api_create_u_k(); \/\/ \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430 u_k \tfor (i = 4; i--;) ssc[i] = rand(0x100000000); \/\/ \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \tif (d) console.log(&quot;api_createuser - masterkey: &quot; + u_k + &quot; passwordkey: &quot; + ctx.passwordkey);  \t\/\/ \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0435\u0433\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 (\u043f\u043e\u043b\u0435 k) \t\/\/ \u043f\u043e\u043b\u0435 ts \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044e ssc \u0441 \u0435\u0435 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \treq = { \t\ta: 'up', \t\tk: a32_to_base64(encrypt_key(new sjcl.cipher.aes(ctx.passwordkey), u_k)), \t\tts: base64urlencode(a32_to_str(ssc) + a32_to_str(encrypt_key(new sjcl.cipher.aes(u_k), ssc))) \t}; \tif (invitecode) { \t\treq.uh = uh; \t\treq.ic = invitecode; \t\treq.name = invitename; \t} \tif (d) console.log(&quot;Storing key: &quot; + req.k); \tapi_req([req], ctx); } <\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0435\u0449\u0438:<\/p>\n<ul>\n<li><code>u_k<\/code> \u2014 \u0441\u0430\u043c \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447, \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f. \u041c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 4\u0445 32-\u0431\u0438\u0442\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <code>api_create_uk<\/code><\/li>\n<li><code>ssc<\/code> \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0435, \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440. \u041f\u043e\u0437\u0436\u0435 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430 \u043f\u0440\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/li>\n<li><code>sjcl<\/code> \u2014 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0430\u044f AES<\/li>\n<li><code>rand()<\/code> \u2014 \u043c\u0435\u0441\u0442\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430 RC4<\/li>\n<li><code>encrypt_key()<\/code> \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f-\u043a\u0440\u0430\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0439 \u043a\u0430\u043c\u0435\u043d\u044c \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442 <code>sjcl<\/code> \u0438 \u043c\u0430\u0441\u0441\u0438\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0434\u043e \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c. \u041a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043d\u0438\u0436\u0435 \u0438, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f\u0445.<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ encrypt\/decrypt 4- or 8-element 32-bit integer array function encrypt_key(cipher, a) { \tif (a.length == 4) return cipher.encrypt(a); \tvar x = []; \tfor (var i = 0; i &lt; a.length; i += 4)  \t\tx = x.concat(cipher.encrypt([a[i], a[i + 1], a[i + 2], a[i + 3]])); \treturn x; } <\/code><\/pre>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\u041c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447, \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043a\u043b\u044e\u0447\u0435, \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0438\u0437 \u043f\u0430\u0440\u043e\u043b\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438<\/li>\n<li>\u0421\u0442\u0440\u043e\u043a\u0430 \u0432\u0438\u0434\u0430 <code>ssc||encrypt_AES-128(u_k, ssc)<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<h4>\u0412\u0445\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043b\u0430\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u0412\u043a\u0440\u0430\u0442\u0446\u0435 \u043e\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0430\u043a:<\/p>\n<ol>\n<li>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u043e\u0434\u0438\u0442 \u043b\u043e\u0433\u0438\u043d\/\u043f\u0430\u0440\u043e\u043b\u044c<\/li>\n<li>\u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u0442\u0430\u043f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0439\u0434\u0435\u043d, \u0442\u043e \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c (<code>ssc<\/code>), \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438<\/li>\n<li>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430 \u043d\u0430 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u0435<\/li>\n<li>\u041d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0435 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u2014 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f.<\/li>\n<\/ol>\n<p>\u0417\u0430 \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 callback-\u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>api_getsid2<\/code>:<\/p>\n<pre><code class=\"javascript\">\/\/ \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430 \u043f\u043e\u0441\u043b\u0435 \u0432\u0445\u043e\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 function api_getsid2(res, ctx) { \tvar t, k; \tvar r = false; \tif (typeof res == 'object') { \t\t\/\/ \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c sjcl-aes \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u0443\u0447\u0435\u0442\u043a\u0438 \t\tvar aes = new sjcl.cipher.aes(ctx.passwordkey); \t\t\/\/ \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u0448\u0435\u043b \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447... \t\tif (typeof res[0].k == 'string') { \t\t\tk = base64_to_a32(res[0].k); \t\t\tif (k.length == 4) { \t\t\t\t\/\/ ... \u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \t\t\t\tk = decrypt_key(aes, k); \t\t\t\t\/\/ \u0438 \u043f\u0435\u0440\u0435-\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c sjcl-aes, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447 \t\t\t\taes = new sjcl.cipher.aes(k); \t\t\t\t\/\/ \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u0430 ssc \u0438\u0437 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \t\t\t\tif (typeof res[0].tsid == 'string') { \t\t\t\t\tt = base64urldecode(res[0].tsid); \t\t\t\t\t\/\/ \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u0443\u044e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \t\t\t\t\t\/\/ \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0441\u043e\u0432\u043f\u0430\u043b\u0438 - \u0437\u043d\u0430\u0447\u0438\u0442, \u0432\u0441\u0435 \u044f\u0432\u043a\u0438 \u0438 \u043f\u0430\u0440\u043e\u043b\u0438 \u0441\u043e\u0448\u043b\u0438\u0441\u044c \u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044e\u0437\u0435\u0440\u0430 \t\t\t\t\tif (a32_to_str(encrypt_key(aes, str_to_a32(t.substr(0, 16)))) == t.substr(-16)) r = [k, res[0].tsid]; \t\t\t\t}  \t\t\t\t\/\/ \u043d\u0438\u0436\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 RSA-\u043f\u0430\u0440\u044b, \u043d\u0430\u043c \u044d\u0442\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \t\t\t\telse if (typeof res[0].csid == 'string') { \t\t\t\t\tvar t = mpi2b(base64urldecode(res[0].csid)); \t\t\t\t\tvar privk = a32_to_str(decrypt_key(aes, base64_to_a32(res[0].privk))); \t\t\t\t\tvar rsa_privk = Array(4);  \t\t\t\t\t\/\/ decompose private key \t\t\t\t\tfor (var i = 0; i &lt; 4; i++) { \t\t\t\t\t\tvar l = ((privk.charCodeAt(0) * 256 + privk.charCodeAt(1) + 7) &gt;&gt; 3) + 2; \t\t\t\t\t\trsa_privk[i] = mpi2b(privk.substr(0, l)); \t\t\t\t\t\tif (typeof rsa_privk[i] == 'number') break; \t\t\t\t\t\tprivk = privk.substr(l); \t\t\t\t\t}  \t\t\t\t\t\/\/ check format \t\t\t\t\tif (i == 4 && privk.length &lt; 16) { \t\t\t\t\t\t\/\/ TODO: check remaining padding for added early wrong password detection likelihood \t\t\t\t\t\tr = [k, base64urlencode(crypto_rsadecrypt(t, rsa_privk).substr(0, 43)), rsa_privk]; \t\t\t\t\t} \t\t\t\t} \t\t\t} \t\t} \t} \tctx.result(ctx, r); } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0431\u043e\u043d\u0443\u0441 \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438\/\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043c\u0435\u043d\u044b \u043f\u0430\u0440\u043e\u043b\u044f.<\/p>\n<pre><code class=\"javascript\">\/\/ \u0441\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u043e\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f function changepw(currentpw, newpw, ctx) { \tvar pw_aes = new sjcl.cipher.aes(prepare_key_pw(newpw)); \tapi_req([{ \t\ta: 'up', \t\tcurrk: a32_to_base64(encrypt_key(new sjcl.cipher.aes(prepare_key_pw(currentpw)), u_k)), \t\tk: a32_to_base64(encrypt_key(pw_aes, u_k)), \t\tuh: stringhash(u_attr['email'].toLowerCase(), pw_aes) \t}], ctx); } <\/code><\/pre>\n<p>  \u041a\u043e\u0434 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0441\u0430\u043c \u0437\u0430 \u0441\u0435\u0431\u044f: \u043c\u044b \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447 \u043d\u0430 \u0434\u0432\u0443\u0445 \u043a\u043b\u044e\u0447\u0430\u0445, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0430\u0440\u043e\u043b\u0435\u0439, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440. \u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u0434\u043e\u0448\u0435\u043b, \u0442\u043e \u043e\u043d \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u043e\u0432\u044b\u0439. \u0422\u0443\u0442 \u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u0445\u043e\u0442\u0435\u043b \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>prepare_key_pw<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435\u044f\u0432\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430 \u0432\u043e \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u0445. \u0415\u0435 \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0432 a32-\u043c\u0430\u0441\u0441\u0438\u0432, \u0430 \u043f\u043e\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e \u0434\u0435\u0440\u0438\u0432\u0430\u0446\u0438\u0438 \u043a\u043b\u044e\u0447\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"javascript\">\/\/ convert user-supplied password array function prepare_key(a) { \tvar i, j, r; \tvar aes = []; \tvar pkey = [0x93C467E3, 0x7DB0C7A4, 0xD1BE3F81, 0x0152CB56];  \tfor (j = 0; j &lt; a.length; j += 4) { \t\tkey = [0, 0, 0, 0]; \t\tfor (i = 0; i &lt; 4; i++)  \t\t\tif (i + j &lt; a.length)  \t\t\t\tkey[i] = a[i + j]; \t\t\taes.push(new sjcl.cipher.aes(key)); \t} \tfor (r = 65536; r--;)  \t\tfor (j = 0; j &lt; aes.length; j++)  \t\t\tpkey = aes[j].encrypt(pkey); \treturn pkey; } <\/code><\/pre>\n<p>   \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0437\u0432\u0430\u043b\u0430 \u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0440\u0435\u043a\u0430\u043d\u0438\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0434\u043e\u043c\u043e\u0440\u043e\u0449\u0435\u043d\u043d\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435. \u0417\u0430 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0443\u0441\u043f\u0435\u043b\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0435\u0435 \u043a\u043e\u0434, \u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u044f \u0442\u0443\u0442 \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b. \u0415\u0435 \u0441\u0443\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f 65536 \u0440\u0430\u0437 \u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u043c \u043a\u043b\u044e\u0447\u0435 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043e\u0442\u043b\u0438\u0447\u0438\u043c\u044b\u0439 \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447. \u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, PBKDF2), \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u0430\u0434\u043a\u043e\u0439.<\/p>\n<h2>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432<\/h2>\n<p>\u0412\u043a\u0440\u0430\u0442\u0446\u0435 \u0432\u0435\u0441\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/a49\/da1\/ee5\/a49da1ee596420333ed6f0810b75453f.jpg\"\/><\/p>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e, \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u043d\u0438\u043a\u0430\u043d\u0438\u0435 \u0432 \u044d\u0442\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043e\u043f\u0430\u0441\u043d\u043e \u0434\u043b\u044f \u043c\u043e\u0437\u0433\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0438\u0436\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0436\u0435 \u0432\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442.<\/p>\n<p>  \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043a\u043b\u044e\u0447-\u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 6\u0442\u0438 32-\u0431\u0438\u0442\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041f\u0435\u0440\u0432\u044b\u0435 \u0447\u0435\u0442\u044b\u0440\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0430 \u0434\u0432\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u2014 \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0444\u0430\u0439\u043b\u0430. \u042d\u0442\u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>ul_key<\/code>. \u0415\u0433\u043e \u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 JSON-\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 <code>ul_KeyNonce<\/code>. <\/p>\n<p>  \u0421\u0430\u043c\u043e \u0437\u0430(\u0440\u0430\u0441)\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Web Worker (\u0435\u0441\u043b\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u044d\u0442\u0443 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e) \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u041a\u043e\u0433\u0434\u0430 \u0444\u0430\u0439\u043b \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0433\u043e\u0442\u043e\u0432 \u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435, \u0434\u043b\u044f \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0435\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 (\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u043e\u0434 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430) \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u044e\u0447 <code>filekey<\/code>, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 <code>ul_key<\/code> \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u0435 \u0444\u0430\u0439\u043b\u0430. \u042d\u0442\u043e\u0442 \u043a\u043b\u044e\u0447 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u0430. \u0417\u0430 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>initupload3<\/code> \u0438 <code>api_completeupload2<\/code>. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0430 <code>filekey<\/code> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>ul_chunkcomplete<\/code>, \u043d\u0438\u0436\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0435\u0435 \u0447\u0430\u0441\u0442\u044c. <\/p>\n<pre><code class=\"javascript\">\/\/ \u043d\u0430\u0447\u0430\u043b\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u0430: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0435\u0433\u043e \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f function initupload3() { \t\/\/ ... \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u043e =)  \t\/\/ \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0444\u0430\u0439\u043b\u0430 \t\/\/ ul_key \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u0434\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \t\/\/ ul_keyNonce \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u0442\u0441\u044f \u0432 Web Worker \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0430\u043c  \t\/\/ \u0434\u043b\u044f \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b \tul_key = Array(6); \tfor (i = 6; i--;) ul_key[i] = rand(0x100000000); \tul_keyNonce = JSON.stringify(ul_key); \tul_macs = [];  \t\/\/ ... \u0434\u0430\u043b\u044c\u0448\u0435 \u0438\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u043e\u043d\u0430 \u043d\u0435 \u043d\u0435\u0441\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 ...  \t\/\/ \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f sjcl-aes \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 ul_key \tul_aes = new sjcl.cipher.aes([ul_key[0], ul_key[1], ul_key[2], ul_key[3]]);  \t\/\/ ...  \t\/\/ \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u0430:  \t\/\/ \u0447\u0442\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u0441 \u0434\u0438\u0441\u043a\u0430, \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \tonUploadStart(ul_queue_num); \tul_dispatch_chain(); }  \/\/ \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0430 \u0434\u043b\u044f \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0444\u0430\u0439\u043b\u0430 function ul_chunkcomplete(slot,pos,response) { \t\/\/ ... \tvar t = []; \t\/\/ ul_macs - \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u043e\u0439 \u0444\u0430\u0439\u043b\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 worker'\u0430 \tfor (p in ul_macs) t.push(p); \t\/\/ \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e \u0437\u043d\u0430\u0435\u0442 \u0437\u0430\u0447\u0435\u043c \u044d\u0442\u043e - \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u0435 \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \tt.sort(function(a,b) { return parseInt(a)-parseInt(b) }); \tfor (var i = 0; i &lt; t.length; i++)  \t\tt[i] = ul_macs[t[i]]; \t\/\/ \u0432\u043d\u0443\u0442\u0440\u0438 condenseMacs \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435  \t\/\/ \u0438 &quot;\u0443\u043f\u043b\u043e\u0442\u043d\u0435\u043d\u0438\u0435&quot; \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b \u0444\u0430\u0439\u043b\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 4\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \tvar mac = condenseMacs(t,ul_key); \tul_settimeout(-1); \t\/\/ \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b \u0438 \u043a\u043b\u044e\u0447\u0430 \u0444\u0430\u0439\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447 \u0434\u043b\u044f \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \t\/\/ \u043e\u043d \u0436\u0435 \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u043f\u043e\u0437\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \tvar filekey = [ul_key[0]^ul_key[4],ul_key[1]^ul_key[5],ul_key[2]^mac[0]^mac[1],ul_key[3]^mac[2]^mac[3],ul_key[4],ul_key[5],mac[0]^mac[1],mac[2]^mac[3]]; \t\/\/ ... }  \/\/ \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u0430: \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0438 \u043a\u043b\u044e\u0447\u0430 \u0444\u0430\u0439\u043b\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0438\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 function api_completeupload2(ctx, ut) { \tvar p; \tif (ctx.path && ctx.path != ctx.n && (p = ctx.path.indexOf('\/')) &gt; 0) { \t\tvar pc = ctx.path.substr(0, p); \t\tctx.path = ctx.path.substr(p + 1); \t\tfm_requestfolderid(ut, pc, ctx); \t} else { \t\t\/\/ \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 \u0444\u0430\u0439\u043b\u0430 \u043d\u0430 \u043a\u043b\u044e\u0447\u0435, \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0438\u0437 ul_key \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b \t\t\/\/ ctx.k == filekey \t\ta = { n: ctx.n }; \t\tif (d) console.log(ctx.k); \t\tvar ea = enc_attr(a, ctx.k); \t\tif (d) console.log(ea); \t\t\/\/ \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0435 \u043a\u043b\u044e\u0447\u0430 \u0444\u0430\u0439\u043b\u0430 \t\tvar req = { \t\t\ta: 'p', \t\t\tt: ut, \t\t\tn: [{ \t\t\t\th: ctx.t, \t\t\t\tt: 0, \t\t\t\ta: ab_to_base64(ea[0]), \/\/ \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \t\t\t\tk: a32_to_base64(encrypt_key(u_k_aes, ctx.k)), \/\/ == AES_encrypt(u_k, filekey) \t\t\t\tfa: ctx.fa \t\t\t}] \t\t};  \t\tif (ut) { \t\t\t\/\/ a target has been supplied: encrypt to all relevant shares \t\t\tvar sn = fm_getsharenodes(ut); \t\t\tif (sn.length) { \t\t\t\treq.cr = crypto_makecr([ctx.k], sn, false); \t\t\t\treq.cr[1][0] = ctx.t; \t\t\t} \t\t} \t\tapi_req([req], ctx.ctx); \t} } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432<\/h2>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u043c\u0438 \u043a \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0444\u0430\u0439\u043b\u0430. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043d\u0435\u0441\u0442\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430 <code>ul_key<\/code> \u0438\u0437 \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>filekey<\/code>. <\/p>\n<p>  \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0443\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0444\u0430\u0439\u043b\u043e\u0432. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0444\u0430\u0439\u043b-\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441, \u0435\u043c\u0443 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0432\u043e\u0438\u043c \u0444\u0430\u0439\u043b\u0430\u043c (\u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u0443 \u043d\u0435\u0433\u043e \u0443\u0436\u0435 \u0442\u0430\u043c \u0431\u044b\u043b\u0438). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043b\u044e\u0447\u0438 \u0444\u0430\u0439\u043b\u043e\u0432, \u0430 \u0437\u0430\u0442\u0435\u043c \u2014 \u0438\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b. \u042d\u0442\u0438\u043c \u0434\u0435\u043b\u043e\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0430\u044f \u043f\u0430\u0447\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 <code>loadfm_callback<\/code> \u0438 <code>process_f_f<\/code>. <\/p>\n<p>  \u0412\u043a\u0440\u0430\u0442\u0446\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c:<\/p>\n<ol>\n<li>\u0414\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b-\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 (<code>loadfm_callback<\/code>), \u0433\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c JSON \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0445 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 <code>farray<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0444\u0430\u0439\u043b\u0430\u0445<\/li>\n<li>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c (\u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e) \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>process_f_f<\/code><\/li>\n<li>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043a\u043b\u044e\u0447, \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043b\u044e\u0447 \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b (\u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>crypto_processkey<\/code>) \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0445 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0444\u0430\u0439\u043b\u0430\u0445<\/li>\n<li>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>FileStore<\/code> (\u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0438 \u0432 <code>process_f_f<\/code>)<\/li>\n<\/ol>\n<p>  \u041d\u0438\u0436\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0432\u044b\u0434\u0435\u0440\u0436\u043a\u0438 \u0438\u0437 \u043a\u043e\u0434\u0430, \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c <\/p>\n<pre><code class=\"javascript\">\/\/ callback \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b-\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 function loadfm_callback(json, res) { \t\/\/ ...  \t\/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 JSON \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0444\u0430\u0439\u043b\u0430\u0445 \tjson = json[0]; \tif (d) console.log(json); \tif (d) console.log(json); \tif (json.u) process_u(json.u, false); \tif (json.ok) process_ok(json.ok);  \tif (json.s) { \t\tfor (i in json.s) { \t\t\tif (u_sharekeys[json.s[i].h]) { \t\t\t\tsharingData.push({ \t\t\t\t\tid: json.s[i].h + '_' + json.s[i].u, \t\t\t\t\tuserid: json.s[i].u, \t\t\t\t\tfolderid: json.s[i].h, \t\t\t\t\trights: json.s[i].r, \t\t\t\t\tdate: json.s[i].ts \t\t\t\t}); \t\t\t\tsharednodes[json.s[i].h] = true; \t\t\t} \t\t} \t} \t\/\/ ... \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u043e\u0433\u043e...  \t\/\/ \u0437\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0444\u0430\u0439\u043b\u0430\u0445 \u0432 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \tfarray[fi] = new Object; \tfarray[fi].f = json.f; \t\/\/ \u0437\u0430\u043f\u0443\u0441\u043a \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, callback \u0431\u044b\u043b \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u0432\u044b\u0448\u0435  \t\/\/ \u0432 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 \u0432\u0435\u0440\u0441\u0442\u043a\u0443 \tprocess_f(fi, false, callback); \tfi++; }  \/\/ \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0444\u0430\u0439\u043b\u043e\u0432 \/\/ \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 process_f function process_f_f(fid) { \t\/\/ \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0438 - \u043c\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 farray \tif (!farray[fid].f[farray[fid].i]) { \t\tif (farray[fid].ap) FileStore.suspendEvents(); \t\t\/\/ \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 FileStore \t\tFileStore.loadData(farray[fid].mdata, true); \t\tif (farray[fid].ap) FileStore.resumeEvents(); \t\tif (d) console.log('call reqmissingkeys:'); \t\tcrypto_reqmissingkeys(); \t\tif (farray[fid].callback) farray[fid].callback.fn(farray[fid].callback); \t\treturn false; \t} \tvar f = farray[fid].f[farray[fid].i]; \tf.attrs = f.a; \tif (f.sk) u_sharekeys[f.h] = crypto_process_sharekey(f.h, f.sk); \t\/\/ \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0442\u0438\u043f\u0443 \u0438 \u0438\u043c\u0435\u0435\u0442 \u043a\u043b\u044e\u0447, \u0442\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0435\u0433\u043e \tif ((f.t !== 2) && (f.t !== 3) && (f.t !== 4) && (f.k)) { \t\tcrypto_processkey(u_handle, u_k_aes, f); \/\/ \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0438\u0436\u0435 \t\tu_nodekeys[f.h] = f.key;  \t\tif ((typeof f.name !== 'undefined') && (f.p == InboxID)) InboxCount++; \t} else { \t\tif (f.a) { \t\t\tif (!missingkeys[f.h]) { \t\t\t\tmissingkeys[f.h] = true; \t\t\t\tnewmissingkeys = true; \t\t\t} \t\t} \t\tf.k = ''; \t\tf.name = ''; \t}  \tif (f.t == 2) RootID = f.h; \telse if (f.t == 3) InboxID = f.h; \telse if (f.t == 4) TrashbinID = f.h; \telse if ((f.t &lt; 2) || (f.t == 5)) { \t\t\/\/ \u0442\u0443\u0442 \u0438\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0430\u0441\u0448\u0430\u0440\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \t} else { \t\t\/\/ \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 FileStore \t\tfarray[fid].mdata.push({ \t\t\tid: f.h.replace(\/[^a-z^A-Z^0-9^_^-]\/g, &quot;&quot;), \t\t\tname: f.name, \t\t\tsize: f.s, \t\t\ttype: filetype(f.name, f.t), \t\t\ticon: fileicon(f.name, icontype), \t\t\tparentid: f.p, \t\t\tfolder: f.t, \t\t\towner: f.u, \t\t\tdate: f.ts, \t\t\tattrs: f.attrs, \t\t\tkey: f.key, \t\t\tr: f.r, \t\t\tsu: f.su, \t\t\tfa: f.fa, \t\t});  \t\tif (f.p == TrashbinID) trashbinfull = true; \t\tif (((f.t) && (farray[fid].ap)) || (f.p == InboxID)) refreshtree = true; \t}  \tfarray[fid].i++; \t\/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430 (\u0432\u0438\u0434\u0438\u043c\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b-\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043e\u043b\u0433\u043e\u0439)\t\t \ttimeoutcount++; \tif (!(timeoutcount & 63)) { \t\t\/\/ \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0431\u043e\u043b\u044c\u0448\u0435 63 \u0444\u0430\u0439\u043b\u043e\u0432 - \u0434\u0430\u043b\u044c\u0448\u0435 \u0433\u0440\u0443\u0437\u0438\u043c \u0438\u0445 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \t\tsetTimeout(&quot;process_f_f(&quot; + fid + &quot;)&quot;, 1); \t\ttimeoutcount2++; \t} \t\/\/ \u0438\u043d\u0430\u0447\u0435 - \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \telse process_f_f(fid); }  \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043a\u043b\u044e\u0447\u0430 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0435\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 function crypto_processkey(me, master_aes, file) { \tvar id, key, k, n; \tif (!file.k) { \t\tif (!keycache[file.h]) return; \t\tfile.k = keycache[file.h]; \t}  \tid = me; \t\/\/ do I own the file? (user key is guaranteed to be first in .k) \t\/\/ \u043a\u043b\u044e\u0447 \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u0432 \u0432\u0438\u0434\u0435 &quot;&lt;file handle&gt;:&lt;key&gt;\/&lt;share key&gt;&quot; \tvar p = file.k.indexOf(id + ':'); \t\/\/ \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0444\u0430\u0439\u043b \u043e\u0431\u0449\u0438\u043c \tif (p) { \t\t\/\/ I don't - do I have a suitable sharekey? \t\tfor (id in u_sharekeys) { \t\t\tp = file.k.indexOf(id + ':'); \t\t\tif (p &gt;= 0 && (!p || file.k.charAt(p - 1) == '\/')) break; \t\t\tp = -1; \t\t} \t} \t\/\/ \u0430 \u0437\u0430\u0442\u0435\u043c \u0443\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044e \tif (p &gt;= 0) { \t\tdelete keycache[file.h]; \t\t\/\/ \u0441\u043b\u0435\u0448 - \u0432\u0438\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0448\u0430\u0440\u044b \t\tvar pp = file.k.indexOf('\/', p); \t\tif (pp &lt; 0) pp = file.k.length; \t\tp += id.length + 1; \t\tkey = file.k.substr(p, pp - p); \t\t\/\/ we have found a suitable key: decrypt! \t\tif (key.length &lt; 46) { \t\t\t\/\/ short keys: AES \t\t\tk = base64_to_a32(key); \t\t\t\/\/ check for permitted key lengths (4 == folder, 8 == file) \t\t\tif (k.length == 4 || k.length == 8) { \t\t\t\t\/\/ \u043a\u043b\u044e\u0447 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u043d\u0430 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0435, \u043b\u0438\u0431\u043e \u043d\u0430 \u043e\u0431\u0449\u0435\u043c \u043a\u043b\u044e\u0447\u0435 \u0448\u0430\u0440\u044b\t\t\t\t \t\t\t\tk = decrypt_key(id == me ? master_aes : new sjcl.cipher.aes(u_sharekeys[id]), k); \t\t\t} else { \t\t\t\tif (d) console.log(&quot;Received invalid key length (&quot; + k.length + &quot;): &quot; + file.h); \t\t\t\treturn; \t\t\t} \t\t} else { \t\t\t\/\/ long keys: RSA \t\t\tif (u_privk) { \t\t\t\tvar t = mpi2b(base64urldecode(key)); \t\t\t\tif (t) k = str_to_a32(crypto_rsadecrypt(t, u_privk).substr(0, file.t ? 16 : 32)); \t\t\t\telse { \t\t\t\t\tif (d) console.log(&quot;Corrupt key for node &quot; + file.h); \t\t\t\t\treturn; \t\t\t\t} \t\t\t} else { \t\t\t\tif (d) console.log(&quot;Received RSA key, but have no public key published: &quot; + file.h); \t\t\t\treturn; \t\t\t} \t\t} \t\t\/\/ \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0444\u0430\u0439\u043b\u0430 \t\tvar ab = base64_to_ab(file.a); \t\t\/\/ \u0438 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \t\tvar o = dec_attr(ab, k); \t\tif (typeof o == 'object') { \t\t\tif (typeof o.n == 'string') { \t\t\t\tif (file.h) { \t\t\t\t\tu_nodekeys[file.h] = k; \t\t\t\t\tif (key.length &gt;= 46) rsa2aes[file.h] = a32_to_str(encrypt_key(u_k_aes, k)); \t\t\t\t} \t\t\t\t\/\/ \u0435\u0441\u043b\u0438 \u043c\u044b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043b\u0438 \u043a\u043b\u044e\u0447 \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b - \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438\u0445 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u0444\u0430\u0439\u043b\u0430 \t\t\t\tfile.key = k; \t\t\t\tfile.name = o.n; \t\t\t} \t\t} \t} else { \t\tif (d) console.log(&quot;Received no suitable key: &quot; + file.h); \t\tif (!missingkeys[file.h]) { \t\t\tnewmissingkeys = true; \t\t\tmissingkeys[file.h] = true; \t\t} \t\tkeycache[file.h] = file.k; \t} } <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 <code>ul_key<\/code> \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"javascript\">dl_keyNonce = JSON.stringify([dl_key[0]^dl_key[4],dl_key[1]^dl_key[5],dl_key[2]^dl_key[6],dl_key[3]^dl_key[7],dl_key[4],dl_key[5]]); <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>startdownload<\/code>. \u0415\u0441\u043b\u0438 \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>dl_key == filekey<\/code> \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>ul_chunkcomplete<\/code> \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e, \u0442\u043e \u043c\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>dl_keyNonce<\/code> \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>ul_key<\/code>, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0444\u0430\u0439\u043b\u0430. \u0418\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u043b\u0435\u0432\u043e\u043c \u0443\u0433\u043b\u0443 \u0434\u043e\u0441\u043a\u0438 \u043d\u0430 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u043f\u0440\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<h1>\u00ab\u041f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0430\u00bb \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439<\/h1>\n<p>\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0437\u0430\u0449\u0438\u0442\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043a\u043b\u044e\u0447\u0435\u0439 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u043c\u0438, \u043a\u043e\u043c\u0443-\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0435\u0440\u0432\u0438\u0441. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044f \u0432 \u043d\u0438\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e, \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0449\u0438\u0442\u0443 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 (\u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430 \u0438 \u043a\u043b\u044e\u0447\u0435\u0439 \u0444\u0430\u0439\u043b\u043e\u0432) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u043d\u0435\u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c\u043e\u043c \u043a\u043b\u044e\u0447\u0435 \u043f\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0413\u041e\u0421\u0422 28147-89. \u0411\u043e\u043d\u0443\u0441\u043e\u043c \u043a \u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u0434\u0432\u0443\u0445\u0444\u0430\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.<br \/>  \u0418\u0442\u0430\u043a, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0430\u043a\u043e\u0439 use-case:   <\/p>\n<ul>\n<li>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0435<\/li>\n<li>\u0417\u0430\u0442\u0435\u043c \u043e\u043d \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435<\/li>\n<li>\u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430 \u043d\u0430 \u043d\u0435\u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c\u043e\u043c \u0441 \u0442\u043e\u043a\u0435\u043d\u0430 \u043a\u043b\u044e\u0447\u0435 <\/li>\n<li>\u0417\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430 \u043d\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u043c \u0438 \u0435\u0433\u043e PIN-\u043a\u043e\u0434\u043e\u043c. \u042d\u0442\u043e \u0434\u0430\u0441\u0442:<\/p>\n<ol>\n<li>\u0414\u0432\u0443\u0445\u0444\u0430\u043a\u0442\u043e\u0440\u043d\u0443\u044e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 (\u0431\u0435\u0437 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430 \u00ab\u0437\u0430\u0432\u0430\u043b\u0438\u0442\u0441\u044f\u00bb \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>api_getsid2<\/code>)<\/li>\n<li>\u0411\u0435\u0437 \u0442\u043e\u043a\u0435\u043d\u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438<\/li>\n<\/ol>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u043a\u0435\u043d\u0430 \u043a\u043b\u044e\u0447\u0430 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 (\u043e\u043d \u0436\u0435 <code>ul_key<\/code>) \u0438 \u043a\u043b\u044e\u0447\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0444\u0430\u0439\u043b\u0430 (<code>filekey<\/code>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0430\u043a \u0440\u0430\u0437 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d \u043d\u0430 \u043a\u043b\u044e\u0447\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u0443\u0434\u0430 \u0443\u0439\u0434\u0435\u0442 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 <code>filekey<\/code> \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>api_completeupload2<\/code>. \u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 <code>filekey<\/code>. \u0414\u043b\u044f \u043f\u0443\u0449\u0435\u0439 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u044f \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0445\u0435\u043c\u0443, \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0449\u0443\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u0430: <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/88a\/be7\/c58\/88abe7c587345dce1aad062c96108e5d.png\"\/> <\/p>\n<p>  \u0425\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b \u0432\u0435\u0441\u044c\u043c\u0430 \u0445\u0438\u0442\u0440\u044b\u0439 \u043c\u0435\u0442\u043e\u0434. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043c \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u043d\u0435 \u043c\u043e\u0433 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442 \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u0439 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043a\u043b\u044e\u0447 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0442\u044c \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u044b\u0433\u0440\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0437\u0430(\u0440\u0430\u0441)\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0430 ul_keyNonce (\u043e\u043d\u043e \u0436\u0435 dl_keyNonce), \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0442\u043e\u043a\u0435\u043d\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430 ul_key (\u0438\u043b\u0438 dl_key). <\/p>\n<h2>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438<\/h2>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f USB-\u0442\u043e\u043a\u0435\u043d \u0420\u0443\u0442\u043e\u043a\u0435\u043d \u042d\u0426\u041f (\u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0420\u0443\u0442\u043e\u043a\u0435\u043d Web) \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u043c \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u00ab\u0420\u0443\u0442\u043e\u043a\u0435\u043d Web PKI Edition\u00bb. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043c\u044b \u0443\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u0438 \u0432 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 <a href=\"http:\/\/habrahabr.ru\/company\/aktiv-company\/blog\/155835\/\">\u0420\u0443\u0442\u043e\u043a\u0435\u043d WEB PKI Edition<\/a> \u0438 <a href=\"http:\/\/habrahabr.ru\/company\/aktiv-company\/blog\/165887\/\">\u0429\u0438\u0442 \u0438 \u043c\u0435\u0447 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0414\u0411\u041e. \u041f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/a>. <\/p>\n<p>  \u0421 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u0432 \u043d\u0430\u0448 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0413\u041e\u0421\u0422 28147-89. Beta-\u0432\u0435\u0440\u0441\u0438\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0413\u041e\u0421\u0422 28147-89 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c <a href=\"https:\/\/mega-crypto.googlecode.com\/files\/CryptoPlugin.zip\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u042d\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0435\u0449\u0435 \u043d\u0435 \u043f\u0440\u043e\u0448\u043b\u0430 \u043f\u043e\u043b\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u044e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u043d\u0435\u0439 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438, \u043e \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0448\u0443 \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u0432 \u043b\u0438\u0447\u043a\u0443. <br \/>  \u0412 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0435 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <code>encrypt<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441:  <\/p>\n<pre><code class=\"javascript\">encrypt(deviceId, keyLabel, data, resultCallback, errorCallback) \u2192 {string} <\/code><\/pre>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442:<\/p>\n<ul>\n<li>\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, <code>number<\/code><\/li>\n<li>\u041c\u0435\u0442\u043a\u0443 \u043a\u043b\u044e\u0447\u0430 \u0434\u043b\u044f \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f, <code>number<\/code> (\u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u043d\u0435\u0442, \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d)<\/li>\n<li>\u0417\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, <code>string<\/code> (\u0441\u0442\u0440\u043e\u043a\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0430\u044f \u0432 \u0441\u0435\u0431\u0435 \u0431\u0430\u0439\u0442-\u043c\u0430\u0441\u0441\u0438\u0432 \u0432\u0438\u0434\u0430 <code>&quot;aa:bb:cc:dd&quot;<\/code>)<\/li>\n<li>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0434\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0438 \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n<\/ul>\n<p>  \u0420\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>decrypt<\/code><br \/>  \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0441\u0442\u043e\u0438\u0442 \u0443\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0442\u043a\u0435 \u043a\u043b\u044e\u0447\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u043a\u043b\u044e\u0447\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430(\u0440\u0430\u0441)\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u0435\u0442\u043a\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043b\u044e\u0447\u0430. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0434\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043f\u0430\u0440\u044b: \u043e\u0434\u043d\u0443 \u0434\u043b\u044f \u0437\u0430(\u0440\u0430\u0441)\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430, \u0432\u0442\u043e\u0440\u0443\u044e \u2014 \u0434\u043b\u044f \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0444\u0430\u0439\u043b\u043e\u0432. \u041a\u043b\u044e\u0447, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447 \u0438\u043c\u0435\u0435\u0442 \u043c\u0435\u0442\u043a\u0443, \u0440\u0430\u0432\u043d\u0443\u044e \u043f\u0430\u0440\u043e\u043b\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u0438\u0434\u0435\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0445\u0435\u0448 \u043e\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 <code>e-mail||\u043f\u0430\u0440\u043e\u043b\u044c<\/code>, \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044e). \u0414\u043b\u044f \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447 \u0441 \u043c\u0435\u0442\u043a\u043e\u0439, \u0440\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430 (\u0437\u0434\u0435\u0441\u044c \u0442\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0445\u0435\u0448 \u043e\u0442 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430). <\/p>\n<h2>\u041d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/h2>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0445\u043e\u0447\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u043c\u043e\u0435\u0433\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430: \u043e\u043d, \u043f\u043e \u0441\u0443\u0442\u0438, \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0430\u043b\u044c\u0444\u0430-\u0432\u0435\u0440\u0441\u0438\u0438, \u0445\u043e\u0442\u044f \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u042f \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u044f \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0439 \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u044f <a href=\"https:\/\/github.com\/romanovskiy-k\/mega-crypto\">\u0432\u044b\u043b\u043e\u0436\u0438\u043b \u043d\u0430 github<\/a> \u0438 \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u043b\u044e\u0431\u043e\u0439 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0437\u0430\u0441\u043e\u0440\u044f\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u0434\u0430\u043b\u044c\u0448\u0435 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u043c\u0438 \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0430\u043c\u0438, \u0430 \u043b\u0438\u0448\u044c \u043e\u043f\u0438\u0448\u0443 \u043e\u0431\u0449\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f. <\/p>\n<p>  \u0413\u043e\u0442\u043e\u0432\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c <a href=\"http:\/\/crossrider.com\/download\/30754\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e \u043e\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 <a href=\"http:\/\/crossrider.com\/\">Crossrider<\/a>, \u0447\u0442\u043e \u0434\u0430\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0442\u0440\u0435\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432 (Chrome, Firefox \u0438 IE), \u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u043b\u0443\u0447\u0448\u0435 \u0432 Chrome \u0438\u043b\u0438 Firefox, \u043f\u0440\u0438\u0447\u0435\u043c \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043e\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0435\u0435. <\/p>\n<p>  \u041a\u043e\u0434 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043e \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442: \u043e\u043d \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u043d\u0430\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043b\u0438 \u043c\u044b \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0442\u0430\u043a, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b. \u042d\u0442\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0442 \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043f\u0430\u0440\u0443 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432, \u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430:<\/p>\n<ul>\n<li><code>changepw<\/code>: \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u043c\u0435\u043d\u0443 \u043f\u0430\u0440\u043e\u043b\u044f<\/li>\n<li><code>api_getsid2<\/code>: \u043e\u0434\u0438\u043d \u0438\u0437 callback&#8217;\u043e\u0432 \u043b\u043e\u0433\u0438\u043d\u0430<\/li>\n<li><code>api_completeupload2<\/code>: callback \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u0430<\/li>\n<li><code>loadfm_callback<\/code>: callback \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b-\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430<\/li>\n<li><code>processpacket<\/code>: \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 callback, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430<\/li>\n<li><code>parsepage<\/code>: \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432<\/li>\n<li><code>dologin<\/code>: \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/li>\n<li><code>initupload3<\/code>: \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0430 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430<\/li>\n<li><code>startdownload<\/code>: \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u043a\u043b\u044e\u0447\u0430 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f<\/li>\n<\/ul>\n<p>\u0415\u0449\u0435 \u0440\u0430\u0437 \u0445\u043e\u0447\u0443 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0442\u0430\u0449\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043d\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 (\u0435\u0441\u043b\u0438 \u0442\u0443\u0442 \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u044d\u0442\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c), \u0430 \u043b\u0443\u0447\u0448\u0435 \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0443\u0436\u043d\u043e:<\/p>\n<ol>\n<li>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0440\u0430\u0437\u0434\u043e\u0431\u044b\u0442\u044c \u0420\u0443\u0442\u043e\u043a\u0435\u043d \u042d\u0426\u041f (\u0438\u043b\u0438 \u0420\u0443\u0442\u043e\u043a\u0435\u043d Web) \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c <a href=\"https:\/\/mega-crypto.googlecode.com\/files\/CryptoPlugin.zip\">\u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430<\/a><\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435<\/li>\n<li>\u0417\u0430\u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441 \u0441 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c<\/li>\n<li>\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/li>\n<li>\u0417\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438<\/li>\n<li>\u041d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u041f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u00bb<\/li>\n<li>\u0412\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e<\/li>\n<\/ol>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0431\u0443\u043a\u043c\u0430\u0440\u043a\u043b\u0435\u0442\u043e\u043c (\u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u0432 Chrome, Safari, Firefox):<\/p>\n<pre><code class=\"javascript\">javascript:(function(){if(document.getElementById('cryptorutokenjs')){alert('\u041f\u043b\u0430\u0433\u0438\u043d \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d');return}function loadRemoteScript(url){var script=document.createElement('script');script.type=&quot;text\/javascript&quot;;script.src=url;document.head.appendChild(script)}function loadRemoteStyle(url){var style=document.createElement('link');style.rel='stylesheet';style.type=&quot;text\/css&quot;;style.href=url;document.head.appendChild(style)}loadRemoteStyle(&quot;https:\/\/mega-crypto.googlecode.com\/git\/mega.css&quot;);loadRemoteScript(&quot;https:\/\/mega-crypto.googlecode.com\/git\/util.js&quot;);loadRemoteScript(&quot;https:\/\/mega-crypto.googlecode.com\/git\/rutoken-extra.js&quot;);loadRemoteScript(&quot;https:\/\/mega-crypto.googlecode.com\/git\/rutoken-crypto.js&quot;);loadRemoteScript(&quot;https:\/\/mega-crypto.googlecode.com\/git\/mega.js&quot;)})(); <\/code><\/pre>\n<p>  <\/p>\n<h1>\u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b<\/h1>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u043d\u0430\u0448\u0435 \u0442\u0432\u043e\u0440\u0435\u043d\u0438\u0435 \u043a \u0441\u0430\u0439\u0442\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e:<\/p>\n<ol>\n<li>\n<h3>\u041b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441 \u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0444\u0430\u0439\u043b-\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 <\/h3>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/ae9\/c26\/a83\/ae9c26a83f0cf6ca6907861d6ef743ca.png\"\/>  <\/li>\n<li>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0431\u0443\u043a\u043c\u0430\u0440\u043a\u043b\u0435\u0442, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 PIN-\u043a\u043e\u0434 \u0442\u043e\u043a\u0435\u043d\u0430<\/h3>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/e3f\/034\/786\/e3f034786ec79053b2241fb8ab7dd84d.png\"\/>  <\/li>\n<li>\n<h3>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u0442\u043e\u043a\u0435\u043d\u0430 \u043a \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0443<\/h3>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/f38\/67b\/21e\/f3867b21e812f1cd1b3e385a9cde7275.png\"\/>  <\/li>\n<\/ol>\n<p>  \u0417\u0430\u0442\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u043d\u043e\u0432\u0430 \u0437\u0430\u0439\u0442\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u0432\u0443\u0445\u0444\u0430\u043a\u0442\u043e\u0440\u043d\u0443\u044e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e:<\/p>\n<ol>\n<li>\n<h3>\u0412\u0432\u043e\u0434\u0438\u043c \u043b\u043e\u0433\u0438\u043d-\u043f\u0430\u0440\u043e\u043b\u044c<\/h3>\n<\/li>\n<li>\n<h3>\u0412\u0432\u043e\u0434\u0438\u043c PIN-\u043a\u043e\u0434<\/h3>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/264\/113\/e2c\/264113e2cee26dcb6bdc4297874ab85a.png\"\/>  <\/li>\n<li>\n<h3>&#8230;<\/h3>\n<\/li>\n<li>\n<h3>profit!<\/h3>\n<\/li>\n<\/ol>\n<p>  \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0445\u0435\u043c\u0435:<\/p>\n<ol>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0430\u0440\u044b \u043b\u043e\u0433\u0438\u043d-\u043f\u0430\u0440\u043e\u043b\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/li>\n<li>\u0415\u0441\u043b\u0438 \u043b\u043e\u0433\u0438\u043d-\u043f\u0430\u0440\u043e\u043b\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435, \u0442\u043e \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447<\/li>\n<li>\u041f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 PIN-\u043a\u043e\u0434\u0430 \u043a \u0442\u043e\u043a\u0435\u043d\u0443<\/li>\n<li>\u0415\u0441\u043b\u0438 PIN \u0432\u0432\u0435\u0434\u0435\u043d \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447\u0430 \u043d\u0430 \u043a\u043b\u044e\u0447\u0435 \u0441 \u0442\u043e\u043a\u0435\u043d\u0430<\/li>\n<\/ol>\n<p>  <\/p>\n<h1>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h1>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u043d\u0435 \u0442\u0430\u043a \u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u00ab\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442&#8230;\u00bb, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u043d\u0435 \u043e\u0441\u0432\u0435\u0442\u0438\u043b \u0434\u0435\u0442\u0430\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0441\u0435\u0440\u0432\u0438\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b. \u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0435\u0449\u0435 \u0440\u0430\u0437 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0438\u0434\u0435\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 client-side \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438.<br \/>  \u041f\u043e\u0434\u0445\u043e\u0434 \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u0443, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0443 \u0441\u0435\u0431\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435: \u0431\u0443\u0434\u044c \u0442\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u043f\u043e\u0447\u0442\u0430 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0447\u0430\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u0443\u044e \u043f\u043e\u0447\u0442\u0443 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 CMS \u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 \u043e\u0431\u043c\u0435\u043d\u0430 \u043a\u043b\u044e\u0447\u0430\u043c\u0438 \u043f\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 VKO GOST R 34.10-2001. <br \/>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0436\u0434\u0443 \u0432\u0430\u0448\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432.<\/p>\n<p>  PS: \u043f\u0435\u0440\u0432\u044b\u043c \u043f\u044f\u0442\u0438 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u043c \u043f\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0434\u0430\u0440\u0438\u0442\u044c \u043f\u043e \u0442\u043e\u043a\u0435\u043d\u0443 \u2014 \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043b\u0438\u0447\u043a\u0443.    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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\/company\/aktiv-company\/blog\/176513\/\"> http:\/\/habrahabr.ru\/company\/aktiv-company\/blog\/176513\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" align=\"left\" src=\"http:\/\/habrastorage.org\/storage2\/f5b\/2db\/72c\/f5b2db72c9de0dd1cc3718061439ef93.jpg\"\/>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u0435\u0440\u0435 \u0441\u043a\u0430\u043d\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 MEGA \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u044b \u043e \u0435\u0433\u043e \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0431\u0443\u0440\u043b\u0438\u043b\u0438 \u0438 \u0437\u0430\u0442\u0438\u0445\u043b\u0438. \u041d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u0441\u0435\u0440\u0432\u0438\u0441 \u0436\u0438\u0432\u0435\u0442 \u0441\u0432\u043e\u0435\u0439 \u0436\u0438\u0437\u043d\u044c\u044e \u0438 \u0435\u0433\u043e \u043d\u0438\u043a\u0442\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u043e\u043b\u043e\u043c\u0430\u043b. \u0418\u0437 \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043e\u0432 \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0431\u044b\u043b \u0443\u043f\u0443\u0449\u0435\u043d \u0442\u0435\u0440\u043c\u0438\u043d \u00abUser Controlled Encryption\u00bb (UCE, \u0438\u043b\u0438 \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f), \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043a\u0438\u0447\u0438\u0442\u0441\u044f MEGA. \u041f\u043e\u0434 \u0441\u043b\u043e\u0432\u043e\u043c \u00ab\u0443\u043f\u0443\u0449\u0435\u043d\u00bb \u044f \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0432\u0438\u0436\u043e\u043a, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0439\u0441\u044f \u0432 JavaScript \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. <\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0430\u043c \u0441\u0435\u0440\u0432\u0438\u0441 MEGA \u043f\u043e\u0434 \u044d\u0442\u0438\u043c \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0442\u043e, \u0447\u0442\u043e \u043a\u043b\u044e\u0447\u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0430 \u0432\u0441\u044f <u>\u0438\u0445<\/u> \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0431\u044b\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043e\u0432 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u043d\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0435\u0441\u0442\u043e\u0439\u043a\u0438\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b <strike>\u0438 \u0447\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0435 \u043f\u043b\u043e\u0445\u043e \u0438 \u043c\u044b \u0432\u0441\u0435 \u0443\u043c\u0440\u0435\u043c, \u0430 \u043d\u0430\u0448\u0438 \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442 \u0424\u0421\u0411<\/strike>. \u042d\u0442\u043e \u043f\u043e\u0434\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u043e \u043c\u0435\u043d\u044f \u043d\u0430 \u043c\u044b\u0441\u043b\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u00abUCE\u00bb \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e \u043f\u043e\u0434 \u0441\u0432\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u2014 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0440\u0430\u0437\u043b\u043e\u0436\u0443 \u043f\u043e \u043f\u043e\u043b\u043e\u0447\u043a\u0430\u043c \u043c\u0430\u0433\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0434\u0432\u0443\u0445 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442\u0430\u0445 JavaScript-\u043a\u043e\u0434\u0430 MEGA \u0438 \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0442\u044c \u0432\u043e\u043b\u043d\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u043b\u044e\u0431\u0438\u0442\u044c \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044e. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0434\u0432\u0443\u0445\u0444\u0430\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u043c \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\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-176513","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/176513","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=176513"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/176513\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=176513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=176513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=176513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}