PageSourceSearch

https://tongsuo.net/assets/js/77bc7647.2fb81d4c.js

js tongsuo.net collected 2026-10-05 05:50:10 UTC 121,814 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunktongsuo_docs=self.webpackChunktongsuo_docs||[]).push([[1584],{8077:(s,e,a)=>{a.r(e),a.d(e,{assets:()=>t,contentTitle:()=>m,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>r});var n=a(4848),l=a(8453);const i={sidebar_position:1,slug:"/features/sm2/overview"},m="\u94dc\u9501SM2\u7b97\u6cd5\u6027\u80fd\u4f18\u5316\u5b9e\u8df5\uff1a\uff08\u4e00\uff09\u7efc\u8ff0",c={id:"features/performance-optimization/sm2/overview",title:"\u94dc\u9501SM2\u7b97\u6cd5\u6027\u80fd\u4f18\u5316\u5b9e\u8df5\uff1a\uff08\u4e00\uff09\u7efc\u8ff0",description:"\u80cc\u666f",source:"@site/docs/features/performance-optimization/sm2/overview.md",sourceDirName:"features/performance-optimization/sm2",slug:"/features/sm2/overview",permalink:"/docs/features/sm2/overview",draft:!1,unlisted:!1,editUrl:"https://github.com/Tongsuo-Project/docs/tree/main/docs/features/performance-optimization/sm2/overview.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1,slug:"/features/sm2/overview"},sidebar:"tutorialSidebar",previous:{title:"SM4-NI \u6027\u80fd\u4f18\u5316",permalink:"/docs/features/sm4-ni"},next:{title:"\u94dc\u9501SM2\u7b97\u6cd5\u6027\u80fd\u4f18\u5316\u5b9e\u8df5\uff1a\uff08\u4e8c\uff09\u5feb\u901f\u6a21\u7ea6\u51cf\u7b97\u6cd5\u5b9e\u73b0",permalink:"/docs/features/sm2/implement"}},t={},r=[{value:"\u80cc\u666f",id:"\u80cc\u666f",level:2},{value:"\u4f18\u5316\u6280\u672f\u8def\u7ebf\u5206\u6790\u4e0e\u8bbe\u8ba1",id:"\u4f18\u5316\u6280\u672f\u8def\u7ebf\u5206\u6790\u4e0e\u8bbe\u8ba1",level:2},{value:"\u5173\u952e\u6280\u672f\u5b9e\u73b0",id:"\u5173\u952e\u6280\u672f\u5b9e\u73b0",level:2},{value:"64-bit \u5e73\u53f0\u4f18\u5316",id:"64-bit-\u5e73\u53f0\u4f18\u5316",level:3},{value:"\u5feb\u901f\u6a21\u7ea6\u51cf\u7b97\u6cd5\u5b9e\u73b0",id:"\u5feb\u901f\u6a21\u7ea6\u51cf\u7b97\u6cd5\u5b9e\u73b0",level:3},{value:"\u5feb\u901f\u6a21\u9006\u5143\u7b97\u6cd5\u5b9e\u73b0",id:"\u5feb\u901f\u6a21\u9006\u5143\u7b97\u6cd5\u5b9e\u73b0",level:3},{value:"\u4f18\u5316\u529f\u80fd\u542f\u7528\u53ca\u7cfb\u7edf\u8981\u6c42",id:"\u4f18\u5316\u529f\u80fd\u542f\u7528\u53ca\u7cfb\u7edf\u8981\u6c42",level:2},{value:"\u6027\u80fd\u6d4b\u8bd5",id:"\u6027\u80fd\u6d4b\u8bd5",level:2},{value:"\u53c2\u8003\u6587\u732e",id:"\u53c2\u8003\u6587\u732e",level:2}];function h(s){const e={a:"a",annotation:"annotation",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",img:"img",li:"li",math:"math",mi:"mi",mn:"mn",mo:"mo",mrow:"mrow",mspace:"mspace",msub:"msub",msup:"msup",mtext:"mtext",ol:"ol",p:"p",pre:"pre",semantics:"semantics",span:"span",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.R)(),...s.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{id:"\u94dc\u9501sm2\u7b97\u6cd5\u6027\u80fd\u4f18\u5316\u5b9e\u8df5\u4e00\u7efc\u8ff0",children:"\u94dc\u9501SM2\u7b97\u6cd5\u6027\u80fd\u4f18\u5316\u5b9e\u8df5\uff1a\uff08\u4e00\uff09\u7efc\u8ff0"}),"\n",(0,n.jsx)(e.h2,{id:"\u80cc\u666f",children:"\u80cc\u666f"}),"\n",(0,n.jsxs)(e.p,{children:["\u692d\u5706\u66f2\u7ebf\u516c\u94a5\u5bc6\u7801\u7b97\u6cd5\uff08Elliptic Curve Cryptography\uff0cECC\uff09\u662f\u4e00\u79cd\u57fa\u4e8e\u692d\u5706\u66f2\u7ebf\u79bb\u6563\u5bf9\u6570\u96be\u9898\u7684\u975e\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\uff0c\u5e7f\u6cdb\u8fd0\u7528\u4e8e\u6570\u5b57\u7b7e\u540d\u3001\u5bc6\u94a5\u4ea4\u6362\u3001\u52a0\u5bc6\u901a\u4fe1\u3001\u8bc1\u4e66\u7b7e\u53d1\u7b49\u573a\u666f\u3002\u56fd\u5bb6\u5bc6\u7801\u7ba1\u7406\u5c40\u4e8e2010\u5e7412\u670817\u65e5\u53d1\u5e03\u4e86\u56fd\u4ea7\u81ea\u4e3b\u53ef\u63a7\u7684\u692d\u5706\u66f2\u7ebf\u516c\u94a5\u5bc6\u7801\u7b97\u6cd5\u2014\u2014SM2\u7b97\u6cd5\uff0c\u6709\u529b\u4fdd\u969c\u4e86\u6211\u56fd\u91cd\u8981\u7ecf\u6d4e\u7cfb\u7edf\u5bc6\u7801\u5e94\u7528\u5b89\u5168\u548c\u884c\u4e1a\u4fe1\u606f\u7cfb\u7edf\u5b89\u5168\u3002\u7ecf\u8fc7\u5341\u51e0\u5e74\u7684\u53d1\u5c55\uff0cSM2\u7b97\u6cd5\u7684\u5e94\u7528\u573a\u666f\u4e0d\u65ad\u6df1\u5165\u62d3\u5c55\uff0c\u5f62\u6210\u4e86\u826f\u597d\u7684\u56fd\u5bc6\u751f\u6001\uff0cOpenSSL\u3001Linux\u5185\u6838\u7b49\u4e1a\u5185\u77e5\u540d\u5f00\u6e90\u9879\u76ee\u5df2\u7ecf\u63a5\u7eb3\u4e86SM2\u7b97\u6cd5\u5e76\u8fd0\u7528\u4e8e\u5b9e\u9645\u751f\u4ea7\u73af\u5883\u4e2d\u3002\n\u968f\u7740\u4fe1\u606f\u6280\u672f\u7684\u4e0d\u65ad\u53d1\u5c55\u548c\u533a\u5757\u94fe\u3001Web 3.0\u7b49\u65b0\u5174\u4ea7\u4e1a\u7684\u5d1b\u8d77\uff0c\u4e1a\u754c\u5bf9\u4e8eSM2\u7b97\u6cd5\u7684\u6027\u80fd\u8981\u6c42\u65e5\u76ca\u63d0\u9ad8\uff0c\u7279\u522b\u662f\u4e0e\u52a0\u5bc6\u901a\u4fe1\u3001\u8bc1\u4e66\u7b7e\u53d1\u9a8c\u8bc1\u3001\u533a\u5757\u94fe\u533a\u5757\u6784\u9020\u7b49\u76f4\u63a5\u76f8\u5173\u7684SM2\u6570\u5b57\u7b7e\u540d\u7b97\u6cd5\uff0c\u5176\u6027\u80fd\u8868\u73b0\u5bf9\u5e94\u7528\u7684\u6574\u4f53\u6027\u80fd\u6709\u5f88\u5927\u5f71\u54cd\u3002\u9057\u61be\u7684\u662f\uff0c\u4ee5OpenSSL\u4e3a\u4ee3\u8868\u7684\u5bc6\u7801\u5b66\u5de5\u5177\u5bf9SM2\u7b97\u6cd5\u7684\u6027\u80fd\u4f18\u5316\u8fdb\u5c55\u7f13\u6162\uff0c\u4e0d\u5229\u4e8eSM2\u7b97\u6cd5\u5e94\u7528\u573a\u666f\u7684\u8fdb\u4e00\u6b65\u62d3\u5c55\u3002\u4ee5OpenSSL 3.0.3\u7248\u672c\u4e3a\u4f8b\uff0c\u5728Apple M2 pro\u82af\u7247\u4e0a\u8fd0\u884cSM2\u7b97\u6cd5\uff0c\u5176\u7b7e\u540d\u548c\u9a8c\u7b7e\u6027\u80fd\u7ea6\u4e3a6000\u6b21/\u79d2\uff0c\u5728\u9ad8\u8d1f\u8f7d\u573a\u666f\u4e0b\u5c06\u6210\u4e3a\u7cfb\u7edf\u7684\u6027\u80fd\u74f6\u9888\u3002\n\u4f5c\u4e3a\u5168\u7403\u9996\u4e2a\u901a\u8fc7\u5546\u7528\u5bc6\u7801\u4ea7\u54c1\u8ba4\u8bc1\u7684\u56fd\u4ea7\u5bc6\u7801\u5b66\u5f00\u6e90\u9879\u76ee\uff0c\u94dc\u9501\u76f8\u5e94\u5730\u5f00\u5c55\u4e86SM2\u7b97\u6cd5\u6027\u80fd\u4f18\u5316\u7684\u63a2\u7d22\u7814\u7a76\u3002\u53d7OpenSSL\u4e2d\u9488\u5bf9\u90e8\u5206\u5e38\u7528\u66f2\u7ebf\u5b9e\u73b0\u7279\u5316\u7b97\u6cd5\u7684\u542f\u53d1\uff0c\u501f\u9274NIST\u66f2\u7ebf\u572864\u4f4d\u5e73\u53f0\u4e0a\u7684\u6297\u4fa7\u4fe1\u9053\u653b\u51fb\u5de5\u4f5c\uff0c\u94dc\u9501\u57fa\u4e8eSM2\u66f2\u7ebf\u548cGM/T 0003.5-2012\u7ed9\u5b9a\u7684\u63a8\u8350\u53c2\u6570\uff0c \u5728\u4fdd\u8bc1\u6297\u4fa7\u4fe1\u9053\u653b\u51fb\u5b89\u5168\u6027\u7684\u524d\u63d0\u4e0b\uff0c\u5b9e\u73b0\u4e86\u517c\u5bb9\u5927\u90e8\u520664\u4f4d\u67b6\u6784\u548c\u5e38\u89c1\u7f16\u8bd1\u5668\u768464\u4f4d\u5e73\u53f0\u6027\u80fd\u4f18\u5316\uff0c\u8f85\u4ee5SM2\u66f2\u7ebf\u53c2\u6570\u7279\u5316\u7684\u5feb\u901f\u6a21\u7ea6\u51cf\u3001\u6a21\u9006\u5143\u7b97\u6cd5\u8fdb\u4e00\u6b65\u63d0\u9ad8\u6027\u80fd\u3002\u6d4b\u8bd5\u7ed3\u679c\u8868\u660e\uff0c\u5728\u4e0d\u540c\u7684\u6d4b\u8bd5\u5de5\u5177\u548c\u6d4b\u8bd5\u573a\u666f\u4e0b\uff0c",(0,n.jsx)(e.strong,{children:"\u5f00\u542f\u4e8664\u4f4d\u5e73\u53f0\u4f18\u5316\u7684SM2\u6570\u5b57\u7b7e\u540d\u7b97\u6cd5\uff0c\u5176\u7b7e\u540d\u6027\u80fd\u8f83\u57fa\u7ebf\u7248\u672c\u63d0\u9ad8\u7ea6241%-286%\uff0c\u9a8c\u7b7e\u6027\u80fd\u63d0\u9ad8\u7ea674%-97%\uff0c\u5bc6\u94a5\u5bf9\u751f\u6210\u6027\u80fd\u63d0\u9ad8269%\uff0c\u5cf0\u503c\u6027\u80fd\u5206\u522b\u53ef\u8fbe\u7ea62.3\u4e07\u6b21/\u79d2\u3001\u7ea61.2\u4e07\u6b21/\u79d2\u548c\u7ea62.05\u4e07\u6b21/\u79d2\u3002"})]}),"\n",(0,n.jsx)(e.h2,{id:"\u4f18\u5316\u6280\u672f\u8def\u7ebf\u5206\u6790\u4e0e\u8bbe\u8ba1",children:"\u4f18\u5316\u6280\u672f\u8def\u7ebf\u5206\u6790\u4e0e\u8bbe\u8ba1"}),"\n",(0,n.jsx)(e.p,{children:"\u4f5c\u4e3a\u692d\u5706\u66f2\u7ebf\u975e\u5bf9\u79f0\u52a0\u5bc6\u7b97\u6cd5\u7684\u4e00\u7c7b\uff0cSM2\u7b97\u6cd5\u5728\u8ba1\u7b97\u6570\u5b57\u7b7e\u540d\u65f6\u6240\u6267\u884c\u7684\u64cd\u4f5c\u4e0e\u5176\u4ed6\u692d\u5706\u66f2\u7ebf\u7c7b\u4f3c\uff0c\u4e3b\u8981\u6d89\u53ca\u6709\u9650\u57df\u8fd0\u7b97\u3001\u692d\u5706\u66f2\u7ebf\u8fd0\u7b97\u548c\u6570\u5b57\u7b7e\u540d\u8fd0\u7b97\u4e09\u5927\u7c7b\u8ba1\u7b97\u64cd\u4f5c\uff0c\u4e09\u7c7b\u64cd\u4f5c\u4e4b\u95f4\u81ea\u5e95\u5411\u4e0a\u5f62\u6210\u5c42\u7ea7\u8c03\u7528\u5173\u7cfb\u3002\u7ecf\u8fc7\u62bd\u8c61\u7b97\u6cd5\u7ed3\u6784\u548c\u7b5b\u9
1009\u4e3b\u8981\u8fd0\u7b97\u540e\uff0c\u6211\u4eec\u7ed8\u5236\u51fa\u5982\u56fe1\u6240\u793a\u7684\u6838\u5fc3\u8fd0\u7b97\u5c42\u6b21\u56fe\uff1a"}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.img,{alt:"image.png",src:a(4383).A+"",width:"1018",height:"680"}),"\n\u56fe1\uff1aSM2\u6570\u5b57\u7b7e\u540d\u7b97\u6cd5\u6838\u5fc3\u8fd0\u7b97\u5c42\u6b21\u56fe"]}),"\n",(0,n.jsxs)(e.p,{children:["\u82e5\u8981\u7740\u624b\u5b9e\u73b0SM2\u6027\u80fd\u4f18\u5316\uff0c\u5176\u5173\u952e\u5728\u4e8e\u5982\u4f55\u63d0\u5347\u56fe1\u6240\u793a\u7684\u6838\u5fc3\u8fd0\u7b97\u7684\u8ba1\u7b97\u6548\u7387\u3002\u7531\u4e8e\u6570\u5b57\u7b7e\u540d\u7684\u5177\u4f53\u6b65\u9aa4\u7531\u56fd\u5bc6\u6807\u51c6\u5b9a\u4e49\uff0c\u53ef\u4f18\u5316\u7684\u6f5c\u529b\u4e0d\u5927\uff0c\u56e0\u6b64\u6211\u4eec\u9996\u5148\u5206\u6790\u4e86\u94dc\u9501\u4e2d\u4e0eSM2\u76f8\u5173\u7684\u692d\u5706\u66f2\u7ebf\u548c\u6709\u9650\u57df\u8fd0\u7b97\u6e90\u7801\u3002\u5728\u94dc\u9501\u4e2d\uff0c\u4e0e\u4e0a\u8ff0\u8fd0\u7b97\u76f8\u5173\u7684\u5404\u7c7b\u51fd\u6570\u4ee5\u51fd\u6570\u6307\u9488\u7684\u5f62\u5f0f\u5c01\u88c5\u5728",(0,n.jsx)(e.code,{children:"EC_method"}),"\u7ed3\u6784\u4f53\u4e2d\uff0c\u6839\u636e\u66f2\u7ebf\u548c\u4f18\u5316\u65b9\u5f0f\u4e0d\u540c\uff0c\u51fd\u6570\u6307\u9488\u6307\u5411\u7684\u5177\u4f53\u51fd\u6570\u4e5f\u6709\u5dee\u5f02\u3002SM2\u4e0e\u5927\u591a\u6570\u66f2\u7ebf\u7c7b\u4f3c\uff0c\u91c7\u7528\u901a\u7528\u7684\u57fa\u4e8e",(0,n.jsx)(e.strong,{children:"\u8499\u54e5\u9a6c\u5229\u6a21\u4e58\u6cd5"}),"\u4f18\u5316\u7d20\u6570\u57df\u8fd0\u7b97\u7684\u65b9\u5f0f\uff0c\u76f8\u5173\u51fd\u6570\u5c01\u88c5\u5728\u7ed3\u6784\u4f53",(0,n.jsx)(e.code,{children:"mont_method"}),"\u4e2d\u3002\n\u8499\u54e5\u9a6c\u5229\u6a21\u4e58\u6cd5\u663e\u8457\u63d0\u5347\u4e86\u5404\u7c7b\u66f2\u7ebf\u7684\u6027\u80fd\uff0c\u4f46\u7531\u4e8e\u73b0\u6709\u4ee3\u7801\u4e2d\u7ed9\u51fa\u7684\u662f\u901a\u7528\u5b9e\u73b0\uff0c\u6545\u800c\u4ecd\u6709\u53ef\u6316\u6398\u7684\u6027\u80fd\u4f18\u5316\u7a7a\u95f4\u3002\u4e8b\u5b9e\u4e0a\uff0cOpenSSL\u9488\u5bf9\u90e8\u5206\u4f7f\u7528\u9891\u7387\u9ad8\u3001\u5e94\u7528\u8303\u56f4\u5e7f\u7684\u692d\u5706\u66f2\u7ebf\uff08nistp224\u3001nistp256\u3001nistp521\u66f2\u7ebf\uff09\uff0c\u572864\u4f4d\u5e73\u53f0\u4e0a\u76f8\u5e94\u5b9e\u73b0\u4e86\u4f18\u5316\u529f\u80fd\uff0c\u53d6\u5f97\u4e86\u5f88\u597d\u7684\u4f18\u5316\u6548\u679c\uff08\u6839\u636e\u66f2\u7ebf\u4e0d\u540c\uff0c\u5927\u7ea6\u670950%-200%\u7684\u6027\u80fd\u63d0\u5347\uff09\u3002\u63a8\u800c\u5e7f\u4e4b\uff0c\u53ef\u4ee5\u8ba4\u4e3aSM2\u66f2\u7ebf\u4e5f\u5b58\u5728\u7c7b\u4f3c\u7684\u4f18\u5316\u6f5c\u529b\u3002\u5728\u5145\u5206\u9605\u8bfbNIST\u66f2\u7ebf\u4f18\u5316\u6e90\u7801\u548cSM2\u73b0\u6709\u4ee3\u7801\u540e\uff0c\u6211\u4eec\u6c47\u603b\u4e86\u4e00\u4e9b\u6709\u8f83\u5927\u6f5c\u529b\u7684\u6027\u80fd\u4f18\u5316\u70b9\uff0c\u81ea\u9876\u5411\u4e0b\u5206\u522b\u662f\uff1a"]}),"\n",(0,n.jsxs)(e.ol,{children:["\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:"\u91c7\u7528\u9884\u8ba1\u7b97\u4f18\u5316\u692d\u5706\u66f2\u7ebf\u591a\u500d\u70b9\u8fd0\u7b97\u3002"})," \u591a\u500d\u70b9\u8fd0\u7b97\u53ef\u4ee5\u5206\u4e3a\u4e24\u7c7b\uff1a\u57fa\u4e8e\u56fa\u5b9a\u57fa\u70b9 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"G"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"G"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6833em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"G"})]})})]})," \u7684\u57fa\u70b9\u4e58\u6cd5\u8fd0\u7b97\u548c\u57fa\u4e8e\u4efb\u610f\u66f2\u7ebf\u70b9 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"P"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"P"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6833em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.13889em"},children:"P"})]})})]})," \u7684\u70b9\u4e58\u8fd0\u7b97\uff0c\u5176\u672c\u8d28\u90fd\u662f\u4e00\u4e2a256\u4f4d\u5927\u6574\u6570 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"k"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"k"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03148em"},children:"k"})]})})]})," \u4e0e\u692d\u5706\u66f2\u7ebf\u70b9\u505a\u6807\u91cf\u4e58\u6cd5\u7684\u8fc7\u7a0b\u3002","\n",(0,n.jsxs)(e.ol,{children:["\n",(0,n.jsxs)(e.li,{children:["\u9488\u5bf9",(0,n.jsx)(e.strong,{children:"\u70b9\u4e58\u8fd0\u7b97"}),"\uff0c\u53ef\u4ee5\u9884\u8ba1\u7b97\u5c0f\u6574\u6570\uff08\u4f8b\u59820\uff0c1\uff0c2\uff0c\u2026\u2026\uff09\u4e0e\u70b9 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"P"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"P"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6833em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.13889em"},children:"P"})]})})]})," \u505a\u70b9\u4e58\u7684\u7ed3\u679c\uff0c\u7136\u540e\u5c06\u5927\u6574\u6570 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"k"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"k"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03148em"},children:"k"})]})})]})," \u5212\u5206\u4e3a\u7b49\u957f\u7684 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"n"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"n"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.4306em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"n"})]})})]})," \u6bb5\u6570\uff0c\u6bcf\u4e00\u6bb5\u6570\u7684\u503c\u90fd\u843d\u5728\u9884\u8ba1\u7b97\u7ed3\u679c\u5185\uff0c\u518d\u901a\u8fc7\u79fb\u4f4d\u548c\u70b9\u52a0\u6cd5\u8fd0\u7b97\u7ec4\u5408\u5f97\u5230\u6700\u7ec8\u8fd0\u7b97\u7ed3\u679c\u3002"]}),"\n",(0,n.jsxs)(e.li,{children:["\u9488\u5bf9",(0,n.jsx)(e.strong,{children:"\u57fa\u70b9\u4e58\u8fd0\u7b97"}),"\uff0c\u7531\u4e8e\u692d\u5706\u66f2\u7ebf\u70b9 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"G"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"G"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6833em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"G"})]})})]})," \u662f\u56fa\u5b9a\u4e0d\u53d8\u7684\uff0c\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u6269\u5927\u9884\u8ba1\u7b97\u7684\u89c4\u6a21\uff0c\u5e76\u5c06\u9884\u8ba1\u7b97\u7ed3\u679c\u4ee5\u9884\u8ba1\u7b97\u8868\u7684\u5f62\u5f0f\u5199\u5165\u5230\u6e90\u4ee3\u7801\u4e2d\uff0c\u5728\u8fd0\u7b97\u65f6\u67e5\u8868\u5373\u53ef\u83b7\u5f97\u9884\u8ba1\u7b97\u503c\uff0c\u4ee5\u83b7\u5f97\u66f4\u597d\u7684\u6027\u80fd\u63d0\u5347\u6548\u679c\u3002\uff08\u4e8b\u5b9e\u4e0a\uff0c\u8fd9\u4e5f\u662f\u6700\u540e\u7b7e\u540d\u8ba1\u7b97\u7684\u6027\u80fd\u63d0\u5347\u6c34\u5e73\u663e\u8457\u9ad8\u4e8e\u9a8c\u7b7e\u8ba1\u7b97\u7684\u4e3b\u8981\u539f\u56e0\u3002\uff09"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:"\u5b9e\u73b0SM2\u66f2\u7ebf\u53c2\u6570\u7279\u5316\u7684\u5feb\u901f\u6a21\u7ea6\u51cf\u3001\u6a21\u9006\u5143\u7b97\u6cd5\u3002"})," \u6a21\u7ea6\u51cf\u662f\u6709\u9650\u57df\u8fd0\u7b97\u4e2d\u5c06\u8fd0\u7b97\u4e2d\u95f4\u503c\u7ea6\u5316\u5230\u6709\u9650\u57df\u5185\u7684\u8fc7\u7a0b\uff0c\u5728\u8fd0\u7b97\u4e2d\u51fa\u73b0\u9891\u7387\u6781\u9ad8\uff0c\u800c\u6a21\u9006\u5143\u5219\u662f\u6709\u9650\u57df\u8fd0\u7b97\u4e2d\u8017\u65f6\u6700\u5927\u7684\u8fd0\u7b97\u3002\u5728GM/T 0003.5-2012\u7ed9\u5b9a\u7684SM2\u66f2\u7ebf\u63a8\u8350\u53c2\u6570\u4e2d\uff0c\u7d20\u6570 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"p"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"p"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.625em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"})]})})]})," \u4e3a\u5e7f\u4e49\u6885\u68ee\u7d20\u6570\uff0c\u8868\u793a\u4e3a ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsxs)(e.msub,{children:[(0,n.jsx)(e.mi,{children:"p"}),(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{children:"s"}),(0,n.jsx)(e.mi,{children:"m"}),(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mi,{children:"p"}),(0,n.jsx)(e.mn,{children:"256"})]})]}),(0,n.jsx)(e.mo,{children:"="}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"256"})]}),(0,n.jsx)(e.mo,{children:"\u2212"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"224"})]}),(0,n.jsx)(e.mo,{children:"\u2212"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"96"})]}),(0,n.jsx)(e.mo,{children:"+"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"64"})]}),(0,n.jsx)(e.mo,{children:"\u2212"}),(0,n.jsx)(e.mn,{children:"1"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"p_{sm2p256} = 2^{256}
1 \u2212 2^{224} - 2^{96} + 2^{64} - 1"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.7167em",verticalAlign:"-0.2861em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,n.jsxs)(e.span,{className:"vlist-r",children:[(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.3011em"},children:(0,n.jsxs)(e.span,{style:{top:"-2.55em",marginLeft:"0em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsxs)(e.span,{className:"mord mtight",children:[(0,n.jsx)(e.span,{className:"mord mathnormal mtight",children:"s"}),(0,n.jsx)(e.span,{className:"mord mathnormal mtight",children:"m"}),(0,n.jsx)(e.span,{className:"mord mtight",children:"2"}),(0,n.jsx)(e.span,{className:"mord mathnormal mtight",children:"p"}),(0,n.jsx)(e.span,{className:"mord mtight",children:"256"})]})})]})}),(0,n.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.2861em"},children:(0,n.jsx)(e.span,{})})})]})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,n.jsx)(e.span,{className:"mrel",children:"="}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8974em",verticalAlign:"-0.0833em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"},children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"256"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2212"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8974em",verticalAlign:"-0.0833em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"},children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"224"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2212"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8974em",verticalAlign:"-0.0833em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"},children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"96"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"+"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8974em",verticalAlign:"-0.0833em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"}
1,children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"64"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2212"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6444em"}}),(0,n.jsx)(e.span,{className:"mord",children:"1"})]})]})]})," \u3002\u5229\u7528\u5e7f\u4e49\u6885\u68ee\u7d20\u6570\u7684\u6027\u8d28\uff0c\u53ef\u4ee5\u5b9e\u73b0\u9488\u5bf9 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsxs)(e.msub,{children:[(0,n.jsx)(e.mi,{children:"p"}),(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{children:"s"}),(0,n.jsx)(e.mi,{children:"m"}),(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mi,{children:"p"}),(0,n.jsx)(e.mn,{children:"256"})]})]})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"p_{sm2p256}"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.7167em",verticalAlign:"-0.2861em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,n.jsxs)(e.span,{className:"vlist-r",children:[(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.3011em"},children:(0,n.jsxs)(e.span,{style:{top:"-2.55em",marginLeft:"0em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsxs)(e.span,{className:"mord mtight",children:[(0,n.jsx)(e.span,{className:"mord mathnormal mtight",children:"s"}),(0,n.jsx)(e.span,{className:"mord mathnormal mtight",children:"m"}),(0,n.jsx)(e.span,{className:"mord mtight",children:"2"}),(0,n.jsx)(e.span,{className:"mord mathnormal mtight",children:"p"}),(0,n.jsx)(e.span,{className:"mord mtight",children:"256"})]})})]})}),(0,n.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.2861em"},children:(0,n.jsx)(e.span,{})})})]})})]})]})})]})," \u7279\u5316\u7684\u5feb\u901f\u6a21\u7ea6\u51cf\u3001\u6a21\u9006\u5143\u7b97\u6cd5\uff0c\u4ece\u800c\u63d0\u9ad8\u6a21\u7ea6\u51cf\u548c\u6a21\u9006\u5143\u7684\u901f\u5ea6\u3002"]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:"\u8fd0\u7528128\u4f4d\u6574\u6570\u7c7b\u578b\u4f18\u5316\u5e95\u5c42\u6570\u636e\u7ed3\u6784\u3002"})," \u6709\u9650\u57df\u8fd0\u7b97\u7684\u53c2\u4e0e\u5bf9\u8c61\u90fd\u662f256\u4f4d\u7684\u5927\u6574\u6570\uff0c\u8d85\u8fc7\u4e86\u6240\u6709\u6574\u6570\u7c7b\u578b\u7684\u4e0a\u9650\u3002\u5728\u94dc\u9501\u4e2d\uff0c\u4ee3\u8868\u5927\u6574\u6570\u7684\u7ed3\u6784\u4f53",(0,n.jsx)(e.code,{children:"BIGNUM"}),"\u572864\u4f4d\u5e73\u53f0\u4e0a\u4f7f\u75284\u4e2a64\u4f4d\u65e0\u7b26\u53f7\u6574\u6570\u4f5c\u4e3a\u6570\u636e\u5355\u5143\u3002\u8fd9\u6837\u5e26\u6765\u7684\u4e00\u4e2a\u95ee\u9898\u662f\u4e0d\u540c\u6570\u636e\u5355\u5143\u8fd0\u7b97\u65f6\u7684\u8fdb\u4f4d\u501f\u4f4d\u975e\u5e38\u590d\u6742\uff0c\u5728\u4e58\u6cd5/\u5e73\u65b9\u8ba1\u7b97\u65f6\u8fd8\u9700\u8981\u5904\u7406\u6574\u5f62\u6ea2\u51fa\u7684\u95ee\u9898\u3002\u5982\u679c\u5c06\u5e95\u5c42\u6570\u636e\u7ed3\u6784\u66ff\u6362\u4e3a4\u4e2a128\u4f4d\u65e0\u7b26\u53f7\u6574\u6570\uff0c\u5728\u8fd0\u7b97\u65f6\u4f7f\u7528128\u4f4d\u6574\u6570\u7684\u9ad864\u4f4d\u201c\u6682\u5b58\u201d\u8fd0\u7b97\u65f6\u4ea7\u751f\u7684\u8fdb\u4f4d\u4e0e\u501f\u4f4d\uff0c\u76f4\u81f3\u6240\u6709\u8fd0\u7b97\u5b8c\u6210\u540e\u518d\u5c06\u201c\u6682\u5b58\u201d\u7684\u7ed3\u679c\u89c4\u7ea6\u5230\u9ad8\u4f4d\u6570\u636e\u5355\u5143\uff0c\u4e0d\u4ec5\u5927\u5927\u7b80\u5316\u4e86\u8ba1\u7b97\u5b9e\u73b0\u8fc7\u7a0b\uff0c\u4e5f\u80fd\u591f\u63d0\u5347\u6709\u9650\u57df\u8fd0\u7b97\u7684\u6548\u7387\u3002"]}),"\n"]}),"\n",(0,n.jsxs)(e.p,{children:["\u5728\u7740\u624b\u4f18\u5316\u524d\uff0c\u53e6\u4e00\u4e2a\u5fc5\u987b\u91cd\u89c6\u7684\u6027\u8d28\u662f\u4f18\u5316\u4ee3\u7801\u7684",(0,n.jsx)(e.strong,{children:"\u6297\u4fa7\u4fe1\u9053\u653b\u51fb\u6027"}),"\u3002\u4fa7\u4fe1\u9053\u653b\u51fb\u57fa\u4e8e\u4ece\u5bc6\u7801\u7cfb\u7edf\u7684\u7269\u7406\u5b9e\u73b0\uff08\u4f8b\u5982\uff1a\u65f6\u95f4\u4fe1\u606f\uff09\u4e2d\u83b7\u53d6\u7684\u4fe1\u606f\u5bf9\u5bc6\u7801\u8fdb\u884c\u653b\u51fb\u4e0e\u7834\u8bd1\u3002\u5728\u524d\u8ff0\u6027\u80fd\u4f18\u5316\u7684\u5177\u4f53\u5b9e\u73b0\u8fc7\u7a0b\u4e2d\uff0c\u5b58\u5728\u4ee5\u4e0b\u4e24\u4e2a\u53ef\u80fd\u7684\u4fe1\u606f\u6cc4\u6f0f\u70b9\uff1a"]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:"\u5206\u652f\uff1a"})," \u4ee3\u7801\u4e2d\u4e0d\u540c\u5206\u652f\u7684\u6267\u884c\u65f6\u95f4\u4e0d\u540c\uff0c\u53ef\u80fd\u4f1a\u9020\u6210\u65f6\u95f4\u4fe1\u606f\u7684\u6cc4\u6f0f\u3002\u5373\u4f7f\u7cbe\u5fc3\u8bbe\u8ba1\u4e86\u76f8\u540c\u7684\u5206\u652f\u6267\u884c\u65f6\u95f4\uff0c\u73b0\u4ee3CPU\u7684\u5206\u652f\u9884\u6d4b\u4e5f\u53ef\u80fd\u4f7f\u5b9e\u9645\u6267\u884c\u65f6\u95f4\u5b58\u5728\u5dee\u5f02\u3002\u57df\u8fd0\u7b97\u7684\u8fdb\u4f4d\u3001\u501f\u4f4d\u548c\u6ea2\u51fa\u5904\u7406\u4ee5\u53ca\u70b9\u4e58\u8fd0\u7b97\u65f6\u5b58\u5728\u524d\u5bfc0\u7b49\u60c5\u51b5\u90fd\u53ef\u80fd\u4ea7\u751f\u5206\u652f\u3002"]}),"\n",(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:"\u67e5\u8868\uff1a"})," \u7531\u4e8e\u73b0\u4ee3CPU\u7684\u591a\u7ea7\u5b58\u50a8\u7ed3\u6784\uff0c\u5728\u4e00\u5f20\u8868\u4e2d\u67e5\u8be2\u6570\u636e\u65f6\uff0c\u5bf9\u540c\u4e00\u4e2a\u6570\u636e\u9879\u4e2d\u8fdb\u884c\u591a\u6b21\u67e5\u627e\u7684\u901f\u5ea6\u5f80\u5f80\u6bd4\u67e5\u627e\u591a\u4e2a\u6570\u636e\u9879\u8981\u5feb\uff0c\u8fd9\u4e5f\u4f1a\u4ea7\u751f\u65f6\u95f4\u4fe1\u606f\u6cc4\u6f0f\u3002\u57fa\u70b9\u4e58\u6cd5\u8fc7\u7a0b\u4e2d\u7684\u67e5\u8868\u8fc7\u7a0b\u5c31\u5b58\u5728\u8fd9\u4e2a\u95ee\u9898\u3002"]}),"\n"]}),"\n",(0,n.jsxs)(e.p,{children:["\u6211\u4eec\u4e3b\u8981\u53c2\u8003\u4e86Ope
1nSSL\u4e2dNIST\u66f2\u7ebf\u572864\u4f4d\u5e73\u53f0\u4e0a\u7684\u6297\u4fa7\u4fe1\u9053\u653b\u51fb\u5de5\u4f5c\u7684\u6e90\u7801\u548c",(0,n.jsx)(e.a,{href:"http://link.springer.com/10.1007/978-3-642-29889-9_4",children:"\u8bba\u6587"}),"\uff0c\u5728\u6280\u672f\u9009\u578b\u3001\u4ee3\u7801\u5b9e\u73b0\u7684\u8fc7\u7a0b\u4e2d\u4e0d\u65ad\u5f3a\u5316\u4ee3\u7801\u7684\u6297\u4fa7\u4fe1\u9053\u653b\u51fb\u6027\uff0c",(0,n.jsx)(e.strong,{children:"\u4ee5\u5c3d\u53ef\u80fd\u5c0f\u7684\u6027\u80fd\u4ee3\u4ef7\u6362\u53d6\u6052\u5b9a\u65f6\u95f4\u7684\u51fd\u6570\u5b9e\u73b0\uff0c"})," \u5c3d\u6700\u5927\u52aa\u529b\u907f\u514d\u65f6\u95f4\u4fe1\u606f\u7684\u6cc4\u6f0f\u3002"]}),"\n",(0,n.jsx)(e.h2,{id:"\u5173\u952e\u6280\u672f\u5b9e\u73b0",children:"\u5173\u952e\u6280\u672f\u5b9e\u73b0"}),"\n",(0,n.jsxs)(e.blockquote,{children:["\n",(0,n.jsx)(e.p,{children:"\u672c\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u4f18\u5316\u529f\u80fd\u7684\u5173\u952e\u8282\u70b9\u5b9e\u73b0\u3002\u53d7\u7bc7\u5e45\u6240\u9650\uff0c\u5feb\u901f\u6a21\u7ea6\u51cf\u3001\u6a21\u9006\u5143\u51fd\u6570\u7684\u6280\u672f\u9009\u578b\u3001\u7b97\u6cd5\u63a8\u5bfc\u7684\u7ec6\u8282\u65e0\u6cd5\u5728\u672c\u6587\u4e2d\u5c55\u73b0\uff0c\u540e\u7eed\u4f1a\u5355\u72ec\u64b0\u6587\u8be6\u7ec6\u4ecb\u7ecd\u3002"}),"\n"]}),"\n",(0,n.jsx)(e.h3,{id:"64-bit-\u5e73\u53f0\u4f18\u5316",children:"64-bit \u5e73\u53f0\u4f18\u5316"}),"\n",(0,n.jsxs)(e.p,{children:["\u672c\u8282\u4e3b\u8981\u4ecb\u7ecd\u7b2c\u4e8c\u7ae0\u4e2d\u5f52\u7eb3\u5f97\u51fa\u7684\u6027\u80fd\u4f18\u5316\u70b9",(0,n.jsx)(e.strong,{children:"1\u30013"}),"\u7684\u5177\u4f53\u5b9e\u73b0\u8fc7\u7a0b\u3002\u53c2\u7167\u81ea\u5e95\u5411\u4e0a\u7684\u89c4\u5219\uff0c\u6211\u4eec\u9996\u5148\u4ecb\u7ecd\u4f7f\u7528128\u4f4d\u6574\u6570\u7c7b\u578b\u4f18\u5316\u540e\u7684\u5e95\u5c42\u6570\u636e\u7ed3\u6784\uff1a"]}),"\n",(0,n.jsx)(e.pre,{children:(0,n.jsx)(e.code,{className:"language-c",children:"#define NLIMBS 4\n\ntypedef uint128_t limb;\ntypedef limb felem[NLIMBS];\ntypedef limb longfelem[NLIMBS * 2];\ntypedef u64 smallfelem[NLIMBS];\n"})}),"\n",(0,n.jsxs)(e.p,{children:["\u8fd9\u91cc\u79f0\u4e00\u4e2a128\u4f4d\u65e0\u7b26\u53f7\u6574\u6570\u6784\u6210\u7684\u6570\u636e\u5355\u5143\u4e3a",(0,n.jsx)(e.code,{children:"limb"}),"\u3002\u57fa\u4e8e",(0,n.jsx)(e.code,{children:"limb"}),"\uff0c\u6211\u4eec\u53ef\u4ee5\u6784\u9020\u4e24\u7c7b\u4fdd\u5b58\u5927\u6574\u6570\u7684\u6570\u636e\u7ed3\u6784",(0,n.jsx)(e.code,{children:"felem"}),"\u548c",(0,n.jsx)(e.code,{children:"longfelem"}),"\u3002",(0,n.jsx)(e.code,{children:"felem"}),"\u8d1f\u8d23\u8868\u793a\u5728\u6709\u9650\u57df\u5185\u7684\u5927\u6574\u6570\uff0c\u800c",(0,n.jsx)(e.code,{children:"longfelem"}),"\u627f\u62c5\u50a8\u5b58\u8fd0\u7b97\u4e2d\u95f4\u503c\uff08\u4f8b\u5982\uff0c\u56e0\u672a\u7ea6\u5316\u800c\u8d85\u51fa",(0,n.jsx)(e.code,{children:"felem"}),"\u8868\u793a\u8303\u56f4\u7684\u6a21\u5e73\u65b9\u3001\u6a21\u4e58\u503c\uff09\u7684\u89d2\u8272\u3002\u4e8c\u8005\u4e0e\u5927\u6574\u6570\u771f\u5b9e\u503c\u7684\u5bf9\u5e94\u5173\u7cfb\u5982\u4e0b\uff1a"]}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.code,{children:"felem"}),"\uff1a ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mo,{stretchy:"false",children:"("}),(0,n.jsx)(e.mi,{children:"v"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"["}),(0,n.jsx)(e.mn,{children:"0"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"]"}),(0,n.jsx)(e.mo,{children:"\u2217"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"0"})]}),(0,n.jsx)(e.mo,{children:"+"}),(0,n.jsx)(e.mi,{children:"v"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"["}),(0,n.jsx)(e.mn,{children:"1"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"]"}),(0,n.jsx)(e.mo,{children:"\u2217"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"64"})]}),(0,n.jsx)(e.mo,{children:"+"}),(0,n.jsx)(e.mi,{children:"v"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"["}),(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"]"}),(0,n.jsx)(e.mo,{children:"\u2217"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"128"})]}),(0,n.jsx)(e.mo,{children:"+"}),(0,n.jsx)(e.mi,{children:"v"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"["}),(0,n.jsx)(e.mn,{children:"3"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"]"}),(0,n.jsx)(e.mo,{children:"\u2217"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"192"})]}),(0,n.jsx)(e.mo,{stretchy:"false",children:")"}),(0,n.jsx)(e.mspace,{}),(0,n.jsx)(e.mspace,{width:"0.6667em"}),(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{mathvariant:"normal",children:"m"}),(0,n.jsx)(e.mi,{mathvariant:"normal",children:"o"}),(0,n.jsx)(e.mi,{mathvariant:"normal",children:"d"})]}),(0,n.jsx)(e.mtext,{children:"\u2009"}),(0,n.jsx)(e.mtext,{children:"\u2009"}),(0,n.jsx)(e.mi,{children:"p"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"(v[0]*2^0 + v[1]*2^{64} + v[2]*2^{128} + v[3]*2^{192})  \\mod p"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mopen",children:"("}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"v"}),(0,n.jsx)(e.span,{className:"mopen",children:"["}),(0,n.jsx)(e.span,{className:"mord",children:"0"}),(0,n.jsx)(e.span,{className:"mclose",children:"]"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2217"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8974em",verticalAlign:"-0.0833em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"}
1,children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"0"})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"+"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"v"}),(0,n.jsx)(e.span,{className:"mopen",children:"["}),(0,n.jsx)(e.span,{className:"mord",children:"1"}),(0,n.jsx)(e.span,{className:"mclose",children:"]"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2217"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8974em",verticalAlign:"-0.0833em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"},children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"64"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"+"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"v"}),(0,n.jsx)(e.span,{className:"mopen",children:"["}),(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"mclose",children:"]"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2217"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8974em",verticalAlign:"-0.0833em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"},children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"128"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"+"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"v"}),(0,n.jsx)(e.span,{className:"mopen",children:"["}),(0,n.jsx)(e.span,{className:"mord",children:"3"}),(0,n.jsx)(e.span,{className:"mclose",children:"]"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2217"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1.064
11em",verticalAlign:"-0.25em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"},children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"192"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mclose",children:")"}),(0,n.jsx)(e.span,{className:"mspace allowbreak"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.6667em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8889em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord",children:(0,n.jsx)(e.span,{className:"mord",children:(0,n.jsx)(e.span,{className:"mord mathrm",children:"mod"})})}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.1667em"}}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.1667em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"})]})]})]})]}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.code,{children:"longfelem"}),"\uff1a ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mo,{stretchy:"false",children:"("}),(0,n.jsx)(e.mi,{children:"v"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"["}),(0,n.jsx)(e.mn,{children:"0"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"]"}),(0,n.jsx)(e.mo,{children:"\u2217"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"0"})]}),(0,n.jsx)(e.mo,{children:"+"}),(0,n.jsx)(e.mi,{children:"v"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"["}),(0,n.jsx)(e.mn,{children:"1"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"]"}),(0,n.jsx)(e.mo,{children:"\u2217"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"64"})]}),(0,n.jsx)(e.mo,{children:"+"}),(0,n.jsx)(e.mi,{children:"v"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"["}),(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"]"}),(0,n.jsx)(e.mo,{children:"\u2217"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"128"})]}),(0,n.jsx)(e.mo,{children:"+"}),(0,n.jsx)(e.mi,{mathvariant:"normal",children:"."}),(0,n.jsx)(e.mi,{mathvariant:"normal",children:"."}),(0,n.jsx)(e.mi,{mathvariant:"normal",children:"."}),(0,n.jsx)(e.mo,{children:"+"}),(0,n.jsx)(e.mi,{children:"v"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"["}),(0,n.jsx)(e.mn,{children:"7"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"]"}),(0,n.jsx)(e.mo,{children:"\u2217"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"448"})]}),(0,n.jsx)(e.mo,{stretchy:"false",children:")"}),(0,n.jsx)(e.mspace,{}),(0,n.jsx)(e.mspace,{width:"0.6667em"}),(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{mathvariant:"normal",children:"m"}),(0,n.jsx)(e.mi,{mathvariant:"normal",children:"o"}),(0,n.jsx)(e.mi,{mathvariant:"normal",children:"d"})]}),(0,n.jsx)(e.mtext,{children:"\u2009"}),(0,n.jsx)(e.mtext,{children:"\u2009"}),(0,n.jsx)(e.mi,{children:"p"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"(v[0]*2^0 + v[1]*2^{64} + v[2]*2^{128} + ... + v[7]*2^{448})  \\mod p"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mopen",children:"("}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"v"}),(0,n.jsx)(e.span,{className:"mopen",children:"["}),(0,n.jsx)(e.span,{className:"mord",children:"0"}),(0,n.jsx)(e.span,{className:"mclose",children:"]"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2217"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8974em",verticalAlign:"-0.0833em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"}
1,children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"0"})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"+"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"v"}),(0,n.jsx)(e.span,{className:"mopen",children:"["}),(0,n.jsx)(e.span,{className:"mord",children:"1"}),(0,n.jsx)(e.span,{className:"mclose",children:"]"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2217"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8974em",verticalAlign:"-0.0833em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"},children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"64"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"+"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"v"}),(0,n.jsx)(e.span,{className:"mopen",children:"["}),(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"mclose",children:"]"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2217"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8974em",verticalAlign:"-0.0833em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"},children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"128"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"+"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6667em",verticalAlign:"-0.0833em"}}),(0,n.jsx)(e.span,{className:"mord",children:"..."}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"+"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"v"}),(0,n.jsx)(e.span,{className:"mopen",children:"["}),(0,n.jsx)(e.span,{className:"mord",children:"7"}),(0,n.jsx)(e.span,{className:"mclose",children:"]"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2217"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1.064
11em",verticalAlign:"-0.25em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"},children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"448"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mclose",children:")"}),(0,n.jsx)(e.span,{className:"mspace allowbreak"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.6667em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8889em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord",children:(0,n.jsx)(e.span,{className:"mord",children:(0,n.jsx)(e.span,{className:"mord mathrm",children:"mod"})})}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.1667em"}}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.1667em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"})]})]})]})]}),"\n",(0,n.jsxs)(e.p,{children:["\u6362\u53e5\u8bdd\u8bf4\uff0c\u5927\u6574\u6570\u4ee564bit\u4e3a\u5206\u5272\u5355\u5143\uff0c\u81ea\u4f4e\u5230\u9ad8\u586b\u5165",(0,n.jsx)(e.code,{children:"felem"}),"\u548c",(0,n.jsx)(e.code,{children:"longfelem"}),"\u7ed3\u6784\u4f53\u4e2d\u3002\u53ef\u4ee5\u6ce8\u610f\u5230\uff0c\u5bf9\u4e8e",(0,n.jsx)(e.code,{children:"felem"}),"\u548c",(0,n.jsx)(e.code,{children:"longfelem"}),"\u4e2d\u7684\u6bcf\u4e00\u4e2a",(0,n.jsx)(e.code,{children:"limb"}),"\uff0c\u5176\u9ad864\u4f4d\u662f\u7a7a\u7f6e\u7684\uff0c\u56e0\u6b64\u6211\u4eec\u4e0d\u59a8\u5c06\u5f53\u524d",(0,n.jsx)(e.code,{children:"limb"}),"\u7684\u9ad864\u4f4d\u4e0e\u4e0b\u4e00\u4e2a",(0,n.jsx)(e.code,{children:"limb"}),"\u7684\u4f4e64\u4f4d\u201c\u91cd\u53e0\u201d\uff0c\u7531\u9ad864\u4f4d\u201c\u6682\u5b58\u201d\u5728\u6709\u9650\u57df\u8fd0\u7b97\u4e2d\u4ea7\u751f\u7684\u8fdb\u4f4d\u6216\u501f\u4f4d\uff0c\u76f4\u5230\u6240\u6709\u8fd0\u7b97\u7ed3\u675f\u540e\u518d\u7ea6\u5316\u5230\u4e0b\u4e00\u4e2a",(0,n.jsx)(e.code,{children:"limb"}),"\u4e0a\uff0c\u6700\u7ec8\u5f97\u5230\u75314\u4e2au64\u7ec4\u6210\u7684",(0,n.jsx)(e.code,{children:"smallfelem"}),"\u3002\n\u5728\u5e95\u5c42\u6570\u636e\u7ed3\u6784\u4e4b\u4e0a\uff0c\u6211\u4eec\u9700\u8981\u5b9e\u73b0\u6709\u9650\u57df\u7684\u57fa\u7840\u8fd0\u7b97\u3002\u8fd9\u91cc\u6211\u4eec\u4e3b\u8981\u53c2\u8003\u4e86nistp256\u7684\u6709\u9650\u57df\u8fd0\u7b97\u6e90\u7801\uff0c\u6839\u636eSM2\u66f2\u7ebf\u53c2\u6570\u7684\u7279\u6027\u8c03\u6574\u4e86\u90e8\u5206\u529f\u80fd\u5b9e\u73b0\u3002\u5728\u7b2c2\u7ae0\u4e2d\u6211\u4eec\u63d0\u5230\uff0c",(0,n.jsx)(e.strong,{children:"\u6709\u9650\u57df\u8fd0\u7b97\u65f6\u56e0\u5904\u7406\u8fdb\u4f4d\u3001\u501f\u4f4d\u548c\u6ea2\u51fa\u65f6\u53ef\u80fd\u56e0\u4ee3\u7801\u5206\u652f\u800c\u4ea7\u751f\u4fa7\u4fe1\u9053\u653b\u51fb\u95ee\u9898\u3002"})," \u8fdb\u4f4d\u501f\u4f4d\u95ee\u9898\u7ecf\u7531\u524d\u8ff0",(0,n.jsx)(e.code,{children:"limb"}),"\u9ad864\u4f4d\u201c\u6682\u5b58\u201d\u7684\u65b9\u5f0f\u53ef\u4ee5\u89e3\u51b3\uff0c\u4f46\u5728\u6267\u884c\u6a21\u51cf\u6cd5\u7b49\u8fd0\u7b97\u65f6\uff0c\u82e5\u88ab\u51cf\u6570\u5c0f\u4e8e\u51cf\u6570\uff0c\u5219\u4f1a\u4ea7\u751f\u201c\u4e0b\u6ea2\u201d\u73b0\u8c61\uff0c\u5904\u7406\u8d1f\u503c\u65f6\u540c\u6837\u4f1a\u4ea7\u751f\u5206\u652f\u3002\u5bf9\u6b64\uff0c\u6211\u4eec\u5229\u7528\u6a21\u8fd0\u7b97\u7684\u6027\u8d28\uff0c\u5728\u505a\u51cf\u6cd5\u524d\u5728\u4e3a\u88ab\u51cf\u6570\u52a0\u4e0a\u4e00\u4e2a\u7d20\u6570 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"p"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"p"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.625em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"})]})})]})," \u7684\u500d\u6570 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{children:"k"}),(0,n.jsx)(e.mo,{children:"\u2217"}),(0,n.jsx)(e.mi,{children:"p"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"k *p"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03148em"},children:"k"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2217"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.625em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"})]})]})]})," \uff0c\u5728\u4fdd\u8bc1\u88ab\u51cf\u6570\u59cb\u7ec8\u5927\u4e8e\u51cf\u6570\u7684\u540c\u65f6\uff0c\u4e5f\u7531\u4e8e ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mo,{stretchy:"false",children:"("}),(0,n.jsx)(e.mi,{children:"k"}),(0,n.jsx)(e.mo,{children:"\u2217"}),(0,n.jsx)(e.mi,{children:"p"}),(0,n.jsx)(e.mo,{stretchy:"false",children:")"}),(0,n.jsx)(e.mspace,{}),(0,n.jsx)(e.mspace,{width:"0.6667em"}),(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{mathvariant:"normal",children:"m"}),(0,n.jsx)(e.mi,{mathvariant:"normal",children:"o"}),(0,n.jsx)(e.mi,{mathvariant:"normal",children:"d"})]}),(0,n.jsx)(e.mtext,{children:"\u2009"}),(0,n.jsx)(e.mtext,{children:"\u2009"}),(0,n.jsx)(e.mi,{children:"p"}),(0,n.jsx)(e.mo,{children:"="}),(0,n.jsx)(e.mn,{children:"0"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"(k*p) \\mod p = 0"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mopen",children:"("}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03148em"},children:"k"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2217"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,n.jsx)(e.span,{className:"mclose",children:")"}),(0,n.jsx)(e.span,{className:"mspace allowbreak"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.6667em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8889em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord",children:(0,n.jsx)(e.span,{className:"mord",children:(0,n.jsx)(e.span,{className:"mord mathrm",children:"mod"})})}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.1667em"}}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.1667em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,n.jsx)(e.span,{className:"mrel",children:"="}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6444em"}}),(0,n.jsx)(e.span,{className:"mord",children:"0"})]})]})]})," \uff0c\u56e0\u6b64\u4e0d\u4f1a\u5bf9\u6700\u7ec8\u8fd0\u7b97\u7ed3\u679c\u4ea7\u751f\u5f71\u54cd\u3002\u4ee5\u4e0b\u8ff0\u4ee3\u7801\u4e3a\u4f8b\uff1a"]}),"\n",(0,n.jsx)(e.pre,{children:(0,n.jsx)(e.code,{className:"language-c",children:"static void felem_diff(felem out, const felem in)\n{\n    /*\n     * In order to prevent underflow, we add 0 mod p before subtracting.\n     */\n    out[0] += zero105[0];\n    out[1] += zero105[1];\n    out[2] += zero105[2];\n    out[3] += zero105[3];\n\n    out[0] -= in[0];\n    out[1] -= in[1];\n    out[2] -= in[2];\n    out[3] -= in[3];\n}\n"})}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.code,{children:"zero105"}),"\u662f\u4e00\u4e2a\u5e38\u6570\uff0c\u5176\u503c\u7b49\u4e8e ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"41"})]}),(0,n.jsx)(e.mo,{children:"\u2217"}),(0,n.jsx)(e.mi,{children:"p"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"2^{41} * p"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8141em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"}
1,children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"41"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2217"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.625em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"})]})]})]})," \u3002\u5728\u505a\u51cf\u6cd5\u524d\uff0c\u5148\u8ba1\u7b97 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{children:"o"}),(0,n.jsx)(e.mi,{children:"u"}),(0,n.jsx)(e.mi,{children:"t"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"["}),(0,n.jsx)(e.mi,{children:"i"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"]"}),(0,n.jsx)(e.mo,{children:"+"}),(0,n.jsx)(e.mo,{children:"="}),(0,n.jsx)(e.mi,{children:"z"}),(0,n.jsx)(e.mi,{children:"e"}),(0,n.jsx)(e.mi,{children:"r"}),(0,n.jsx)(e.mi,{children:"o"}),(0,n.jsx)(e.mn,{children:"105"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"["}),(0,n.jsx)(e.mi,{children:"i"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"]"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"out[i] += zero105[i]"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"o"}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"u"}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,n.jsx)(e.span,{className:"mopen",children:"["}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,n.jsx)(e.span,{className:"mclose",children:"]"}),(0,n.jsx)(e.span,{className:"mord",children:"+"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,n.jsx)(e.span,{className:"mrel",children:"="}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"zero"}),(0,n.jsx)(e.span,{className:"mord",children:"105"}),(0,n.jsx)(e.span,{className:"mopen",children:"["}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,n.jsx)(e.span,{className:"mclose",children:"]"})]})]})]})," \uff0c\u4f7f",(0,n.jsx)(e.code,{children:"out[i]"})," \u6ee1\u8db3 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{children:"o"}),(0,n.jsx)(e.mi,{children:"u"}),(0,n.jsx)(e.mi,{children:"t"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"["}),(0,n.jsx)(e.mi,{children:"i"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"]"}),(0,n.jsx)(e.mo,{children:">"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"105"})]})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"out[i]>2^{105}"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"o"}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"u"}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"t"}),(0,n.jsx)(e.span,{className:"mopen",children:"["}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"i"}),(0,n.jsx)(e.span,{className:"mclose",children:"]"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,n.jsx)(e.span,{className:"mrel",children:">"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8141em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"}
1,children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"105"})})})]})})})})})]})]})]})]})," \u3002\u6211\u4eec\u53ef\u4ee5\u6784\u9020\u4e0d\u540c\u7684\u5e38\u6570",(0,n.jsx)(e.code,{children:"zero*"}),"\uff0c\u4ee5\u6ee1\u8db3\u8f93\u5165\u5927\u5c0f\u4e0d\u540c\u7684\u60c5\u51b5\u3002\n\u63a5\u4e0b\u6765\u7684\u692d\u5706\u66f2\u7ebf\u7fa4\u52a0\u6cd5\u90e8\u5206\uff0c\u7531\u4e8esm2\u66f2\u7ebf\u66f2\u7ebf\u4e0enistp256\u66f2\u7ebf\u5747\u6ee1\u8db3 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{children:"a"}),(0,n.jsx)(e.mo,{children:"="}),(0,n.jsx)(e.mi,{children:"p"}),(0,n.jsx)(e.mo,{children:"\u2212"}),(0,n.jsx)(e.mn,{children:"3"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"a = p -3"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.4306em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,n.jsx)(e.span,{className:"mrel",children:"="}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.7778em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2212"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6444em"}}),(0,n.jsx)(e.span,{className:"mord",children:"3"})]})]})]})," \uff0c\u6545\u800c\u6b64\u5904\u6211\u4eec\u9009\u7528\u4e86\u4e0enistp256\u4e00\u81f4\u7684\u7b97\u6cd5\uff0c\u8be5\u7b97\u6cd5\u7531\u8457\u540d\u5bc6\u7801\u5b66\u5bb6Bernstein\u4e8e2007\u5e74\u63d0\u51fa\uff0c\u9700\u8c03\u752811\u6b21\u6709\u9650\u57df\u4e58\u6cd5\u548c5\u6b21\u6709\u9650\u57df\u5e73\u65b9\u5b8c\u6210\u52a0\u6cd5\u8fd0\u7b97\uff0c\u662fSM2\u66f2\u7ebf\u5f53\u4e0b\u6700\u4f18\u7684\u70b9\u52a0\u6cd5\u5b9e\u73b0\uff0c\u4e00\u822c\u8bb0\u4f5c ",(0,n.jsx)(e.a,{href:"http://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#addition-add-2007-bl",children:"add-2007-b"})," \u7b97\u6cd5\u3002\n\u5230\u4e86\u692d\u5706\u66f2\u7ebf\u591a\u500d\u70b9\u8fd0\u7b97\u73af\u8282\uff0c\u6211\u4eec\u91c7\u7528\u7b2c\u4e8c\u7ae0\u4e2d\u7684\u601d\u8def\u5206\u522b\u5b9e\u73b0\u76f8\u5e94\u7684\u70b9\u4e58\u6cd5\u548c\u57fa\u70b9\u4e58\u6cd5\u3002\u5148\u524d\u5df2\u6709\u8ba8\u8bba\uff0c\u6b64\u73af\u8282\u540c\u6837\u5177\u6709\u6cc4\u6f0f\u65f6\u95f4\u4fe1\u606f\u7684\u53ef\u80fd\u3002\u5bf9\u6b64\uff0c",(0,n.jsx)(e.a,{href:"http://link.springer.com/10.1007/978-3-642-29889-9_4",children:"\u8bba\u6587"}),"\u4e2d\u7ed9\u51fa\u4e86\u5982\u4e0b\u601d\u8def\uff1a"]}),"\n",(0,n.jsxs)(e.ul,{children:["\n",(0,n.jsx)(e.li,{children:"\u5bf9\u4e8e\u70b9\u4e58\u6cd5\uff0c\u5bf9\u4e8e\u975e\u5fc5\u8981\u7684\u8fd0\u7b97\u64cd\u4f5c\uff08\u4f8b\u5982\u4e0e0\u76f8\u4e58\uff09\u4f9d\u7136\u6267\u884c\u8ba1\u7b97\uff0c\u8ba1\u7b97\u65f6\u4e0e\u65e0\u7a77\u8fdc\u70b9\u76f8\u4e58\u3002"}),"\n",(0,n.jsxs)(e.li,{children:["\u5bf9\u4e8e\u9884\u8ba1\u7b97\u67e5\u8868\u8fc7\u7a0b\uff0c\u4f7f\u7528\u6765\u81ea\u786c\u4ef6\u67e5\u627e\u8868\u7684\u6280\u672f\u6765\u8bbe\u8ba1\u8f6f\u4ef6\u89e3\u51b3\u65b9\u6848\uff0c\u5b9e\u73b0 select_point \u51fd\u6570\uff0c\u6309\u7167\u56fa\u5b9a\u7684\u987a\u5e8f\u5faa\u73af\u904d\u6574\u4e2a\u9884\u8ba1\u7b97\u8868\u540e\u83b7\u5f97\u6240\u9700\u7684\u9884\u8ba1\u7b97\u9879\u3002\u867d\u7136",(0,n.jsx)(e.strong,{children:"\u6267\u884c\u65f6\u95f4\u4ecd\u4e0e\u7f13\u5b58\u76f8\u5173"}),"\uff0c\u4f46\u8be5\u65b9\u6cd5\u5c06\u65f6\u95f4\u4e0e\u67e5\u627e\u7d22\u5f15\u89e3\u8026\uff0c\u4e0d\u4f1a\u6cc4\u9732\u6709\u4ef7\u503c\u7684\u65f6\u95f4\u4fe1\u606f\uff1a"]}),"\n"]}),"\n",(0,n.jsx)(e.pre,{children:(0,n.jsx)(e.code,{className:"language-c",children:"/*\n * select_point selects the |idx|th point from a precomputation table and\n * copies it to out.\n */\nstatic void select_point(const u64 idx, unsigned int size,\n                         const smallfelem pre_comp[16][3], smallfelem out[3])\n{\n    unsigned i, j;\n    u64 *outlimbs = &out[0][0];\n\n    memset(out, 0, sizeof(*out) * 3);\n\n    for (i = 0; i < size;
1 i++) {\n        const u64 *inlimbs = (u64 *)&pre_comp[i][0][0];\n        u64 mask = i ^ idx;\n        mask |= mask >> 4;\n        mask |= mask >> 2;\n        mask |= mask >> 1;\n        mask &= 1;\n        mask--;\n        for (j = 0; j < NLIMBS * 3; j++)\n            outlimbs[j] |= inlimbs[j] & mask;\n    }\n}\n"})}),"\n",(0,n.jsxs)(e.p,{children:["\u6700\u540e\u6211\u4eec\u8fd8\u9700\u8981\u5c06\u4f18\u5316\u4ee3\u7801\u5d4c\u5165\u5230\u73b0\u6709\u67b6\u6784\u4e2d\u3002\u9996\u5148\u6211\u4eec\u6784\u9020\u7ed3\u6784\u4f53",(0,n.jsx)(e.code,{children:"EC_GFp_sm2p256_method"}),"\uff0c\u5c06\u672c\u6b21\u4f18\u5316\u4e2d\u5b9e\u73b0\u7684\u4e0e\u591a\u500d\u70b9\u8fd0\u7b97\u76f8\u5173\u7684\u4e09\u4e2a\u51fd\u6570\u5d4c\u5165\u7ed3\u6784\u4f53\u4e2d\uff1a"]}),"\n",(0,n.jsx)(e.pre,{children:(0,n.jsx)(e.code,{className:"language-c",children:"const EC_METHOD *EC_GFp_sm2p256_method(void)\n{\n    static const EC_METHOD ret = {\n        /*\u6b64\u5904\u7701\u7565\u90e8\u5206\u51fd\u6570*/\n        ossl_ec_GFp_sm2p256_points_mul,\n        ossl_ec_GFp_sm2p256_precompute_mult,\n        ossl_ec_GFp_sm2p256_have_precompute_mult,\n        /*\u6b64\u5904\u7701\u7565\u90e8\u5206\u51fd\u6570*/\n    };\n\n    return &ret;\n}\n"})}),"\n",(0,n.jsxs)(e.p,{children:["\u76f8\u5e94\u5730\uff0c\u8fd8\u9700\u8981\u628a\u9884\u8ba1\u7b97\u8868",(0,n.jsx)(e.code,{children:"SM2P256_PRE_COMP"}),"\u5d4c\u5165\u5230\u73b0\u6709\u4ee3\u7801\u4e2d\u4e13\u95e8\u5b58\u50a8\u9884\u8ba1\u7b97\u8868\u7684\u8054\u5408\u4f53\u4e2d\uff1a"]}),"\n",(0,n.jsx)(e.pre,{children:(0,n.jsx)(e.code,{className:"language-c",children:"    union {\n        NISTP224_PRE_COMP *nistp224;\n        NISTP256_PRE_COMP *nistp256;\n        NISTP521_PRE_COMP *nistp521;\n        NISTZ256_PRE_COMP *nistz256;\n        SM2P256_PRE_COMP *sm2p256;\n        EC_PRE_COMP *ec;\n    } pre_comp;\n"})}),"\n",(0,n.jsxs)(e.p,{children:["\u6700\u540e\uff0c\u5c06\u5b8c\u6574\u7684",(0,n.jsx)(e.code,{children:"EC_GFp_sm2p256_method"}),"\u4ee5\u6761\u4ef6\u7f16\u8bd1\u7684\u5f62\u5f0f\u52a0\u5165\u692d\u5706\u66f2\u7ebf\u53c2\u6570\u5217\u8868\uff1a"]}),"\n",(0,n.jsx)(e.pre,{children:(0,n.jsx)(e.code,{className:"language-c",children:'# ifndef OPENSSL_NO_SM2\n    {NID_sm2, &_EC_sm2p256v1.h,\n# if !defined(OPENSSL_NO_EC_SM2P_64_GCC_128)\n     EC_GFp_sm2p256_method,\n# else\n     0,\n# endif\n     "SM2 curve over a 256 bit prime field"},\n# endif\n'})}),"\n",(0,n.jsx)(e.h3,{id:"\u5feb\u901f\u6a21\u7ea6\u51cf\u7b97\u6cd5\u5b9e\u73b0",children:"\u5feb\u901f\u6a21\u7ea6\u51cf\u7b97\u6cd5\u5b9e\u73b0"}),"\n",(0,n.jsxs)(e.p,{children:["\u5728\u6709\u9650\u57df\u8fd0\u7b97\u4e2d\uff0c\u5bf9\u4e8e\u8fd0\u7b97\u7ed3\u679c\u5927\u4e8e ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"p"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"p"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.625em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"})]})})]})," \u7684\u4e2d\u95f4\u503c\uff0c\u9700\u8981\u5c06\u5176\u7ea6\u51cf\u5230 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"p"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"p"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.625em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"})]})})]})," \u4ee5\u5185\uff0c\u6b64\u8fc7\u7a0b\u4e5f\u88ab\u79f0\u4e3a\u6a21\u7ea6\u51cf\u3002\u7531\u4e8e ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"p"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"p"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.625em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"})]})})]})," \u662f\u4e00\u4e2a\u975e\u5e38\u5927\u7684256\u4f4d\u7d20\u6570\uff0c\u4e14\u8fd0\u7b97\u4e2d\u95f4\u503c\u6700\u5927\u53ef\u8fbe ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mi,{children:"p"}),(0,n.jsx)(e.mn,{children:"2"})]}),(0,n.jsx)(e.mo,{children:"\u2212"}),(0,n.jsx)(e.mn,{children:"1"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"p^2-1"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1.0085em",verticalAlign:"-0.1944em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"}
1,children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"2"})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2212"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6444em"}}),(0,n.jsx)(e.span,{className:"mord",children:"1"})]})]})]})," \uff0c\u91c7\u7528\u9664\u6cd5\u6765\u8ba1\u7b97\u6a21\u7ea6\u51cf\u7684\u6548\u7387\u5c06\u6781\u5176\u4f4e\u4e0b\uff08\u5728\u5177\u4f53\u5b9e\u8df5\u4e2d\uff0c\u6709\u9650\u57df\u9664\u6cd5\u4e00\u822c\u501f\u52a9\u4e58\u6cd5\u9006\u5143\u5b9e\u73b0\uff0c\u5176\u8017\u65f6\u5927\u7ea6\u662f\u6a21\u4e58\u7684200-300\u500d\uff09\u3002\n\u76ee\u524d\uff0c\u94dc\u9501\u4e2d\u7684SM2\u7b97\u6cd5\u8c03\u7528\u7684\u662f\u901a\u7528\u7684\u6a21\u7ea6\u51cf\u4f18\u5316\u51fd\u6570\uff0c\u6682\u65f6\u6ca1\u6709\u9488\u5bf9\u66f2\u7ebf\u7279\u5316\u7684\u5feb\u901f\u6a21\u7ea6\u51cf\u7b97\u6cd5\u5b9e\u73b0\u3002\u7b2c2\u7ae0\u4e2d\u5df2\u6709\u63d0\u53ca\uff0cSM2\u66f2\u7ebf\u7684\u63a8\u8350\u53c2\u6570 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"p"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"p"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.625em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"})]})})]})," \u5c5e\u4e8e\u5e7f\u4e49\u6885\u68ee\u7d20\u6570\uff0c \u800c\u5e7f\u4e49\u6885\u68ee\u7d20\u6570\u5728\u516c\u94a5\u5bc6\u7801\u5b66\u5e7f\u6cdb\u8fd0\u7528\u7684\u4e00\u4e2a\u91cd\u8981\u539f\u56e0\u5c31\u662f\uff0c\u57fa\u4e8e\u6b64\u7c7b\u7d20\u6570\u53ef\u4ee5\u5b9e\u73b0\u5feb\u901f\u6a21\u7ea6\u51cf\u7b97\u6cd5\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u8be5\u7b97\u6cd5\u80fd\u591f\u5c06\u5bf9 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"p"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"p"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.625em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"})]})})]})," \u7684\u6709\u9650\u57df\u9664\u6cd5\u8f6c\u5316\u4e3a\u5c11\u91cf\u7684\u52a0\u51cf\u6cd5\u8fd0\u7b97\u548c\u4f4d\u79fb\u64cd\u4f5c\uff0c\u4ece\u800c\u63d0\u5347\u6a21\u7ea6\u51cf\u7684\u901f\u5ea6\u3002\u6211\u4eec\u53c2\u7167\u5982\u56fe2\u6240\u793a\u7684\u7b97\u6cd5\u5b9e\u73b0\u4e86\u57fa\u4e8eSM2\u66f2\u7ebf\u53c2\u6570\u7684\u5feb\u901f\u6a21\u7ea6\u51cf\u7b97\u6cd5\uff1a"]}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.img,{alt:"image.png",src:a(3458).A+"",width:"794",height:"812"}),"\n\u56fe2\uff1a\u57fa\u4e8eSM2\u66f2\u7ebf\u53c2\u6570\u7684\u5feb\u901f\u6a21\u7ea6\u51cf\u7b97\u6cd5"]}),"\n",(0,n.jsx)(e.h3,{id:"\u5feb\u901f\u6a21\u9006\u5143\u7b97\u6cd5\u5b9e\u73b0",children:"\u5feb\u901f\u6a21\u9006\u5143\u7b97\u6cd5\u5b9e\u73b0"}),"\n",(0,n.jsxs)(e.p,{children:["\u5728\u6709\u9650\u57df\u6a21\u8fd0\u7b97\u4e2d\uff0c\u4e58\u6cd5\u9006\u5143\uff08\u6a21\u9006\u5143\uff09\u7684\u5b9a\u4e49\u5982\u4e0b\uff1a\u5982\u679c ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"a"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"a"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.4306em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"a"})]})})]})," \u548c ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"m"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"m"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.4306em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"m"})]})})]})," \u662f\u6b63\u6574\u6570\u4e14\u6ee1\u8db3 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{children:"g"}),(0,n.jsx)(e.mi,{children:"c"}),(0,n.jsx)(e.mi,{children:"d"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"("}),(0,n.jsx)(e.mi,{children:"a"}),(0,n.jsx)(e.mo,{separator:"true",children:","}),(0,n.jsx)(e.mi,{children:"m"}),(0,n.jsx)(e.mo,{stretchy:"false",children:")"}),(0,n.jsx)(e.mo,{children:"="}),(0,n.jsx)(e.mn,{children:"1"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"gcd(a,m)=1"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.03588em"},children:"g"}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"c"}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"d"}),(0,n.jsx)(e.span,{className:"mopen",children:"("}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,n.jsx)(e.span,{className:"mpunct",children:","}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.1667em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"m"}),(0,n.jsx)(e.span,{className:"mclose",children:")"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,n.jsx)(e.span,{className:"mrel",children:"="}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6444em"}}),(0,n.jsx)(e.span,{className:"mord",children:"1"})]})]})]})," \uff0c\u90a3\u4e48\u5728\u6a21 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"m"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"m"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.4306em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"m"})]})})]})," \u610f\u4e49\u4e0b\uff0c\u5b58\u5728\u4e00\u4e2a\u6574\u6570 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"b"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"b"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"b"})]})})]})," \uff0c\u4f7f\u5f97 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{children:"a"}),(0,n.jsx)(e.mi,{children:"b"}),(0,n.jsx)(e.mo,{children:"\u2261"}),(0,n.jsx)(e.mn,{children:"1"}),(0,n.jsx)(e.mspace,{}),(0,n.jsx)(e.mspace,{width:"0.4444em"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"("}),(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{mathvariant:"normal",children:"m"}),(0,n.jsx)(e.mi,{mathvariant:"normal",children:"o"}),(0,n.jsx)(e.mi,{mathvariant:"normal",children:"d"})]}),(0,n.jsx)(e.mspace,{width:"0.3333em"}),(0,n.jsx)(e.mi,{children:"m"}),(0,n.jsx)(e.mo,{stretchy:"false",children:")"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"ab \\equiv 1 \\pmod{m}"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"ab"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,n.jsx)(e.span,{className:"mrel",children:"\u2261"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6444em"}}),(0,n.jsx)(e.span,{className:"mord",children:"1"}),(0,n.jsx)(e.span,{className:"mspace allowbreak"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.4444em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mopen",children:"("}),(0,n.jsx)(e.span,{className:"mord",children:(0,n.jsx)(e.span,{className:"mord",children:(0,n.jsx)(e.span,{className:"mord mathrm",children:"mod"})})}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.3333em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"m"}),(0,n.jsx)(e.span,{className:"mclose",children:")"})]})]})]})," \uff0c\u6b64\u65f6 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"b"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"b"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"b"})]})})]})," \u5c31\u662f ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"a"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"a"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.4306em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"a"})]})})]})," \u5728\u6a21\u8fd0\u7b97\u4e0b\u7684\u9006\u5143\uff0c\u8bb0\u4f5c ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mi,{children:"a"}),(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mo,{children:"\u2212"}),(0,n.jsx)(e.mn,{children:"1"})]})]})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"a^{-1}"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8141em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"}
1,children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsxs)(e.span,{className:"mord mtight",children:[(0,n.jsx)(e.span,{className:"mord mtight",children:"\u2212"}),(0,n.jsx)(e.span,{className:"mord mtight",children:"1"})]})})]})})})})})]})]})})]})," \u3002\u5728sm2\u6570\u5b57\u7b7e\u540d\u7b97\u6cd5\u4e2d\uff0c\u5b58\u5728\u4e24\u4e2a\u5fc5\u987b\u8ba1\u7b97\u6a21\u9006\u5143\u7684\u6b65\u9aa4\uff1a\u4e00\u662f\u5c06\u692d\u5706\u66f2\u7ebf\u516c\u94a5\u70b9 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsxs)(e.msub,{children:[(0,n.jsx)(e.mi,{children:"P"}),(0,n.jsx)(e.mi,{children:"K"})]})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"P_K"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8333em",verticalAlign:"-0.15em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.13889em"},children:"P"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,n.jsxs)(e.span,{className:"vlist-r",children:[(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.3283em"},children:(0,n.jsxs)(e.span,{style:{top:"-2.55em",marginLeft:"-0.1389em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mathnormal mtight",style:{marginRight:"0.07153em"},children:"K"})})]})}),(0,n.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.15em"},children:(0,n.jsx)(e.span,{})})})]})})]})]})})]})," \u7531\u4eff\u5c04\u5750\u6807\u8f6c\u5316\u4e3a\u96c5\u53ef\u6bd4\u5
1750\u6807\u65f6\u9700\u8981\u8ba1\u7b97 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"z"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"z"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.4306em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.04398em"},children:"z"})]})})]})," \u8f74\u5750\u6807 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsxs)(e.msub,{children:[(0,n.jsx)(e.mi,{children:"z"}),(0,n.jsx)(e.mn,{children:"1"})]})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"z_1"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.5806em",verticalAlign:"-0.15em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord mathnormal",style:{marginRight:"0.04398em"},children:"z"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,n.jsxs)(e.span,{className:"vlist-r",children:[(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.3011em"},children:(0,n.jsxs)(e.span,{style:{top:"-2.55em",marginLeft:"-0.044em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"1"})})]})}),(0,n.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.15em"},children:(0,n.jsx)(e.span,{})})})]})})]})]})})]})," \u5bf9\u7d20\u6570 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"p"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"p"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.625em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"})]})})]})," \u7684\u6a21\u9006\u5143\uff0c\u4e8c\u662f\u5728\u7b7e\u540d\u8ba1\u7b97\u8fc7\u7a0b\u4e2d\u6c42\u89e3\u79c1\u94a5 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsxs)(e.msub,{children:[(0,n.jsx)(e.mi,{children:"d"}),(0,n.jsx)(e.mi,{children:"A"})]}),(0,n.jsx)(e.mo,{children:"+"}),(0,n.jsx)(e.mn,{children:"1"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"d_A + 1"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8444em",verticalAlign:"-0.15em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord mathnormal",children:"d"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsxs)(e.span,{className:"vlist-t vlist-t2",children:[(0,n.jsxs)(e.span,{className:"vlist-r",children:[(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.3283em"},children:(0,n.jsxs)(e.span,{style:{top:"-2.55em",marginLeft:"0em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsx)(e.span,{className:"mord mathnormal mtight",children:"A"})})]})}),(0,n.jsx)(e.span,{className:"vlist-s",children:"\u200b"})]}),(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.15em"},children:(0,n.jsx)(e.span,{})})})]})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"+"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6444em"}}),(0,n.jsx)(e.span,{className:"mord",children:"1"})]})]})]})," \u5bf9\u692d\u5706\u66f2\u7ebf\u9636\u6570 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"n"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"n"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.4306em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"n"})]})})]})," \u7684\u6a21\u9006\u5143\u3002\n\u7531\u4e8e\u6a21\u9006\u5143\u7684\u8ba1\u7b97\u590d\u6742\uff0c\u4e14\u6a21\u9006\u5143\u8fd0\u7b97\u662f\u6709\u9650\u57df\u4e2d\u5f00\u9500\u6700\u5927\u7684\u8fd0\u7b97\uff0c \u56e0\u6b64\u6210\u4e3a\u5236\u7ea6SM2\u7b97\u6cd5\u8fd0\u884c\u6548\u7387\u7684\u74f6\u9888\u4e4b\u4e00\u3002\u76ee\u524d\uff0c\u94dc\u9501\u9879\u76ee\u4e2d\u5c1a\u672a\u9488\u5bf9sm2\u66f2\u7ebf\u5b9e\u73b0\u53c2\u6570\u7279\u5316\u7684\u5feb\u901f\u6a21\u9006\u5143\u7b97\u6cd5\uff0c\u5b58\u5728\u53ef\u4ee5\u8fdb\u4e00\u6b65\u4f18\u5316\u63d0\u5347\u7684\u7a7a\u95f4\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u53ef\u4ee5\u4f7f\u7528\u62d3\u5c55\u6b27\u51e0\u91cc\u5f97\u4f18\u5316\u7b97\u6cd5\u548c\u57fa\u4e8e\u8d39\u9a6c\u5c0f\u5b9a\u7406\u7684\u7b97\u6cd5\u5b9e\u73b0\u5feb\u901f\u6a21\u9006\u5143\u3002\u7ecf\u8fc7\u7efc\u5408\u5206\u6790\u4e0e\u6bd4\u9009\u540e\uff0c\u6211\u4eec\u9009\u62e9\u4e86\u6027\u80fd\u7a0d\u52a3\u4f46\u5b9e\u73b0\u7b80\u5355\u4e14\u5bb9\u6613\u8bbe\u8ba1\u6052\u5b9a\u65f6\u95f4\u7b97\u6cd5\u7684\u8d39\u9a6c\u5c0f\u5b9a\u7406\u4f18\u5316\u3002\u6b64\u65f6\uff0c\u82e5\u8981\u8ba1\u7b97 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mi,{children:"a"}),(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mo,{children:"\u2212"}),(0,n.jsx)(e.mn,{children:"1"})]})]})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"a^{-1}"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8141em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"}
1,children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsxs)(e.span,{className:"mord mtight",children:[(0,n.jsx)(e.span,{className:"mord mtight",children:"\u2212"}),(0,n.jsx)(e.span,{className:"mord mtight",children:"1"})]})})]})})})})})]})]})})]})," \uff0c\u53ea\u9700\u8ba1\u7b97\uff1a"]}),"\n",(0,n.jsx)(e.p,{children:(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mi,{children:"a"}),(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{children:"p"}),(0,n.jsx)(e.mo,{children:"\u2212"}),(0,n.jsx)(e.mn,{children:"2"})]})]}),(0,n.jsx)(e.mo,{children:"="}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mi,{children:"a"}),(0,n.jsxs)(e.mrow,{children:[(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"256"})]}),(0,n.jsx)(e.mo,{children:"\u2212"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"224"})]}),(0,n.jsx)(e.mo,{children:"\u2212"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"96"})]}),(0,n.jsx)(e.mo,{children:"+"}),(0,n.jsxs)(e.msup,{children:[(0,n.jsx)(e.mn,{children:"2"}),(0,n.jsx)(e.mn,{children:"64"})]}),(0,n.jsx)(e.mo,{children:"\u2212"}),(0,n.jsx)(e.mn,{children:"3"})]})]}),(0,n.jsx)(e.mspace,{}),(0,n.jsx)(e.mspace,{width:"0.4444em"}),(0,n.jsx)(e.mo,{stretchy:"false",children:"("}),(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{mathvariant:"normal",children:"m"}),(0,n.jsx)(e.mi,{mathvariant:"normal",children:"o"}),(0,n.jsx)(e.mi,{mathvariant:"normal",children:"d"})]}),(0,n.jsx)(e.mspace,{width:"0.3333em"}),(0,n.jsx)(e.mi,{children:"p"}),(0,n.jsx)(e.mo,{stretchy:"false",children:")"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"a^{p-2} = a^{2^{256} \u2212 2^{224} - 2^{96} + 2^{64} - 3} \\pmod{p}"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.8141em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8141em"},children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsxs)(e.span,{className:"mord mtight",children:[(0,n.jsx)(e.span,{className:"mord mathnormal mtight",children:"p"}),(0,n.jsx)(e.span,{className:"mbin mtight",children:"\u2212"}),(0,n.jsx)(e.span,{className:"mord mtight",children:"2"})]})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}}),(0,n.jsx)(e.span,{className:"mrel",children:"="}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2778em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.9869em"}}),(0,n.jsxs)(e.span,{className:"mord",children:[(0,n.jsx)(e.span,{className:"mord mathnormal",children:"a"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.9869em"},children:(0,n.jsxs)(e.span,{style:{top:"-3.063em",marginRight:"0.05em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.7em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size6 size3 mtight",children:(0,n.jsxs)(e.span,{className:"mord mtight",children:[(0,n.jsxs)(e.span,{className:"mord mtight",children:[(0,n.jsx)(e.span,{className:"mord mtight",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8913em"}
1,children:(0,n.jsxs)(e.span,{style:{top:"-2.931em",marginRight:"0.0714em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.5em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size3 size1 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"256"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mbin mtight",children:"\u2212"}),(0,n.jsxs)(e.span,{className:"mord mtight",children:[(0,n.jsx)(e.span,{className:"mord mtight",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8913em"},children:(0,n.jsxs)(e.span,{style:{top:"-2.931em",marginRight:"0.0714em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.5em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size3 size1 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"224"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mbin mtight",children:"\u2212"}),(0,n.jsxs)(e.span,{className:"mord mtight",children:[(0,n.jsx)(e.span,{className:"mord mtight",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8913em"},children:(0,n.jsxs)(e.span,{style:{top:"-2.931em",marginRight:"0.0714em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.5em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size3 size1 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"96"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mbin mtight",children:"+"}),(0,n.jsxs)(e.span,{className:"mord mtight",children:[(0,n.jsx)(e.span,{className:"mord mtight",children:"2"}),(0,n.jsx)(e.span,{className:"msupsub",children:(0,n.jsx)(e.span,{className:"vlist-t",children:(0,n.jsx)(e.span,{className:"vlist-r",children:(0,n.jsx)(e.span,{className:"vlist",style:{height:"0.8913em"},children:(0,n.jsxs)(e.span,{style:{top:"-2.931em",marginRight:"0.0714em"},children:[(0,n.jsx)(e.span,{className:"pstrut",style:{height:"2.5em"}}),(0,n.jsx)(e.span,{className:"sizing reset-size3 size1 mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:(0,n.jsx)(e.span,{className:"mord mtight",children:"64"})})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mbin mtight",children:"\u2212"}),(0,n.jsx)(e.span,{className:"mord mtight",children:"3"})]})})]})})})})})]}),(0,n.jsx)(e.span,{className:"mspace allowbreak"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.4444em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.jsx)(e.span,{className:"mopen",children:"("}),(0,n.jsx)(e.span,{className:"mord",children:(0,n.jsx)(e.span,{className:"mord",children:(0,n.jsx)(e.span,{className:"mord mathrm",children:"mod"})})}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.3333em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,n.jsx)(e.span,{className:"mclose",children:")"})]})]})]})}),"\n",(0,n.jsxs)(e.p,{children:["\u4f18\u5316\u540e\u7684\u6a21\u9006\u5143\u867d\u53ef\u4ee5\u5206\u89e3\u4e3a\u6a21\u4e58\u6cd5\u548c\u6a21\u5e73\u65b9\u8fd0\u7b97\uff0c\u4f46\u7531\u4e8e\u6307\u6570 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsxs)(e.mrow,{children:[(0,n.jsx)(e.mi,{children:"p"}),(0,n.jsx)(e.mo,{children:"\u2212"}),(0,n.jsx)(e.mn,{children:"2"})]}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"p-2"})]})})}),(0,n.jsxs)(e.span,{className:"katex-html","aria-hidden":"true",children:[(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.7778em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}}),(0,n.jsx)(e.span,{className:"mbin",children:"\u2212"}),(0,n.jsx)(e.span,{className:"mspace",style:{marginRight:"0.2222em"}})]}),(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.6444em"}}),(0,n.jsx)(e.span,{className:"mord",children:"2"})]})]})]})," \u975e\u5e38\u5927\uff0c\u5e38\u89c4\u65b9\u5f0f\u6c42\u89e3\u7684\u6548\u7387\u4f9d\u7136\u5f88\u4f4e\u3002\u8fd9\u91cc\u6211\u4eec\u501f\u7528\u52a0\u6cd5\u94fe\u7684\u601d\u60f3\uff0c\u5c06\u5e42\u8ba1\u7b97\u5206\u89e3\u4e3a\u591a\u4e2a\u5c0f\u5e42\u76f8\u4e58\u7684\u5f62\u5f0f\uff0c\u4ece\u800c\u51cf\u5c11\u5e42\u8fd0\u7b97\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u3002\u76ee\u524d\uff0c\u9488\u5bf9sm2\u66f2\u7ebf\u53c2\u6570 ",(0,n.jsxs)(e.span,{className:"katex",children:[(0,n.jsx)(e.span,{className:"katex-mathml",children:(0,n.jsx)(e.math,{xmlns:"http://www.w3.org/1998/Math/MathML",children:(0,n.jsxs)(e.semantics,{children:[(0,n.jsx)(e.mrow,{children:(0,n.jsx)(e.mi,{children:"p"})}),(0,n.jsx)(e.annotation,{encoding:"application/x-tex",children:"p"})]})})}),(0,n.jsx)(e.span,{className:"katex-html","aria-hidden":"true",children:(0,n.jsxs)(e.span,{className:"base",children:[(0,n.jsx)(e.span,{className:"strut",style:{height:"0.625em",verticalAlign:"-0.1944em"}}),(0,n.jsx)(e.span,{className:"mord mathnormal",children:"p"})]})})]})," \u7684\u6a21\u9006\u5143\u52a0\u6cd5\u94fe\u7814\u7a76\u4e2d\uff0c\u4e00\u4e2a\u8f83\u4f18\u89e3\u662f\u6731\u8f89\u7b49\u4eba\u63d0\u51fa\u7684",(0,n.jsx)(e.a,{href:"https://jeit.ac.cn/cn/article/doi/10.11999/JEIT211049",children:"\u65b9\u6848"}),"\uff0c\u6b64\u65b9\u6848\u590d\u6742\u5ea6\u4e3a255\u6b21\u6a21\u5e73\u65b9+14\u6b21\u6a21\u4e58\u6cd5\uff0c\u9700\u89814\u4e2a\u53d8\u91cf\u4f5c\u4e3a\u4e2d\u95f4\u503c\uff0c\u5177\u4f53\u5982\u4e0b\uff1a"]}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.img,{alt:"image.png",src:a(1690).A+"",width:"1420",height:"1602"}),"\n\u56fe3\uff1a\u57fa\u4e8eSM2\u66f2\u7ebf\u53c2\u6570\u7684\u5feb\u901f\u6a21\u9006\u5143\u7b97\u6cd5"]}),"\n",(0,n.jsx)(e.h2,{id:"\u4f18\u5316\u529f\u80fd\u542f\u7528\u53ca\u7cfb\u7edf\u8981\u6c42",children:"\u4f18\u5316\u529f\u80fd\u542f\u7528\u53ca\u7cfb\u7edf\u8981\u6c42"}),"\n",(0,n.jsxs)(e.p,{children:["SM2\u7b97\u6cd564\u4f4d\u5e73\u53f0\u6027\u80fd\u4f18\u5316\u529f\u80fd\u7684\u5b9e\u73b0\u5168\u9762\u517c\u5bb9\u94dc\u9501\u73b0\u6709\u67b6\u6784\uff0c\u4e0d\u6d89\u53ca\u5bf9\u5df2\u6709API\u53c2\u6570\u6216\u8fd4\u56de\u503c\u7684\u6539\u53d8\uff0c\u7528\u6237\u5728\u4f7f\u7528\u65f6\u65e0\u9700\u663e\u5f0f\u8c03\u7528\u4f18\u5316\u4ee3\u7801\uff0c\u53ea\u9700\u8981\u5728\u914d\u7f6e\u9636\u6bb5\u5f00\u542f\u4f18\u5316\u53c2\u6570",(0,n.jsx)(e.code,{children:"enable-ec_sm2p_64_gcc_128"})," \u5373\u53ef\uff1a"]}),"\n",(0,n.jsx)(e.pre,{children:(0,n.jsx)(e.code,{className:"language-bash",children:"./config --prefix=/opt/tongsuo -Wl,-rpath,/opt/tongsuo/lib enable-ec_sm2p_64_gcc_128\n"})}),"\n",(0,n.jsx)(e.p,{children:"\u672c\u529f\u80fd\u7684\u5b9e\u73b0\u4ee5\u7b97\u6cd5\u4f18\u5316\u548c\u6570\u636e\u7ed3\u6784\u4f18\u5316\u4e3a\u4e3b\uff0c\u4ee3\u7801\u4e3b\u4f53\u6682\u4e0d\u6d89\u53ca\u6c47\u7f16\u5c42\u9762\u7684\u4f18\u5316\uff0c\u56e0\u6b64\u572864\u4f4d\u5e73\u53f0\u4e0a\u6709\u8f83\u597d\u7684\u4f18\u5316\u901a\u7528\u6027\u3002\u7531\u4e8e\u6570\u636e\u7ed3\u6784\u4f18\u5316\u4e0e\u5b57\u8282\u5e8f\u548c\u5927\u6574\u6570\u7c7b\u578b\u76f8\u5173\uff0c\u56e0\u6b64\u7528\u6237\u5728\u914d\u7f6e\u4f18\u5316\u53c2\u6570\u524d\u9700\u786e\u8ba4\u5f53\u524d\u5e73\u53f0\u6ee1\u8db3\u4ee5\u4e0b\u4e09\u4e2a\u8981\u6c42\uff1a"}),"\n",(0,n.jsxs)(e.blockquote,{children:["\n",(0,n.jsxs)(e.ol,{children:["\n",(0,n.jsx)(e.li,{children:"CPU\u4e3a64\u4f4d\u67b6\u6784\uff0c\u652f\u630164\u4f4d\u5bc4\u5b58\u5668"}),"\n",(0,n.jsx)(e.li,{children:"\u7cfb\u7edf\u5b57\u8282\u5e8f\u4e3a\u5c0f\u7aef\u5e8f\uff08\u7edd\u5927\u591a\u6570CPU\u67b6\u6784\uff0c\u4f8b\u5982x86-64 \u3001aarch64\u3001MIPS64\u7b49\u67b6\u6784\u5747\u91c7\u7528\u5c0f\u7aef\u5b57\u8282\u5e8f\uff09"}),"\n",(0,n.jsxs)(e.li,{children:["\u7f16\u8bd1\u5668\u652f\u6301",(0,n.jsx)(e.code,{children:"uint128_t"})," \u548c",(0,n.jsx)(e.code,{children:"int128_t"}),"\u6574\u6570\u7c7b\u578b\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7f16\u8bd1\u5668\u652f\u6301128\u4f4d\u6574\u6570\u7c7b\u578b\u7684\u6700\u4f4e\u7248\u672c\uff1a","\n",(0,n.jsxs)(e.ol,{children:["\n",(0,n.jsx)(e.li,{children:"gcc\uff1a\u6700\u4f4e\u7248\u672c4.1\uff082006\u5e74\u53d1\u5e03\uff09\uff0c\u63a8\u8350\u4f7f\u75284.6\u53ca\u66f4\u9ad8\u7248\u672c"}),"\n",(0,n.jsx)(e.li,{children:"clang\uff1a\u6700\u4f4e\u7248\u672c3.0\uff082011\u5e74\u53d1\u5e03\uff09\uff0c\u63a8\u8350\u4f7f\u75283.1\u53ca\u66f4\u9ad8\u7248\u672c"}),"\n",(0,n.jsx)(e.li,{children:"Intel C++ Compiler\uff08ICC\uff0c2013\u5e74\u53d1\u5e03)\uff1a\u6700\u4f4e\u7248\u672c13\uff0c\u63a8\u8350\u4f7f\u752816\u53ca\u66f4\u9ad8\u7248\u672c"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(e.p,{children:"*\u6ce8\uff1a\u622a\u6b62\u76ee\u524d\uff082023\u5e747\u6708\uff09\uff0cMSVC\u7f16\u8bd1\u5668\u4ecd\u672a\u539f\u751f\u652f\u6301128 \u4f4d\u6574\u6570\u7c7b\u578b\uff0c\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u5b9e\u73b0\u5bf9\u4e0a\u8ff0\u7c7b\u578b\u7684\u652f\u6301"}),"\n",(0,n.jsxs)(e.p,{children:["\u4e0a\u8ff0\u8981\u6c42\u4f3c\u4e4e\u6709\u4e9b\u590d\u6742\uff0c\u4f46\u8003\u8651\u5230",(0,n.jsx)(e.strong,{children:"64\u4f4d\u8bbe\u5907\u65e5\u76ca\u666e\u53ca\uff0c\u4ee5\u53ca\u5927\u90e8\u5206CPU\u67b6\u6784\u4e3a\u5c0f\u7aef\u5e8f\uff0c\u4e3b\u6d41\u7f16\u8bd1\u5668\u5df2\u7ecf\u652f\u6301128\u4f4d\u6574\u6570\u7c7b\u578b\u591a\u5e74"}),"\u7684\u73b0\u72b6\uff0c\u53ef\u4ee5\u8ba4\u4e3a\u5927\u591a\u657064\u4f4d\u5e73\u53f0\u7528\u6237\u90fd\u53ef\u4ee5\u4f7f\u7528\u672c\u529f\u80fd\u5e76\u4ece\u4e2d\u83b7\u53d6\u6027\u80fd\u589e\u76ca\u3002"]}),"\n",(0,n.jsx)(e.h2,{id:"\u6027\u80fd\u6d4b\u8bd5",children:"\u6027\u80fd\u6d4b\u8bd5"}),"\n",(0,n.jsx)(e.p,{children:"\u9996\u5148\u7ed9\u51fa\u6027\u80fd\u6d4b\u8bd5\u73af\u5883\u7684\u76f8\u5173\u53c2\u6570\uff1a"}),"\n",(0,n.jsxs)(e.table,{children:[(0,n.jsx)(e.thead,{children:(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.th,{children:"\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c"}),(0,n.jsx)(e.th,{children:"macOS Ventura 13.2.1"})]})}),(0,n.jsxs)(e.tbody,{children:[(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:"CPU"}),(0,n.jsx)(e.td,{children:"Apple M2 pro"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:"\u5185\u5b58"}),(0,n.jsx)(e.td,{children:"16 GB 6400 MHz LPDDR5"})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:"\u786c\u76d8"}),(0,n.jsx)(e.td,{children:"512G SSD"})]})]})]}),"\n",(0,n.jsxs)(e.p,{children:["\u4e3a\u4e86\u66f4\u5168\u9762\u5730\u5c55\u73b0\u672c\u4f18\u5316\u529f\u80fd\u7684\u6027\u80fd\u8868\u73b0\uff0c\u6211\u4eec\u4f7f\u7528\u94dc\u9501\u81ea\u4e3b\u5f00\u53d1\u7684\u6d4b\u8bd5\u7a0b\u5e8f\u548cOpenssl\u81ea\u5e26\u7684speed\u547d\u4ee4\u6d4b\u8bd5SM2\u7b97\u6cd5\u7684\u7b7e\u540d\u3001\u9a8c\u7b7e\u548c\u5bc6\u94a5\u5bf9\u751f\u6210\uff08\u4ec5\u6d4b\u8bd5\u4e8c\uff09\u7684\u901f\u5ea6\u3002\n\u4f7f\u7528Openssl\u81ea\u5e26\u7684speed\u547d\u4ee4\u65f6\uff0c\u4e3a\u4e86\u4fbf\u4e8e\u5bf9\u6bd4\uff0c\u6211\u4eec\u5206\u522b\u6d4b\u8bd5\u6253\u5f00\u4f18\u5316\u547d\u4ee4",(0,n.jsx)(e.code,{children:"enable-ec_sm2p_64_gcc_128"}),"\u548c\u672a\u6253\u5f00\u4f18\u5316\u547d\u4ee4\u4e0b\u7684\u94dc\u9501master\u7248\u672c\uff0c\u4ee5\u53caOpenSSL 3.0.3\u7248\u672c\u7684\u6027\u80fd\u6570\u636e\uff0c\u5e76\u4ee5\u672a\u6253\u5f00\u4f18\u5316\u547d\u4ee4\u4e0b\u7684\u94dc\u9501master\u7248\u672c\u7684\u6027\u80fd\u4f5c\u4e3a\u6d4b\u8bd5\u57fa\u7ebf\u3002\u6d4b\u8bd5\u7ed3\u679c\u5982\u4e0b\u6240\u793a\uff1a"]}),"\n",(0,n.jsxs)(e.table,{children:[(0,n.jsx)(e.thead,{children:(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.th,{}),(0,n.jsx)(e.th,{children:"Tongsuo optimization"}),(0,n.jsx)(e.th,{children:"Tongsuo no-opt"}),(0,n.jsx)(e.th,{children:"OpenSSL 3.0.3"}),(0,n.jsx)(e.th,{children:"Improvement"})]})}),(0,n.jsxs)(e.tbody,{children:[(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:"SM2 sign"}),(0,n.jsx)(e.td,{children:"20384.8 /s"}),(0,n.jsx)(e.td,{children:"5966.9/s"}),(0,n.jsx)(e.td,{children:"5848.4/s"}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.strong,{children:"+241.6%"})})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:"SM2 verify"}),(0,n.jsx)(e.td,{children:"10946.2/s"}),(0,n.jsx)(e.td,{children:"6276.8/s"}),(0,n.jsx)(e.td,{children:"6137.5/s"}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.strong,{children:"+74.4%"})})]})]})]}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.img,{src:"https://cdn.nlark.com/yuque/0/2023/png/38409340/1692693352550-c14de9c0-c369-4de0-b8c0-52806ad969e3.png#averageHue=%23fcfcfc&clientId=u549ddec5-3d12-4&from=ui&height=300&id=WmFTM&originHeight=656&originWidth=1140&originalType=binary&ratio=2&rotation=0&showTitle=false&size=66520&status=done&style=none&taskId=u87fc6ad5-5c6d-4a50-83de-f5bc796d99b&title=&width=522",alt:"image.png"}),"\n\u4f7f\u7528\u94dc\u9501\u81ea\u4e3b\u5f00\u53d1\u7684\u6027\u80fd\u6d4b\u8bd5\u7a0b\u5e8f\u65f6\uff0c\u6211\u4eec\u8bbe\u5b9a\u6d4b\u8bd5\u6570\u636e\u4e3a\u5927\u5c0f1MB\u7684\u968f\u673a\u6570\u636e\uff0c\u540c\u6837\u6d4b\u8bd5\u6253\u5f00/\u4e0d\u6253\u5f00\u4f18\u5316\u547d\u4ee4\u7684\u94dc\u9501master\u7248\u672c\uff0c\u4ee5\u53caOpenSSL 3.0.3\u7248\u672c\u7684\u6027\u80fd\u6570\u636e\u3002\u4e3a\u4e86\u589e\u52a0\u5bf9\u6bd4\uff0c\u6211\u4eec\u540c\u65f6\u6d4b\u8bd5\u4e86Rust\u793e\u533a\u5f00\u6e90\u56fd\u5bc6\u7b97\u6cd5\u5e93libsm\u7684\u6027\u80fd\u3002\u6d4b\u8bd5\u57fa\u7ebf\u4e0e\u524d\u6587\u4e00\u81f4\uff1a"]}),"\n",(0,n.jsxs)(e.table,{children:[(0,n.jsx)(e.thead,{children:(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.th,{}),(0,n.jsx)(e.th,{children:"Tongsuo optimization"}),(0,n.jsx)(e.th,{children:"Tongsuo no-opt"}),(0,n.jsx)(e.th,{children:"OpenSSL 3.0.3"}),(0,n.jsx)(e.th,{children:"libsm 0.5.1"}),(0,n.jsx)(e.th,{children:"Improvement"})]})}),(0,n.jsxs)(e.tbody,{children:[(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:"SM2 sign"}),(0,n.jsx)(e.td,{children:"23242/s"}),(0,n.jsx)(e.td,{children:"6017/s"}),(0,n.jsx)(e.td,{children:"5842/s"}),(0,n.jsx)(e.td,{children:"11713/s"}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.strong,{children:"+286.2%"})})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:"SM2 verify"}),(0,n.jsx)(e.td,{children:"12246/s"}),(0,n.jsx)(e.td,{children:"6212/s"}),(0,n.jsx)(e.td,{children:"6088/s"}),(0,n.jsx)(e.td,{children:"2061/s"}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.strong,{children:"+97.1%"})})]}),(0,n.jsxs)(e.tr,{children:[(0,n.jsx)(e.td,{children:"SM2 keygen"}),(0,n.jsx)(e.td,{children:"20485/s"}),(0,n.jsx)(e.td,{children:"5543/s"}),(0,n.jsx)(e.td,{children:"5457/s"}),(0,n.jsx)(e.td,{children:"16028/s"}),(0,n.jsx)(e.td,{children:(0,n.jsx)(e.strong,{children:"+269.5%"})})]})]})]}),"\n",(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.img,{alt:"image.png",src:a(1017).A+"",width:"890",height:"656"}),"\n\u6027\u80fd\u6d4b\u8bd5\u7ed3\u679c\u8868\u660e\uff0c\u94dc\u9501\u4e2d\u9488\u5bf9SM2\u7b97\u6cd5\u5b9e\u73b0\u768464-bit \u5e73\u53f0\u4f18\u5316\u53d6\u5f97\u4e86\u8f83\u5927\u7684\u6027\u80fd\u63d0\u5347\u6548\u679c\uff0c\u7b26\u5408\u4f18\u5316\u5de5\u4f5c\u7684\u9884\u671f\u76ee\u6807\u3002\u4ece\u4f18\u5316\u7ed3\u679c\u6765\u770b\uff0c\u7b7e\u540d\u7b97\u6cd5\u548c\u5bc6\u94a5\u5bf9\u751f\u6210\u8fc7\u7a0b\u7684\u4f18\u5316\u63d0\u5347\u660e\u663e\u9ad8\u4e8e\u9a8c\u7b7e\u7b97\u6cd5\uff0c\u8fd9\u4e3b\u8981\u662f\u56e0\u4e3a\u7b7e\u540d\u7b97\u6cd5\u548c\u5bc6\u94a5\u5bf9\u751f\u6210\u8fc7\u7a0b\u6240\u6d89\u53ca\u7684\u7684\u692d\u5706\u66f2\u7ebf\u591a\u500d\u70b9\u8fd0\u7b97\u662f\u57fa\u70b9\u4e58\u8fd0\u7b97\uff0c\u53ef\u4ee5\u4f7f\u7528\u9884\u7f6e\u7684\u9884\u8ba1\u7b97\u8868\u52a0\u901f\u8ba1\u7b97\uff0c\u800c\u9a8c\u7b7e\u7b97\u6cd5\u7684\u692d\u5706\u66f2\u7ebf\u591a\u500d\u70b9\u8fd0\u7b97\u662f\u666e\u901a\u70b9\u4e58\u8fd0\u7b97\uff0c\u66f2\u7ebf\u70b9\u662f\u4e0d\u56fa\u5b9a\u7684\uff0c\u56e0\u800c\u65e0\u6cd5\u5229\u7528\u9884\u8ba1\u7b97\u8868\u5b9e\u73b0\u6027\u80fd\u7684\u8fdb\u4e00\u6b65\u7a81\u7834\u3002"]}),"\n",(0,n.jsx)(e.h2,{id:"\u53c2\u8003\u658
17\u732e",children:"\u53c2\u8003\u6587\u732e"}),"\n",(0,n.jsxs)(e.ol,{children:["\n",(0,n.jsx)(e.li,{children:"\u300aFast Elliptic Curve Cryptography in OpenSSL\u300b"}),"\n",(0,n.jsx)(e.li,{children:"\u300aEfficient and Secure Elliptic Curve Cryptography Implementation of Curve P-256\u300b"}),"\n",(0,n.jsx)(e.li,{children:"\u300aUltra High-Speed SM2 ASIC Implementation\u300b"}),"\n",(0,n.jsx)(e.li,{children:"\u300aFast Prime Field Elliptic Curve Cryptography with 256 Bit Primes\u300b"}),"\n",(0,n.jsx)(e.li,{children:"\u300a\u4e00\u79cd\u57fa\u4e8e\u56fe\u5f62\u5904\u7406\u5668\u7684\u9ad8\u541e\u5410\u91cfSM2\u6570\u5b57\u7b7e\u540d\u8ba1\u7b97\u65b9\u6848\u300b"}),"\n"]})]})}function d(s={}){const{wrapper:e}={...(0,l.R)(),...s.components};return e?(0,n.jsx)(e,{...s,children:(0,n.jsx)(h,{...s})}):h(s)}},3458:(s,e,a)=>{a.d(e,{A:()=>n});const n=a.p+"assets/images/arithmetic-28487b30a0c105dda3236fded59b9ecc.png"},1690:(s,e,a)=>{a.d(e,{A:()=>n});const n=a.p+"assets/images/arithmetic2-7ac7a86d079a583963d4add1bb388bb1.png"},4383:(s,e,a)=>{a.d(e,{A:()=>n});const n=a.p+"assets/images/core-bed7bc12d6b40dd07e1370db6b1c3e5f.png"},1017:(s,e,a)=>{a.d(e,{A:()=>n});const n=a.p+"assets/images/result-50cc21f15137a8c85f883bd1832576ae.png"},8453:(s,e,a)=>{a.d(e,{R:()=>m,x:()=>c});var n=a(6540);const l={},i=n.createContext(l);function m(s){const e=n.useContext(i);return n.useMemo((function(){return"function"==typeof s?s(e):{...e,...s}}),[e,s])}function c(s){let e;return e=s.disableParentContext?"function"==typeof s.components?s.components(l):s.components||l:m(s.components),n.createElement(i.Provider,{value:e},s.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.