⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 quickstart.xml

📁 这是一个C的源代码
💻 XML
字号:
<chapter id="quickstart"><title>Quick Start</title><para>One can experiment with the PBC libraryp without writing a single line of C.The binary <filename>pbc/pbc</filename> should be present afterPBC successfully compiles.</para><para>The <command>pbc</command> program is an interactive calculatorthat can be used to test the PBC library,and also experiment with pairings in general.</para><section id="pbcintro"><title>Playing with Pairings</title><para>We shall use the following notation. For our purposes,the pairing is a bilinear map from two cyclic groups,G1 and G2 to a third group GT, where each group has prime order r.</para><para>Run <filename>pbc/pbc</filename> and type:</para><screen>g=rnd(G1)g</screen><para>The first line generates a random element g of the group G1,while the second prints out the value of g. (The syntax was influencedby <filename>bc</filename>, an arbitrary precision calculator.)Next, enter:</para><screen>h=rnd(G2)h</screen><para>This assigns h to a random element of the group G2. Actually, thedefault pairing <filename>pbc</filename> uses is symmetric so G1 and G2are in fact the same group, but in general they are distinct. To computethe pairing applied to g and h, type:</para><screen>pairing(g,h)</screen><para>The order of both g and h is r. Let's generate two random numbers between1 and r:</para><screen>a=rnd(Zr)b=rnd(Zr)</screen><para>By bilinearity, the resulting output of both of these linesshould be identical:</para><screen>pairing(g^a,h^b)pairing(g,h)^(a*b)</screen><para>This program has <link linkend="sect.pbc">other features</link>,but the commands shown here should be enough to quickly and interactivelyexperiment with many pairing-based cryptosystems using real numbers.</para></section></chapter>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -