{"id":183880,"date":"2020-10-27T08:13:14","date_gmt":"2020-10-27T00:13:14","guid":{"rendered":"http:\/\/4563.org\/?p=183880"},"modified":"2020-10-27T08:13:14","modified_gmt":"2020-10-27T00:13:14","slug":"%e7%bd%91%e6%98%93%e4%ba%91%e9%9f%b3%e4%b9%90%e5%8a%a0%e5%af%86%e7%96%91%e9%97%ae%ef%bc%8c%e4%b8%ba%e4%bb%80%e4%b9%88%e8%a6%81%e7%bb%8f%e8%bf%87%e4%b8%a4%e6%ac%a1-aes-%e5%8a%a0%e5%af%86","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=183880","title":{"rendered":"\u7f51\u6613\u4e91\u97f3\u4e50\u52a0\u5bc6\u7591\u95ee\uff0c\u4e3a\u4ec0\u4e48\u8981\u7ecf\u8fc7\u4e24\u6b21 aes \u52a0\u5bc6"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u7f51\u6613\u4e91\u97f3\u4e50\u52a0\u5bc6\u7591\u95ee\uff0c\u4e3a\u4ec0\u4e48\u8981\u7ecf\u8fc7\u4e24\u6b21 aes \u52a0\u5bc6               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : simonlu9 <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5f88\u4e45\u4e4b\u524d\u5c31\u722c\u8fc7\u7f51\u6613\u4e91\u97f3\u4e50\u7684\u6570\u636e\uff0c\u4f46\u5f53\u65f6\u6ca1\u6709\u8ba4\u771f\u5206\u6790\uff0c\u73b0\u5728\u9879\u76ee api \u8bf7\u6c42\u52a0\u5bc6\u7a81\u7136\u60f3\u53c2\u8003\u7f51\u6613\u4e91\u97f3\u4e50\u7684\u52a0\u5bc6\u7684\u65b9\u5f0f\uff0c\u52a0\u5bc6\u5982\u4e0b<\/p>\n<pre><code>i = self.create16RandomBytes() encText = self.AESEncrypt(input_text, self.nonce) encText = self.AESEncrypt(encText, i) encSecKey = self.RSAEncrypt(i, self.public_key, self.modulus)   \u4e0a\u9762\u7684\u7b97\u6cd5\u4e00\u770b\u5c31\u77e5\u9053\u6a21\u4eff https \u7684\u52a0\u5bc6\u6d41\u7a0b\u7684\uff0c\u4f46\u662f\u6211\u60f3\u4e0d\u660e\u767d\u4e3a\u4ec0\u4e48\u8981\u7ecf\u8fc7\u4e24\u6b21 aes,\u610f\u4e49\u4f55\u5728\uff0c\u6211\u89c9\u5f97\u968f\u673a\u751f\u6210 16 \u4f4d\u7684\u5bc6\u94a5\u901a\u8fc7 aes \u52a0\u5bc6\uff0c\u7136\u540e rsa \u52a0\u5bc6\u5bc6\u94a5\u4f20\u7ed9\u670d\u52a1\u7aef\u5c31\u53ef\u4ee5\u5566\uff0c\u6c42\u89e3\u7b54 <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>10<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3962897\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : iccfish <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7b2c\u4e00\u8f6e\u662f nonce\uff0c\u53ea\u80fd\u7528\u4e00\u6b21\u7684\u670d\u52a1\u7aef\u53c2\u6570\uff0c\u9632\u6b62\u56de\u653e\u653b\u51fb\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3962898\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : simonlu9 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @iccfish \u52a0 nonce \u6211\u4e5f\u660e\u767d\uff0c\u4e3a\u4e86\u6bcf\u6b21\u52a0\u5bc6\u7684\u5bc6\u6587\u90fd\u4e0d\u4e00\u6837\uff0c\u4f46\u662f\u641e\u4e0d\u660e\u767d\u4e3a\u4ec0\u4e48\u8981\u4e24\u6b21                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3962899\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : brazz <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u4f1a\u89e3\u5bc6\u7f51\u6613\u4e91\u7684\u53c2\u6570\u4e48\uff1f\u9006\u5411\u89e3\u5bc6                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3962900\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : simonlu9 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @brazz \u89e3\u5bc6\u80af\u5b9a\u505a\u4e0d\u5230\u7684\uff0c\u79c1\u94a5\u653e\u5728\u670d\u52a1\u5668\u4e0a\uff0c\u53ea\u662f\u6a21\u62df\u8bf7\u6c42\u800c\u5df2                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3962901\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : brazz <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u80fd\u6b63\u5411\u52a0\u5bc6\u7684\u8bdd \u90a3\u4e0d\u5c31\u8bc1\u660e\u6211\u4eec\u5df2\u7ecf\u77e5\u9053\u79c1\u94a5\u4e86\u4e48\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3962902\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : BIAOXYZ <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u662f\u670d\u52a1\u5668\u7aef\u6267\u884c\u540e\u8981\u53d1\u7ed9\u5ba2\u6237\u7aef\u7684\u5417\uff1f\u662f\u4e0d\u662f\u4e00\u6b21 session \u4e2d self.nonce \u53ef\u4ee5\u590d\u7528\u554a\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3962903\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : simonlu9 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @BIAOXYZ \u5ba2\u6237\u7aef\u53d1\u7ed9\u670d\u52a1\u7aef\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3962904\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : simonlu9 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @brazz rsa \u4f60\u53ea\u77e5\u9053\u516c\u94a5\uff0c\u79c1\u94a5\u4f60\u4e0d\u77e5\u9053\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3962905\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : BIAOXYZ <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @simonlu9 #7 \u6211\u611f\u89c9\u7b2c\u4e00\u6b21 AES \u52a0\u5bc6\u662f\u52a0\u968f\u673a\u5316\uff0c\u7b2c\u4e8c\u6b21\u662f\u7528 i \u4f5c\u4e3a\u5bc6\u94a5\u6765\u52a0\u5bc6\u3002\u7b2c\u4e09\u4e2a RSA \u662f\u5178\u578b\u7684\u6df7\u5408\u52a0\u5bc6\u884c\u4e3a\uff1a\u516c\u94a5\u5bc6\u7801\u7b97\u6cd5\u52a0\u5bc6\u4e00\u4e2a session key \uff08\u8fd9\u4e2a session key \u8981\u6c42\u662f\u5bf9\u79f0\u5bc6\u94a5\uff09\uff0c\u8fd9\u91cc session key \u5c31\u662f i \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3962906\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : simonlu9 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @BIAOXYZ \u55ef\uff0csession key \u662f\u6bcf\u6b21\u90fd\u4f1a\u53d8\u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u7f51\u6613\u4e91\u97f3\u4e50\u52a0\u5bc6\u7591\u95ee\uff0c\u4e3a\u4ec0\u4e48\u8981\u7ecf\u8fc7\u4e24&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/183880"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=183880"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/183880\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=183880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=183880"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=183880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}