{"id":2000,"date":"2024-01-23T23:04:08","date_gmt":"2024-01-23T15:04:08","guid":{"rendered":"https:\/\/www.aqwu.net\/wp\/?p=2000"},"modified":"2024-01-23T23:32:37","modified_gmt":"2024-01-23T15:32:37","slug":"rsa%e7%ae%97%e6%b3%95%e5%8e%9f%e7%90%86%ef%bc%88%e4%b8%80%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.aqwu.net\/wp\/?p=2000","title":{"rendered":"RSA\u7b97\u6cd5\u539f\u7406\uff08\u4e00\uff09"},"content":{"rendered":"\n<p>\u5982\u679c\u4f60\u95ee\u6211\uff0c\u54ea\u4e00\u79cd<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E7%AE%97%E6%B3%95\" target=\"_blank\" rel=\"noreferrer noopener\">\u7b97\u6cd5<\/a>\u6700\u91cd\u8981\uff1f<\/p>\n\n\n\n<p>\u6211\u53ef\u80fd\u4f1a\u56de\u7b54<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E5%85%AC%E9%92%A5%E5%AF%86%E7%A0%81%E5%AD%A6\" target=\"_blank\" rel=\"noreferrer noopener\">&#8220;\u516c\u94a5\u52a0\u5bc6\u7b97\u6cd5&#8221;<\/a>\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.ruanyifeng.com\/blogimg\/asset\/201306\/bg2013062701.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>\u56e0\u4e3a\u5b83\u662f\u8ba1\u7b97\u673a\u901a\u4fe1\u5b89\u5168\u7684\u57fa\u77f3\uff0c\u4fdd\u8bc1\u4e86\u52a0\u5bc6\u6570\u636e\u4e0d\u4f1a\u88ab\u7834\u89e3\u3002\u4f60\u53ef\u4ee5\u60f3\u8c61\u4e00\u4e0b\uff0c\u4fe1\u7528\u5361\u4ea4\u6613\u88ab\u7834\u89e3\u7684\u540e\u679c\u3002<\/p>\n\n\n\n<p>\u8fdb\u5165\u6b63\u9898\u4e4b\u524d\uff0c\u6211\u5148\u7b80\u5355\u4ecb\u7ecd\u4e00\u4e0b\uff0c\u4ec0\u4e48\u662f&#8221;\u516c\u94a5\u52a0\u5bc6\u7b97\u6cd5&#8221;\u3002<\/p>\n\n\n\n<p><strong>\u4e00\u3001\u4e00\u70b9\u5386\u53f2<\/strong><\/p>\n\n\n\n<p>1976\u5e74\u4ee5\u524d\uff0c\u6240\u6709\u7684\u52a0\u5bc6\u65b9\u6cd5\u90fd\u662f\u540c\u4e00\u79cd\u6a21\u5f0f\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-small-font-size\">\uff081\uff09\u7532\u65b9\u9009\u62e9\u67d0\u4e00\u79cd\u52a0\u5bc6\u89c4\u5219\uff0c\u5bf9\u4fe1\u606f\u8fdb\u884c\u52a0\u5bc6\uff1b<\/p>\n\n\n\n<p class=\"has-small-font-size\">\uff082\uff09\u4e59\u65b9\u4f7f\u7528\u540c\u4e00\u79cd\u89c4\u5219\uff0c\u5bf9\u4fe1\u606f\u8fdb\u884c\u89e3\u5bc6\u3002<\/p>\n<\/blockquote>\n\n\n\n<p>\u7531\u4e8e\u52a0\u5bc6\u548c\u89e3\u5bc6\u4f7f\u7528\u540c\u6837\u89c4\u5219\uff08\u7b80\u79f0&#8221;\u5bc6\u94a5&#8221;\uff09\uff0c\u8fd9\u88ab\u79f0\u4e3a<a href=\"https:\/\/zh.wikipedia.org\/zh-cn\/%E5%AF%B9%E7%AD%89%E5%8A%A0%E5%AF%86\" target=\"_blank\" rel=\"noreferrer noopener\">&#8220;\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5&#8221;<\/a>\uff08Symmetric-key algorithm\uff09\u3002<\/p>\n\n\n\n<p>\u8fd9\u79cd\u52a0\u5bc6\u6a21\u5f0f\u6709\u4e00\u4e2a\u6700\u5927\u5f31\u70b9\uff1a\u7532\u65b9\u5fc5\u987b\u628a\u52a0\u5bc6\u89c4\u5219\u544a\u8bc9\u4e59\u65b9\uff0c\u5426\u5219\u65e0\u6cd5\u89e3\u5bc6\u3002\u4fdd\u5b58\u548c\u4f20\u9012\u5bc6\u94a5\uff0c\u5c31\u6210\u4e86\u6700\u5934\u75bc\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.ruanyifeng.com\/blogimg\/asset\/201306\/bg2013062703.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>1976\u5e74\uff0c\u4e24\u4f4d\u7f8e\u56fd\u8ba1\u7b97\u673a\u5b66\u5bb6Whitfield Diffie \u548c Martin Hellman\uff0c\u63d0\u51fa\u4e86\u4e00\u79cd\u5d2d\u65b0\u6784\u601d\uff0c\u53ef\u4ee5\u5728\u4e0d\u76f4\u63a5\u4f20\u9012\u5bc6\u94a5\u7684\u60c5\u51b5\u4e0b\uff0c\u5b8c\u6210\u89e3\u5bc6\u3002\u8fd9\u88ab\u79f0\u4e3a<a href=\"https:\/\/en.wikipedia.org\/wiki\/Diffie%E2%80%93Hellman_key_exchange\" target=\"_blank\" rel=\"noreferrer noopener\">&#8220;Diffie-Hellman\u5bc6\u94a5\u4ea4\u6362\u7b97\u6cd5&#8221;<\/a>\u3002\u8fd9\u4e2a\u7b97\u6cd5\u542f\u53d1\u4e86\u5176\u4ed6\u79d1\u5b66\u5bb6\u3002\u4eba\u4eec\u8ba4\u8bc6\u5230\uff0c\u52a0\u5bc6\u548c\u89e3\u5bc6\u53ef\u4ee5\u4f7f\u7528\u4e0d\u540c\u7684\u89c4\u5219\uff0c\u53ea\u8981\u8fd9\u4e24\u79cd\u89c4\u5219\u4e4b\u95f4\u5b58\u5728\u67d0\u79cd\u5bf9\u5e94\u5173\u7cfb\u5373\u53ef\uff0c\u8fd9\u6837\u5c31\u907f\u514d\u4e86\u76f4\u63a5\u4f20\u9012\u5bc6\u94a5\u3002<\/p>\n\n\n\n<p>\u8fd9\u79cd\u65b0\u7684\u52a0\u5bc6\u6a21\u5f0f\u88ab\u79f0\u4e3a&#8221;\u975e\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5&#8221;\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-small-font-size\">\uff081\uff09\u4e59\u65b9\u751f\u6210\u4e24\u628a\u5bc6\u94a5\uff08\u516c\u94a5\u548c\u79c1\u94a5\uff09\u3002\u516c\u94a5\u662f\u516c\u5f00\u7684\uff0c\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u83b7\u5f97\uff0c\u79c1\u94a5\u5219\u662f\u4fdd\u5bc6\u7684\u3002<\/p>\n\n\n\n<p class=\"has-small-font-size\">\uff082\uff09\u7532\u65b9\u83b7\u53d6\u4e59\u65b9\u7684\u516c\u94a5\uff0c\u7136\u540e\u7528\u5b83\u5bf9\u4fe1\u606f\u52a0\u5bc6\u3002<\/p>\n\n\n\n<p class=\"has-small-font-size\">\uff083\uff09\u4e59\u65b9\u5f97\u5230\u52a0\u5bc6\u540e\u7684\u4fe1\u606f\uff0c\u7528\u79c1\u94a5\u89e3\u5bc6\u3002<\/p>\n<\/blockquote>\n\n\n\n<p>\u5982\u679c\u516c\u94a5\u52a0\u5bc6\u7684\u4fe1\u606f\u53ea\u6709\u79c1\u94a5\u89e3\u5f97\u5f00\uff0c\u90a3\u4e48\u53ea\u8981\u79c1\u94a5\u4e0d\u6cc4\u6f0f\uff0c\u901a\u4fe1\u5c31\u662f\u5b89\u5168\u7684\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.ruanyifeng.com\/blogimg\/asset\/201306\/bg2013062702.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p>1977\u5e74\uff0c\u4e09\u4f4d\u6570\u5b66\u5bb6Rivest\u3001Shamir \u548c Adleman \u8bbe\u8ba1\u4e86\u4e00\u79cd\u7b97\u6cd5\uff0c\u53ef\u4ee5\u5b9e\u73b0\u975e\u5bf9\u79f0\u52a0\u5bc6\u3002\u8fd9\u79cd\u7b97\u6cd5\u7528\u4ed6\u4eec\u4e09\u4e2a\u4eba\u7684\u540d\u5b57\u547d\u540d\uff0c\u53eb\u505a<a href=\"https:\/\/zh.wikipedia.org\/zh-cn\/RSA%E5%8A%A0%E5%AF%86%E7%AE%97%E6%B3%95\" target=\"_blank\" rel=\"noreferrer noopener\">RSA\u7b97\u6cd5<\/a>\u3002\u4ece\u90a3\u65f6\u76f4\u5230\u73b0\u5728\uff0cRSA\u7b97\u6cd5\u4e00\u76f4\u662f\u6700\u5e7f\u4e3a\u4f7f\u7528\u7684&#8221;\u975e\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5&#8221;\u3002\u6beb\u4e0d\u5938\u5f20\u5730\u8bf4\uff0c\u53ea\u8981\u6709\u8ba1\u7b97\u673a\u7f51\u7edc\u7684\u5730\u65b9\uff0c\u5c31\u6709RSA\u7b97\u6cd5\u3002<\/p>\n\n\n\n<p>\u8fd9\u79cd\u7b97\u6cd5\u975e\u5e38<a href=\"https:\/\/en.wikipedia.org\/wiki\/RSA_Factoring_Challenge\" target=\"_blank\" rel=\"noreferrer noopener\">\u53ef\u9760<\/a>\uff0c\u5bc6\u94a5\u8d8a\u957f\uff0c\u5b83\u5c31\u8d8a\u96be\u7834\u89e3\u3002\u6839\u636e\u5df2\u7ecf\u62ab\u9732\u7684\u6587\u732e\uff0c\u76ee\u524d\u88ab\u7834\u89e3\u7684\u6700\u957fRSA\u5bc6\u94a5\u662f768\u4e2a\u4e8c\u8fdb\u5236\u4f4d\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u957f\u5ea6\u8d85\u8fc7768\u4f4d\u7684\u5bc6\u94a5\uff0c\u8fd8\u65e0\u6cd5\u7834\u89e3\uff08\u81f3\u5c11\u6ca1\u4eba\u516c\u5f00\u5ba3\u5e03\uff09\u3002\u56e0\u6b64\u53ef\u4ee5\u8ba4\u4e3a\uff0c1024\u4f4d\u7684RSA\u5bc6\u94a5\u57fa\u672c\u5b89\u5168\uff0c2048\u4f4d\u7684\u5bc6\u94a5\u6781\u5176\u5b89\u5168\u3002<\/p>\n\n\n\n<p>\u4e0b\u9762\uff0c\u6211\u5c31\u8fdb\u5165\u6b63\u9898\uff0c\u89e3\u91caRSA\u7b97\u6cd5\u7684\u539f\u7406\u3002\u6587\u7ae0\u5171\u5206\u6210\u4e24\u90e8\u5206\uff0c\u4eca\u5929\u662f\u7b2c\u4e00\u90e8\u5206\uff0c\u4ecb\u7ecd\u8981\u7528\u5230\u7684\u56db\u4e2a\u6570\u5b66\u6982\u5ff5\u3002\u4f60\u53ef\u4ee5\u770b\u5230\uff0cRSA\u7b97\u6cd5\u5e76\u4e0d\u96be\uff0c\u53ea\u9700\u8981\u4e00\u70b9<a href=\"http:\/\/jeremykun.com\/2011\/07\/30\/number-theory-a-primer\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u6570\u8bba\u77e5\u8bc6<\/a>\u5c31\u53ef\u4ee5\u7406\u89e3\u3002<\/p>\n\n\n\n<p><strong>\u4e8c\u3001\u4e92\u8d28\u5173\u7cfb<\/strong><\/p>\n\n\n\n<p>\u5982\u679c\u4e24\u4e2a\u6b63\u6574\u6570\uff0c\u9664\u4e861\u4ee5\u5916\uff0c\u6ca1\u6709\u5176\u4ed6\u516c\u56e0\u5b50\uff0c\u6211\u4eec\u5c31\u79f0\u8fd9\u4e24\u4e2a\u6570\u662f<a href=\"https:\/\/zh.wikipedia.org\/zh-cn\/%E4%BA%92%E7%B4%A0\" target=\"_blank\" rel=\"noreferrer noopener\">\u4e92\u8d28\u5173\u7cfb<\/a>\uff08coprime\uff09\u3002\u6bd4\u5982\uff0c15\u548c32\u6ca1\u6709\u516c\u56e0\u5b50\uff0c\u6240\u4ee5\u5b83\u4eec\u662f\u4e92\u8d28\u5173\u7cfb\u3002\u8fd9\u8bf4\u660e\uff0c\u4e0d\u662f\u8d28\u6570\u4e5f\u53ef\u4ee5\u6784\u6210\u4e92\u8d28\u5173\u7cfb\u3002<\/p>\n\n\n\n<p>\u5173\u4e8e\u4e92\u8d28\u5173\u7cfb\uff0c\u4e0d\u96be\u5f97\u5230\u4ee5\u4e0b\u7ed3\u8bba\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-small-font-size\">1. \u4efb\u610f\u4e24\u4e2a\u8d28\u6570\u6784\u6210\u4e92\u8d28\u5173\u7cfb\uff0c\u6bd4\u598213\u548c61\u3002<\/p>\n\n\n\n<p class=\"has-small-font-size\">2. \u4e00\u4e2a\u6570\u662f\u8d28\u6570\uff0c\u53e6\u4e00\u4e2a\u6570\u53ea\u8981\u4e0d\u662f\u524d\u8005\u7684\u500d\u6570\uff0c\u4e24\u8005\u5c31\u6784\u6210\u4e92\u8d28\u5173\u7cfb\uff0c\u6bd4\u59823\u548c10\u3002<\/p>\n\n\n\n<p class=\"has-small-font-size\">3. \u5982\u679c\u4e24\u4e2a\u6570\u4e4b\u4e2d\uff0c\u8f83\u5927\u7684\u90a3\u4e2a\u6570\u662f\u8d28\u6570\uff0c\u5219\u4e24\u8005\u6784\u6210\u4e92\u8d28\u5173\u7cfb\uff0c\u6bd4\u598297\u548c57\u3002<\/p>\n\n\n\n<p class=\"has-small-font-size\">4. 1\u548c\u4efb\u610f\u4e00\u4e2a\u81ea\u7136\u6570\u662f\u90fd\u662f\u4e92\u8d28\u5173\u7cfb\uff0c\u6bd4\u59821\u548c99\u3002<\/p>\n\n\n\n<p class=\"has-small-font-size\">5. p\u662f\u5927\u4e8e1\u7684\u6574\u6570\uff0c\u5219p\u548cp-1\u6784\u6210\u4e92\u8d28\u5173\u7cfb\uff0c\u6bd4\u598257\u548c56\u3002<\/p>\n\n\n\n<p class=\"has-small-font-size\">6. p\u662f\u5927\u4e8e1\u7684\u5947\u6570\uff0c\u5219p\u548cp-2\u6784\u6210\u4e92\u8d28\u5173\u7cfb\uff0c\u6bd4\u598217\u548c15\u3002<\/p>\n<\/blockquote>\n\n\n\n<p><strong>\u4e09\u3001\u6b27\u62c9\u51fd\u6570<\/strong><\/p>\n\n\n\n<p>\u8bf7\u601d\u8003\u4ee5\u4e0b\u95ee\u9898\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-small-font-size\">\u4efb\u610f\u7ed9\u5b9a\u6b63\u6574\u6570n\uff0c\u8bf7\u95ee\u5728\u5c0f\u4e8e\u7b49\u4e8en\u7684\u6b63\u6574\u6570\u4e4b\u4e2d\uff0c\u6709\u591a\u5c11\u4e2a\u4e0en\u6784\u6210\u4e92\u8d28\u5173\u7cfb\uff1f\uff08\u6bd4\u5982\uff0c\u57281\u52308\u4e4b\u4e2d\uff0c\u6709\u591a\u5c11\u4e2a\u6570\u4e0e8\u6784\u6210\u4e92\u8d28\u5173\u7cfb\uff1f\uff09<\/p>\n<\/blockquote>\n\n\n\n<p>\u8ba1\u7b97\u8fd9\u4e2a\u503c\u7684\u65b9\u6cd5\u5c31\u53eb\u505a<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E6%AC%A7%E6%8B%89%E5%87%BD%E6%95%B0\" target=\"_blank\" rel=\"noreferrer noopener\">\u6b27\u62c9\u51fd\u6570<\/a>\uff0c\u4ee5\u03c6(n)\u8868\u793a\u3002\u57281\u52308\u4e4b\u4e2d\uff0c\u4e0e8\u5f62\u6210\u4e92\u8d28\u5173\u7cfb\u7684\u662f1\u30013\u30015\u30017\uff0c\u6240\u4ee5 \u03c6(n) = 4\u3002<\/p>\n\n\n\n<p>\u03c6(n) \u7684\u8ba1\u7b97\u65b9\u6cd5\u5e76\u4e0d\u590d\u6742\uff0c\u4f46\u662f\u4e3a\u4e86\u5f97\u5230\u6700\u540e\u90a3\u4e2a\u516c\u5f0f\uff0c\u9700\u8981\u4e00\u6b65\u6b65\u8ba8\u8bba\u3002<\/p>\n\n\n\n<p><strong>\u7b2c\u4e00\u79cd\u60c5\u51b5<\/strong><\/p>\n\n\n\n<p>\u5982\u679cn=1\uff0c\u5219 \u03c6(1) = 1 \u3002\u56e0\u4e3a1\u4e0e\u4efb\u4f55\u6570\uff08\u5305\u62ec\u81ea\u8eab\uff09\u90fd\u6784\u6210\u4e92\u8d28\u5173\u7cfb\u3002<\/p>\n\n\n\n<p><strong>\u7b2c\u4e8c\u79cd\u60c5\u51b5<\/strong><\/p>\n\n\n\n<p>\u5982\u679cn\u662f\u8d28\u6570\uff0c\u5219 \u03c6(n)=n-1 \u3002\u56e0\u4e3a\u8d28\u6570\u4e0e\u5c0f\u4e8e\u5b83\u7684\u6bcf\u4e00\u4e2a\u6570\uff0c\u90fd\u6784\u6210\u4e92\u8d28\u5173\u7cfb\u3002\u6bd4\u59825\u4e0e1\u30012\u30013\u30014\u90fd\u6784\u6210\u4e92\u8d28\u5173\u7cfb\u3002<\/p>\n\n\n\n<p><strong>\u7b2c\u4e09\u79cd\u60c5\u51b5<\/strong><\/p>\n\n\n\n<p>\u5982\u679cn\u662f\u8d28\u6570\u7684\u67d0\u4e00\u4e2a\u6b21\u65b9\uff0c\u5373 n = p^k (p\u4e3a\u8d28\u6570\uff0ck\u4e3a\u5927\u4e8e\u7b49\u4e8e1\u7684\u6574\u6570)\uff0c\u5219<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"291\" height=\"40\" src=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image.png\" alt=\"\" class=\"wp-image-2001\"\/><\/figure>\n\n\n\n<p>\u6bd4\u5982 \u03c6(8) = \u03c6(2^3) =2^3 &#8211; 2^2 = 8 -4 = 4\u3002<\/p>\n\n\n\n<p>\u8fd9\u662f\u56e0\u4e3a\u53ea\u6709\u5f53\u4e00\u4e2a\u6570\u4e0d\u5305\u542b\u8d28\u6570p\uff0c\u624d\u53ef\u80fd\u4e0en\u4e92\u8d28\u3002\u800c\u5305\u542b\u8d28\u6570p\u7684\u6570\u4e00\u5171\u6709p^(k-1)\u4e2a\uff0c\u53731\u00d7p\u30012\u00d7p\u30013\u00d7p\u3001&#8230;\u3001p^(k-1)\u00d7p\uff0c\u628a\u5b83\u4eec\u53bb\u9664\uff0c\u5269\u4e0b\u7684\u5c31\u662f\u4e0en\u4e92\u8d28\u7684\u6570\u3002<\/p>\n\n\n\n<p>\u4e0a\u9762\u7684\u5f0f\u5b50\u8fd8\u53ef\u4ee5\u5199\u6210\u4e0b\u9762\u7684\u5f62\u5f0f\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"434\" height=\"60\" src=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-10.png\" alt=\"\" class=\"wp-image-2011\" srcset=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-10.png 434w, https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-10-300x41.png 300w\" sizes=\"auto, (max-width: 434px) 100vw, 434px\" \/><\/figure>\n\n\n\n<p>\u53ef\u4ee5\u770b\u51fa\uff0c\u4e0a\u9762\u7684\u7b2c\u4e8c\u79cd\u60c5\u51b5\u662f k=1 \u65f6\u7684\u7279\u4f8b\u3002<\/p>\n\n\n\n<p><strong>\u7b2c\u56db\u79cd\u60c5\u51b5<\/strong><\/p>\n\n\n\n<p>\u5982\u679cn\u53ef\u4ee5\u5206\u89e3\u6210\u4e24\u4e2a\u4e92\u8d28\u7684\u6574\u6570\u4e4b\u79ef\uff0c<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-small-font-size\">n = p1 \u00d7 p2<\/p>\n<\/blockquote>\n\n\n\n<p>\u5219<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-small-font-size\">\u03c6(n) = \u03c6(p1p2) = \u03c6(p1)\u03c6(p2)<\/p>\n<\/blockquote>\n\n\n\n<p>\u5373\u79ef\u7684\u6b27\u62c9\u51fd\u6570\u7b49\u4e8e\u5404\u4e2a\u56e0\u5b50\u7684\u6b27\u62c9\u51fd\u6570\u4e4b\u79ef\u3002\u6bd4\u5982\uff0c\u03c6(56)=\u03c6(8\u00d77)=\u03c6(8)\u00d7\u03c6(7)=4\u00d76=24\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e00\u6761\u7684\u8bc1\u660e\u8981\u7528\u5230<a href=\"https:\/\/en.wikipedia.org\/wiki\/Chinese_remainder_theorem\" target=\"_blank\" rel=\"noreferrer noopener\">&#8220;\u4e2d\u56fd\u5269\u4f59\u5b9a\u7406&#8221;<\/a>\uff0c\u8fd9\u91cc\u5c31\u4e0d\u5c55\u5f00\u4e86\uff0c\u53ea\u7b80\u5355\u8bf4\u4e00\u4e0b\u601d\u8def\uff1a\u5982\u679ca\u4e0ep1\u4e92\u8d28(a&lt;p1)\uff0cb\u4e0ep2\u4e92\u8d28(b&lt;p2)\uff0cc\u4e0ep1p2\u4e92\u8d28(c&lt;p1p2)\uff0c\u5219c\u4e0e\u6570\u5bf9 (a,b) \u662f\u4e00\u4e00\u5bf9\u5e94\u5173\u7cfb\u3002\u7531\u4e8ea\u7684\u503c\u6709\u03c6(p1)\u79cd\u53ef\u80fd\uff0cb\u7684\u503c\u6709\u03c6(p2)\u79cd\u53ef\u80fd\uff0c\u5219\u6570\u5bf9 (a,b) \u6709\u03c6(p1)\u03c6(p2)\u79cd\u53ef\u80fd\uff0c\u800cc\u7684\u503c\u6709\u03c6(p1p2)\u79cd\u53ef\u80fd\uff0c\u6240\u4ee5\u03c6(p1p2)\u5c31\u7b49\u4e8e\u03c6(p1)\u03c6(p2)\u3002<\/p>\n\n\n\n<p><strong>\u7b2c\u4e94\u79cd\u60c5\u51b5<\/strong><\/p>\n\n\n\n<p>\u56e0\u4e3a\u4efb\u610f\u4e00\u4e2a\u5927\u4e8e1\u7684\u6b63\u6574\u6570\uff0c\u90fd\u53ef\u4ee5\u5199\u6210\u4e00\u7cfb\u5217\u8d28\u6570\u7684\u79ef\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"211\" height=\"40\" src=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-5.png\" alt=\"\" class=\"wp-image-2006\"\/><\/figure>\n\n\n\n<p>\u6839\u636e\u7b2c4\u6761\u7684\u7ed3\u8bba\uff0c\u5f97\u5230<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"371\" height=\"40\" src=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-7.png\" alt=\"\" class=\"wp-image-2008\" srcset=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-7.png 371w, https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-7-300x32.png 300w\" sizes=\"auto, (max-width: 371px) 100vw, 371px\" \/><\/figure>\n\n\n\n<p>\u518d\u6839\u636e\u7b2c3\u6761\u7684\u7ed3\u8bba\uff0c\u5f97\u5230<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"565\" height=\"60\" src=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-9.png\" alt=\"\" class=\"wp-image-2010\" srcset=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-9.png 565w, https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-9-300x32.png 300w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/figure>\n\n\n\n<p>\u4e5f\u5c31\u7b49\u4e8e<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"434\" height=\"60\" src=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-11.png\" alt=\"\" class=\"wp-image-2012\" srcset=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-11.png 434w, https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-11-300x41.png 300w\" sizes=\"auto, (max-width: 434px) 100vw, 434px\" \/><\/figure>\n\n\n\n<p>\u8fd9\u5c31\u662f\u6b27\u62c9\u51fd\u6570\u7684\u901a\u7528\u8ba1\u7b97\u516c\u5f0f\u3002\u6bd4\u5982\uff0c1323\u7684\u6b27\u62c9\u51fd\u6570\uff0c\u8ba1\u7b97\u8fc7\u7a0b\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"647\" height=\"60\" src=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-12.png\" alt=\"\" class=\"wp-image-2013\" srcset=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-12.png 647w, https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-12-300x28.png 300w\" sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><\/figure>\n\n\n\n<p><strong>\u56db\u3001\u6b27\u62c9\u5b9a\u7406<\/strong><\/p>\n\n\n\n<p>\u6b27\u62c9\u51fd\u6570\u7684\u7528\u5904\uff0c\u5728\u4e8e<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E6%AC%A7%E6%8B%89%E5%AE%9A%E7%90%86_(%E6%95%B0%E8%AE%BA)\" target=\"_blank\" rel=\"noreferrer noopener\">\u6b27\u62c9\u5b9a\u7406<\/a>\u3002&#8221;\u6b27\u62c9\u5b9a\u7406&#8221;\u6307\u7684\u662f\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-small-font-size\">\u5982\u679c\u4e24\u4e2a\u6b63\u6574\u6570a\u548cn\u4e92\u8d28\uff0c\u5219n\u7684\u6b27\u62c9\u51fd\u6570 \u03c6(n) \u53ef\u4ee5\u8ba9\u4e0b\u9762\u7684\u7b49\u5f0f\u6210\u7acb\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"336\" height=\"60\" src=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-4.png\" alt=\"\" class=\"wp-image-2005\" srcset=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-4.png 336w, https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-4-300x54.png 300w\" sizes=\"auto, (max-width: 336px) 100vw, 336px\" \/><\/figure>\n<\/blockquote>\n\n\n\n<p>\u4e5f\u5c31\u662f\u8bf4\uff0ca\u7684\u03c6(n)\u6b21\u65b9\u88abn\u9664\u7684\u4f59\u6570\u4e3a1\u3002\u6216\u8005\u8bf4\uff0ca\u7684\u03c6(n)\u6b21\u65b9\u51cf\u53bb1\uff0c\u53ef\u4ee5\u88abn\u6574\u9664\u3002\u6bd4\u5982\uff0c3\u548c7\u4e92\u8d28\uff0c\u800c7\u7684\u6b27\u62c9\u51fd\u6570\u03c6(7)\u7b49\u4e8e6\uff0c\u6240\u4ee53\u76846\u6b21\u65b9\uff08729\uff09\u51cf\u53bb1\uff0c\u53ef\u4ee5\u88ab7\u6574\u9664\uff08728\/7=104\uff09\u3002<\/p>\n\n\n\n<p>\u6b27\u62c9\u5b9a\u7406\u7684\u8bc1\u660e\u6bd4\u8f83\u590d\u6742\uff0c\u8fd9\u91cc\u5c31\u7701\u7565\u4e86\u3002\u6211\u4eec\u53ea\u8981\u8bb0\u4f4f\u5b83\u7684\u7ed3\u8bba\u5c31\u884c\u4e86\u3002<\/p>\n\n\n\n<p>\u6b27\u62c9\u5b9a\u7406\u53ef\u4ee5\u5927\u5927\u7b80\u5316\u67d0\u4e9b\u8fd0\u7b97\u3002\u6bd4\u5982\uff0c7\u548c10\u4e92\u8d28\uff0c\u6839\u636e\u6b27\u62c9\u5b9a\u7406\uff0c<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"240\" height=\"40\" src=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-6.png\" alt=\"\" class=\"wp-image-2007\"\/><\/figure>\n\n\n\n<p>\u5df2\u77e5 \u03c6(10) \u7b49\u4e8e4\uff0c\u6240\u4ee5\u9a6c\u4e0a\u5f97\u52307\u76844\u500d\u6570\u6b21\u65b9\u7684\u4e2a\u4f4d\u6570\u80af\u5b9a\u662f1\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"235\" height=\"40\" src=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-1.png\" alt=\"\" class=\"wp-image-2002\"\/><\/figure>\n\n\n\n<p>\u56e0\u6b64\uff0c7\u7684\u4efb\u610f\u6b21\u65b9\u7684\u4e2a\u4f4d\u6570\uff08\u4f8b\u59827\u7684222\u6b21\u65b9\uff09\uff0c\u5fc3\u7b97\u5c31\u53ef\u4ee5\u7b97\u51fa\u6765\u3002<\/p>\n\n\n\n<p>\u6b27\u62c9\u5b9a\u7406\u6709\u4e00\u4e2a\u7279\u6b8a\u60c5\u51b5\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-small-font-size\">\u5047\u8bbe\u6b63\u6574\u6570a\u4e0e\u8d28\u6570p\u4e92\u8d28\uff0c\u56e0\u4e3a\u8d28\u6570p\u7684\u03c6(p)\u7b49\u4e8ep-1\uff0c\u5219\u6b27\u62c9\u5b9a\u7406\u53ef\u4ee5\u5199\u6210<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"255\" height=\"40\" src=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-8.png\" alt=\"\" class=\"wp-image-2009\"\/><\/figure>\n<\/blockquote>\n\n\n\n<p>\u8fd9\u5c31\u662f\u8457\u540d\u7684<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E8%B4%B9%E9%A9%AC%E5%B0%8F%E5%AE%9A%E7%90%86\" target=\"_blank\" rel=\"noreferrer noopener\">\u8d39\u9a6c\u5c0f\u5b9a\u7406<\/a>\u3002\u5b83\u662f\u6b27\u62c9\u5b9a\u7406\u7684\u7279\u4f8b\u3002<\/p>\n\n\n\n<p>\u6b27\u62c9\u5b9a\u7406\u662fRSA\u7b97\u6cd5\u7684\u6838\u5fc3\u3002\u7406\u89e3\u4e86\u8fd9\u4e2a\u5b9a\u7406\uff0c\u5c31\u53ef\u4ee5\u7406\u89e3RSA\u3002<\/p>\n\n\n\n<p><strong>\u4e94\u3001\u6a21\u53cd\u5143\u7d20<\/strong><\/p>\n\n\n\n<p>\u8fd8\u5269\u4e0b\u6700\u540e\u4e00\u4e2a\u6982\u5ff5\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-small-font-size\">\u5982\u679c\u4e24\u4e2a\u6b63\u6574\u6570a\u548cn\u4e92\u8d28\uff0c\u90a3\u4e48\u4e00\u5b9a\u53ef\u4ee5\u627e\u5230\u6574\u6570b\uff0c\u4f7f\u5f97 ab-1 \u88abn\u6574\u9664\uff0c\u6216\u8005\u8bf4ab\u88abn\u9664\u7684\u4f59\u6570\u662f1\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"236\" height=\"40\" src=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-3.png\" alt=\"\" class=\"wp-image-2004\"\/><\/figure>\n\n\n\n<p>\u8fd9\u65f6\uff0cb\u5c31\u53eb\u505aa\u7684<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E6%A8%A1%E5%8F%8D%E5%85%83%E7%B4%A0\" target=\"_blank\" rel=\"noreferrer noopener\">&#8220;\u6a21\u53cd\u5143\u7d20&#8221;<\/a>\u3002<\/p>\n<\/blockquote>\n\n\n\n<p>\u6bd4\u5982\uff0c3\u548c11\u4e92\u8d28\uff0c\u90a3\u4e483\u7684\u6a21\u53cd\u5143\u7d20\u5c31\u662f4\uff0c\u56e0\u4e3a (3 \u00d7 4)-1 \u53ef\u4ee5\u88ab11\u6574\u9664\u3002\u663e\u7136\uff0c\u6a21\u53cd\u5143\u7d20\u4e0d\u6b62\u4e00\u4e2a\uff0c 4\u52a0\u51cf11\u7684\u6574\u6570\u500d\u90fd\u662f3\u7684\u6a21\u53cd\u5143\u7d20 {&#8230;,-18,-7,4,15,26,&#8230;}\uff0c\u5373\u5982\u679cb\u662fa\u7684\u6a21\u53cd\u5143\u7d20\uff0c\u5219 b+kn \u90fd\u662fa\u7684\u6a21\u53cd\u5143\u7d20\u3002<\/p>\n\n\n\n<p>\u6b27\u62c9\u5b9a\u7406\u53ef\u4ee5\u7528\u6765\u8bc1\u660e\u6a21\u53cd\u5143\u7d20\u5fc5\u7136\u5b58\u5728\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"397\" height=\"40\" src=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-2.png\" alt=\"\" class=\"wp-image-2003\" srcset=\"https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-2.png 397w, https:\/\/www.aqwu.net\/wp\/wp-content\/uploads\/2024\/01\/image-2-300x30.png 300w\" sizes=\"auto, (max-width: 397px) 100vw, 397px\" \/><\/figure>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\uff0ca\u7684 \u03c6(n)-1 \u6b21\u65b9\uff0c\u5c31\u662fa\u7684\u6a21\u53cd\u5143\u7d20\u3002<\/p>\n\n\n\n<p>==========================================<\/p>\n\n\n\n<p>\u597d\u4e86\uff0c\u9700\u8981\u7528\u5230\u7684\u6570\u5b66\u5de5\u5177\uff0c\u5168\u90e8\u4ecb\u7ecd\u5b8c\u4e86\u3002RSA\u7b97\u6cd5\u6d89\u53ca\u7684\u6570\u5b66\u77e5\u8bc6\uff0c\u5c31\u662f\u4e0a\u9762\u8fd9\u4e9b\uff0c\u4e0b\u4e00\u6b21\u6211\u5c31\u6765\u4ecb\u7ecd\u516c\u94a5\u548c\u79c1\u94a5\u5230\u5e95\u662f\u600e\u4e48\u751f\u6210\u7684\u3002<\/p>\n\n\n\n<p>\u53c2\u8003\u8fde\u63a5\uff1a<a href=\"https:\/\/www.aqwu.net\/wp\/?p=2016\">RSA\u7b97\u6cd5\u539f\u7406\uff08\u4e8c\uff09<\/a><\/p>\n\n\n\n<p>\u539f\u6587\u8fde\u63a5\uff1a<a href=\"https:\/\/www.ruanyifeng.com\/blog\/2013\/06\/rsa_algorithm_part_one.html\">https:\/\/www.ruanyifeng.com\/blog\/2013\/06\/rsa_algorithm_part_one.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u4f60\u95ee\u6211\uff0c\u54ea\u4e00\u79cd\u7b97\u6cd5\u6700\u91cd\u8981\uff1f \u6211\u53ef\u80fd\u4f1a\u56de\u7b54&#8220;\u516c\u94a5\u52a0\u5bc6\u7b97\u6cd5&#8221;\u3002 \u56e0\u4e3a\u5b83\u662f\u8ba1\u7b97\u673a\u901a\u4fe1\u5b89\u5168 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[43],"tags":[75,60,314],"class_list":["post-2000","post","type-post","status-publish","format-standard","hentry","category-infoarticle","tag-kali","tag-linux","tag-openai-api"],"views":1864,"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2000"}],"version-history":[{"count":8,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2000\/revisions"}],"predecessor-version":[{"id":2029,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2000\/revisions\/2029"}],"wp:attachment":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}