{"id":1399,"date":"2020-03-04T21:42:29","date_gmt":"2020-03-04T13:42:29","guid":{"rendered":"http:\/\/149.129.74.185\/?p=1399"},"modified":"2020-03-04T21:42:29","modified_gmt":"2020-03-04T13:42:29","slug":"%e7%bd%91%e7%bb%9c%e5%ae%89%e5%85%a8-week-2-note-2","status":"publish","type":"post","link":"http:\/\/www.magicmipamipa.com\/?p=1399","title":{"rendered":"[\u7f51\u7edc\u5b89\u5168] Week 2 Note"},"content":{"rendered":"<h2 id=\"mcetoc_1e2flh4c20\">Cryptanalysis<\/h2>\n<ul>\n<li>the science and art of <span style=\"color: #ff6600;\">breaking ciphers<\/span><\/li>\n<\/ul>\n<p>\uff08\u6253\u4ed6\u4e00\u987f\u6bd4\u7834RSA\u7b80\u53552333\uff09<\/p>\n<h3 id=\"mcetoc_1e2fm1bb01\">Password cracking<\/h3>\n<p>1. brute force<\/p>\n<p>2. random gussing<\/p>\n<p>3. strategic random guessing: dictionary attack<\/p>\n<p>\uff08\u4f7f\u7528\u5e38\u7528password\u5217\u8868\u5b9e\u9a8c\uff09<\/p>\n<h4>Warm up with one-time pad<\/h4>\n<ul>\n<li>\u5f53\u660e\u6587\u5168\u4e3a0\u65f6\uff0c \u6697\u6587\u7b49\u4e8e\u5bc6\u7801\u3002<\/li>\n<li>\u4f46OTP\u53ea\u4f7f\u7528\u4e00\u6b21\uff0c\u6240\u4ee5\u6ca1\u6709\u5f71\u54cd\u3002<\/li>\n<\/ul>\n<p>How to know plaintexts?<\/p>\n<p>How to know OTP in use?<\/p>\n<h4>Known-Plaintext Attack<\/h4>\n<ul>\n<li>\u7528P1~Pi\u5f97\u51faC1=Ek(P1)~Ci=EK(Pi)<\/li>\n<li>find key<\/li>\n<li>or algorithm to infer Pi+i from Ci+1<\/li>\n<\/ul>\n<h4>Chosen-Plaintext Attack<\/h4>\n<ul>\n<li>C1=Ek(P1)&#8230;Ci=Ek(Pi)<\/li>\n<li>chosen P1,&#8230;,Pi<\/li>\n<\/ul>\n<h4>Chosen-Ciphertext Attack<\/h4>\n<ul>\n<li>P1 = Dk(C1),&#8230;,Pi=Dk(Ci)<\/li>\n<li>given ciphertext and plaintext pairs<\/li>\n<\/ul>\n<h3 id=\"mcetoc_1e2ifb9kh2\">Ciphertext-Only Attack<\/h3>\n<h4 id=\"mcetoc_1e2ifbig63\">Known-Ciphertext Attack<\/h4>\n<ul>\n<li>The attacker has access only to a set of ciphertexts\u653b\u51fb\u8005\u53ea\u80fd\u8bbf\u95ee\u4e00\u7ec4\u5bc6\u6587<\/li>\n<li>The attack is completely successful if the corresponding plaintexts or the key can be deduced\u00a0\u5982\u679c\u53ef\u4ee5\u63a8\u65ad\u51fa\u76f8\u5e94\u7684\u660e\u6587\u6216\u5bc6\u94a5\uff0c\u5219\u653b\u51fb\u5b8c\u5168\u6210\u529f<\/li>\n<\/ul>\n<p><span style=\"color: inherit; font-family: 'Work Sans'; font-size: 32px;\">Replay Attack<\/span><\/p>\n<p>\u4e0d\u9700\u8981\u76f4\u63a5\u5f97\u77e5\u5185\u5bb9\uff0c\u53ea\u9700\u8981\u540c\u6837\u53d1\u9001\u6697\u6587\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<h4>Defense: Limit Message Freshness<\/h4>\n<ul>\n<li>Timestamp \u8bbe\u7f6e\u65f6\u95f4\u6233<\/li>\n<li>One-time session key \u4e0b\u4e00\u6b21\u7684Key\u4e0e\u8fd9\u4e00\u6b21\u7684\u4e0d\u540c<\/li>\n<\/ul>\n<h3 id=\"mcetoc_1e2imaaqg5\">Man-In-The-Middle Attack<\/h3>\n<ul>\n<li>hijacked key-channel<\/li>\n<li>\u52ab\u6301\u5bc6\u94a5\u5206\u4eab\u7684\u9891\u9053\uff0c\u5bc6\u94a5\u4ea4\u6362\u4fe1\u606f\u7ecf\u8fc7\u653b\u51fb\u8005<\/li>\n<li>\u4e2d\u95f4\u4eba\u4e0e\u901a\u4fe1\u53cc\u65b9\u5206\u522b\u5efa\u7acb\u5bc6\u94a5\u94fe\u63a5<\/li>\n<li>\u5f53A\u53d1\u9001\u6d88\u606f\u65f6\uff0cM\u53ef\u4ee5\u770b\u5230\u6697\u6587\u5e76\u89e3\u5bc6\u3002<\/li>\n<\/ul>\n<h4 id=\"mcetoc_1e2imr01n6\">Defense: Guarantee connection authenticity<\/h4>\n<ul>\n<li>eg\uff1ahttps<\/li>\n<\/ul>\n<h3 id=\"mcetoc_1e2imt3pb7\">Relay Attack<\/h3>\n<ul>\n<li>\u901a\u8fc7\u4e00\u4e2a\u4e2d\u95f4\u8bbe\u5907\u5b9e\u65f6\u83b7\u53d6\u6570\u636e\u3002<\/li>\n<\/ul>\n<h4>Defense: Distance Bounding<\/h4>\n<ul>\n<li>additional transmission delay<\/li>\n<li>RTT =\u00a0 2 * Distance \/ velocity<\/li>\n<li>\u901a\u8fc7\u5ef6\u8fdf\u6765\u68c0\u6d4b\u662f\u5426\u5b58\u5728\u4e2d\u7ee7\u653b\u51fb\u3002<\/li>\n<\/ul>\n<h3 id=\"mcetoc_1e2inmbpp8\">Program: Control Flow Graph<\/h3>\n<ul>\n<li>build CFG over memory access patterns<\/li>\n<li>\u89c2\u5bdf\u7a0b\u5e8f\u5728\u5185\u5b58\u4e0a\u7684\u8fd0\u884c<\/li>\n<\/ul>\n<h4>Side Channel Attack<\/h4>\n<h4 id=\"mcetoc_1e2ins9ib9\">Access patterns over cache<\/h4>\n<h3 id=\"mcetoc_1e2invoolb\">Prime+Probe Attack<\/h3>\n<ul>\n<li>\u901a\u8fc7\u4e00\u5b9a\u7684\u65b9\u5f0f\u6620\u5c04\u5230 Set \u7684\u4f4d\u7f6e\uff0c\u89c2\u6d4b\u8bbf\u95ee\u72b6\u6001\u3002<\/li>\n<li>\u628a\u7f13\u5b58\u7684\u6570\u636e\u7528\u81ea\u5df1\u7684\u6570\u636e\u586b\u6ee1\uff0c\u5982\u679c\u547d\u4e2d\u5219\u4e0d\u4f1a\u88ab\u66ff\u6362\u6389\uff0c\u4e14\u8bbf\u95ee\u65f6\u95f4\u5f88\u77ed\u3002<\/li>\n<\/ul>\n<h4>de-conflict<\/h4>\n<ul>\n<li>random replacement \u8bbf\u95ee\u65f6\u95f4\u589e\u52a0<\/li>\n<li>dynamic remapping \u5468\u671f\u6027\u66f4\u6539\u6620\u5c04\u6a21\u5f0f- overhead vs security<\/li>\n<\/ul>\n<h3 id=\"mcetoc_1e2iqtea5c\">Plaintext Memory Address<\/h3>\n<h4 id=\"mcetoc_1e2iqtea5d\">de-conflict<\/h4>\n<ul>\n<li>Oblivious RAM<\/li>\n<li>Path ORAM \u5bf9\u6240\u6709\u6570\u636e\u5efa\u7acb\u4e8c\u53c9\u6811\u5e8f\u5217\uff0c\u4ee5\u8def\u5f84\u8bfb\u548c\u5199\u3002<\/li>\n<\/ul>\n<hr \/>\n<p><span style=\"background-color: #ffff00; color: #ff6600;\">address \u6709\u89e3\u51b3\u95ee\u9898\u7684\u610f\u601d<\/span><\/p>\n<p><span style=\"background-color: #ffff00; color: #ff6600;\">brute force \u66b4\u529b<\/span><\/p>\n<p><span style=\"color: #ff6600; background-color: #ffff00;\">strategic \u7b56\u7565\u7684<\/span><\/p>\n<p><span style=\"color: #ff6600; background-color: #ffff00;\">formulate \u5236\u5b9a<\/span><\/p>\n<p><span style=\"color: #ff6600; background-color: #ffff00;\">hijack\u00a0\u52ab\u6301<\/span><\/p>\n<p><span style=\"color: #ff6600; background-color: #ffff00;\">tangling \u7ea0\u7ed3\u3001\u4e71\u6210\u4e00\u56e2<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cryptanalysis the science and art of breaking ciph [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,39],"tags":[],"_links":{"self":[{"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/posts\/1399"}],"collection":[{"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1399"}],"version-history":[{"count":1,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/posts\/1399\/revisions"}],"predecessor-version":[{"id":1400,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/posts\/1399\/revisions\/1400"}],"wp:attachment":[{"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1399"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}