group___finite_field_primitives.html 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048
  1. <!-- HTML header for doxygen 1.8.10-->
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  6. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  7. <meta name="generator" content="Doxygen 1.8.11"/>
  8. <title>Intel&reg; Enhanced Privacy ID SDK: finitefield</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="resize.js"></script>
  14. <script type="text/javascript" src="navtreedata.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <script type="text/javascript">
  17. $(document).ready(initResizable);
  18. $(window).load(resizeHeight);
  19. </script>
  20. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  21. <link href="epidstyle.css" rel="stylesheet" type="text/css"/>
  22. </head>
  23. <body>
  24. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  25. <div id="titlearea">
  26. <table cellspacing="0" cellpadding="0">
  27. <tbody>
  28. <tr style="height: 56px;">
  29. <td id="projectalign" style="padding-left: 0.5em;">
  30. <div id="projectname"><a
  31. onclick="storeLink('index.html')"
  32. id="projectlink"
  33. class="index.html"
  34. href="index.html">Intel&reg; Enhanced Privacy ID SDK</a>
  35. &#160;<span id="projectnumber">2.0.0</span>
  36. </div>
  37. </td>
  38. </tr>
  39. </tbody>
  40. </table>
  41. </div>
  42. <!-- end header part -->
  43. <!-- Generated by Doxygen 1.8.11 -->
  44. </div><!-- top -->
  45. <div id="side-nav" class="ui-resizable side-nav-resizable">
  46. <div id="nav-tree">
  47. <div id="nav-tree-contents">
  48. <div id="nav-sync" class="sync"></div>
  49. </div>
  50. </div>
  51. <div id="splitbar" style="-moz-user-select:none;"
  52. class="ui-resizable-handle">
  53. </div>
  54. </div>
  55. <script type="text/javascript">
  56. $(document).ready(function(){initNavTree('group___finite_field_primitives.html','');});
  57. </script>
  58. <div id="doc-content">
  59. <div class="header">
  60. <div class="summary">
  61. <a href="#typedef-members">Typedefs</a> &#124;
  62. <a href="#func-members">Functions</a> </div>
  63. <div class="headertitle">
  64. <div class="title">finitefield<div class="ingroups"><a class="el" href="group___epid_module.html">epid</a> &raquo; <a class="el" href="group___epid_common.html">common</a> &raquo; <a class="el" href="group___epid_math.html">math</a></div></div> </div>
  65. </div><!--header-->
  66. <div class="contents">
  67. <p>Finite field operations.
  68. <a href="#details">More...</a></p>
  69. <table class="memberdecls">
  70. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
  71. Typedefs</h2></td></tr>
  72. <tr class="memitem:gab281b24e336a8b3d7d90079d862d969e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab281b24e336a8b3d7d90079d862d969e"></a>
  73. typedef struct <a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a></td></tr>
  74. <tr class="memdesc:gab281b24e336a8b3d7d90079d862d969e"><td class="mdescLeft">&#160;</td><td class="mdescRight">A finite field. <br /></td></tr>
  75. <tr class="separator:gab281b24e336a8b3d7d90079d862d969e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  76. <tr class="memitem:ga6cff5c7c06b07a87442b810ccc0a86fa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6cff5c7c06b07a87442b810ccc0a86fa"></a>
  77. typedef struct <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a></td></tr>
  78. <tr class="memdesc:ga6cff5c7c06b07a87442b810ccc0a86fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">An element in a finite field. <br /></td></tr>
  79. <tr class="separator:ga6cff5c7c06b07a87442b810ccc0a86fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  80. </table><table class="memberdecls">
  81. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  82. Functions</h2></td></tr>
  83. <tr class="memitem:ga7d99fdc5e4573668a5744e49df7ab67c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#ga7d99fdc5e4573668a5744e49df7ab67c">NewFiniteField</a> (<a class="el" href="struct_big_num_str.html">BigNumStr</a> const *prime, <a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> **ff)</td></tr>
  84. <tr class="memdesc:ga7d99fdc5e4573668a5744e49df7ab67c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates new finite field. <a href="#ga7d99fdc5e4573668a5744e49df7ab67c">More...</a><br /></td></tr>
  85. <tr class="separator:ga7d99fdc5e4573668a5744e49df7ab67c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  86. <tr class="memitem:ga83041e3be9984a4bd8f1021934bfa3a2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#ga83041e3be9984a4bd8f1021934bfa3a2">NewFiniteFieldViaBinomalExtension</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> const *ground_field, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *ground_element, int degree, <a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> **ff)</td></tr>
  87. <tr class="memdesc:ga83041e3be9984a4bd8f1021934bfa3a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new finite field using binomial extension. <a href="#ga83041e3be9984a4bd8f1021934bfa3a2">More...</a><br /></td></tr>
  88. <tr class="separator:ga83041e3be9984a4bd8f1021934bfa3a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  89. <tr class="memitem:gacbdd2871ecf93dadaac9d2c5b16e1e5f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#gacbdd2871ecf93dadaac9d2c5b16e1e5f">DeleteFiniteField</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> **ff)</td></tr>
  90. <tr class="memdesc:gacbdd2871ecf93dadaac9d2c5b16e1e5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees a previously allocated FiniteField. <a href="#gacbdd2871ecf93dadaac9d2c5b16e1e5f">More...</a><br /></td></tr>
  91. <tr class="separator:gacbdd2871ecf93dadaac9d2c5b16e1e5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  92. <tr class="memitem:gacc54f315ede2dbeb8c5990c024a0de6c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#gacc54f315ede2dbeb8c5990c024a0de6c">NewFfElement</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> const *ff, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> **new_ff_elem)</td></tr>
  93. <tr class="memdesc:gacc54f315ede2dbeb8c5990c024a0de6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new finite field element. <a href="#gacc54f315ede2dbeb8c5990c024a0de6c">More...</a><br /></td></tr>
  94. <tr class="separator:gacc54f315ede2dbeb8c5990c024a0de6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  95. <tr class="memitem:ga1bad3c6945d1d709fceb07a1dd03000e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#ga1bad3c6945d1d709fceb07a1dd03000e">DeleteFfElement</a> (<a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> **ff_elem)</td></tr>
  96. <tr class="memdesc:ga1bad3c6945d1d709fceb07a1dd03000e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees a previously allocated FfElement. <a href="#ga1bad3c6945d1d709fceb07a1dd03000e">More...</a><br /></td></tr>
  97. <tr class="separator:ga1bad3c6945d1d709fceb07a1dd03000e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  98. <tr class="memitem:ga884d9e1baadf29a410244a735853e3c7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#ga884d9e1baadf29a410244a735853e3c7">ReadFfElement</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *ff, void const *ff_elem_str, size_t strlen, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *ff_elem)</td></tr>
  99. <tr class="memdesc:ga884d9e1baadf29a410244a735853e3c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deserializes a FfElement from a string. <a href="#ga884d9e1baadf29a410244a735853e3c7">More...</a><br /></td></tr>
  100. <tr class="separator:ga884d9e1baadf29a410244a735853e3c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. <tr class="memitem:ga678694636708463b078d842d5c58a900"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#ga678694636708463b078d842d5c58a900">WriteFfElement</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *ff, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *ff_elem, void *ff_elem_str, size_t strlen)</td></tr>
  102. <tr class="memdesc:ga678694636708463b078d842d5c58a900"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serializes a finite field element to a string. <a href="#ga678694636708463b078d842d5c58a900">More...</a><br /></td></tr>
  103. <tr class="separator:ga678694636708463b078d842d5c58a900"><td class="memSeparator" colspan="2">&#160;</td></tr>
  104. <tr class="memitem:gae7a8c7503b6fc7a41bcaab4d45ca37b2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#gae7a8c7503b6fc7a41bcaab4d45ca37b2">FfNeg</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *ff, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *a, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *r)</td></tr>
  105. <tr class="memdesc:gae7a8c7503b6fc7a41bcaab4d45ca37b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the additive inverse of a finite field element. <a href="#gae7a8c7503b6fc7a41bcaab4d45ca37b2">More...</a><br /></td></tr>
  106. <tr class="separator:gae7a8c7503b6fc7a41bcaab4d45ca37b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  107. <tr class="memitem:ga26069d035d0f6ade33af2b5d5c14949a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#ga26069d035d0f6ade33af2b5d5c14949a">FfInv</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *ff, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *a, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *r)</td></tr>
  108. <tr class="memdesc:ga26069d035d0f6ade33af2b5d5c14949a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the multiplicative inverse of a finite field element. <a href="#ga26069d035d0f6ade33af2b5d5c14949a">More...</a><br /></td></tr>
  109. <tr class="separator:ga26069d035d0f6ade33af2b5d5c14949a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  110. <tr class="memitem:ga1a6e6d3c2319bb24eae8670b021e223b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#ga1a6e6d3c2319bb24eae8670b021e223b">FfAdd</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *ff, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *a, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *b, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *r)</td></tr>
  111. <tr class="memdesc:ga1a6e6d3c2319bb24eae8670b021e223b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds two finite field elements. <a href="#ga1a6e6d3c2319bb24eae8670b021e223b">More...</a><br /></td></tr>
  112. <tr class="separator:ga1a6e6d3c2319bb24eae8670b021e223b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  113. <tr class="memitem:ga4613a75bd001a974b3e3e494c3a112a5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#ga4613a75bd001a974b3e3e494c3a112a5">FfMul</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *ff, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *a, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *b, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *r)</td></tr>
  114. <tr class="memdesc:ga4613a75bd001a974b3e3e494c3a112a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multiplies two finite field elements. <a href="#ga4613a75bd001a974b3e3e494c3a112a5">More...</a><br /></td></tr>
  115. <tr class="separator:ga4613a75bd001a974b3e3e494c3a112a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <tr class="memitem:ga20d9140e5670d679ef8183d9b5115f53"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#ga20d9140e5670d679ef8183d9b5115f53">FfIsZero</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *ff, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *a, <a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a> *is_zero)</td></tr>
  117. <tr class="memdesc:ga20d9140e5670d679ef8183d9b5115f53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if given finite field element is the additive identity (zero). <a href="#ga20d9140e5670d679ef8183d9b5115f53">More...</a><br /></td></tr>
  118. <tr class="separator:ga20d9140e5670d679ef8183d9b5115f53"><td class="memSeparator" colspan="2">&#160;</td></tr>
  119. <tr class="memitem:gaf0ddbc1bad048d67771cba119eb44a6c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#gaf0ddbc1bad048d67771cba119eb44a6c">FfExp</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *ff, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *a, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *b, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *r)</td></tr>
  120. <tr class="memdesc:gaf0ddbc1bad048d67771cba119eb44a6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Raises an element of a finite field to a power. <a href="#gaf0ddbc1bad048d67771cba119eb44a6c">More...</a><br /></td></tr>
  121. <tr class="separator:gaf0ddbc1bad048d67771cba119eb44a6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. <tr class="memitem:ga84d21decc1c957bcf6e98e1492eb2ac3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#ga84d21decc1c957bcf6e98e1492eb2ac3">FfMultiExp</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *ff, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const **a, <a class="el" href="struct_big_num_str.html">BigNumStr</a> const **b, size_t m, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *r)</td></tr>
  123. <tr class="memdesc:ga84d21decc1c957bcf6e98e1492eb2ac3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multi-exponentiates finite field elements. <a href="#ga84d21decc1c957bcf6e98e1492eb2ac3">More...</a><br /></td></tr>
  124. <tr class="separator:ga84d21decc1c957bcf6e98e1492eb2ac3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  125. <tr class="memitem:ga0d0c31a22bbfb665a16b2d25b0cd2634"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#ga0d0c31a22bbfb665a16b2d25b0cd2634">FfSscmMultiExp</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *ff, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const **a, <a class="el" href="struct_big_num_str.html">BigNumStr</a> const **b, size_t m, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *r)</td></tr>
  126. <tr class="memdesc:ga0d0c31a22bbfb665a16b2d25b0cd2634"><td class="mdescLeft">&#160;</td><td class="mdescRight">Software side-channel mitigated implementation of FfMultiExp. <a href="#ga0d0c31a22bbfb665a16b2d25b0cd2634">More...</a><br /></td></tr>
  127. <tr class="separator:ga0d0c31a22bbfb665a16b2d25b0cd2634"><td class="memSeparator" colspan="2">&#160;</td></tr>
  128. <tr class="memitem:gaed2acb8583e9c9f6b49fdb660c672625"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#gaed2acb8583e9c9f6b49fdb660c672625">FfIsEqual</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *ff, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *a, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *b, <a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a> *is_equal)</td></tr>
  129. <tr class="memdesc:gaed2acb8583e9c9f6b49fdb660c672625"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if two finite field elements are equal. <a href="#gaed2acb8583e9c9f6b49fdb660c672625">More...</a><br /></td></tr>
  130. <tr class="separator:gaed2acb8583e9c9f6b49fdb660c672625"><td class="memSeparator" colspan="2">&#160;</td></tr>
  131. <tr class="memitem:ga18a952cebb4a1274c73e6cb0c19e8aea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#ga18a952cebb4a1274c73e6cb0c19e8aea">FfHash</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *ff, void const *msg, size_t msg_len, <a class="el" href="group___epid_types.html#ga5e450438f6f9a5eacd0cf5ce354ec890">HashAlg</a> hash_alg, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *r)</td></tr>
  132. <tr class="memdesc:ga18a952cebb4a1274c73e6cb0c19e8aea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Hashes an arbitrary message to an element in a finite field. <a href="#ga18a952cebb4a1274c73e6cb0c19e8aea">More...</a><br /></td></tr>
  133. <tr class="separator:ga18a952cebb4a1274c73e6cb0c19e8aea"><td class="memSeparator" colspan="2">&#160;</td></tr>
  134. <tr class="memitem:ga6622db072782fd9e53b4d59dd3dbd8e8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___finite_field_primitives.html#ga6622db072782fd9e53b4d59dd3dbd8e8">FfGetRandom</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *ff, <a class="el" href="struct_big_num_str.html">BigNumStr</a> const *low_bound, <a class="el" href="group___epid_common.html#ga6119a2c0323a3fca9e502b24bc378c2c">BitSupplier</a> rnd_func, void *rnd_param, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *r)</td></tr>
  135. <tr class="memdesc:ga6622db072782fd9e53b4d59dd3dbd8e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate random finite field element. <a href="#ga6622db072782fd9e53b4d59dd3dbd8e8">More...</a><br /></td></tr>
  136. <tr class="separator:ga6622db072782fd9e53b4d59dd3dbd8e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  137. </table>
  138. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  139. <p>Finite field operations. </p>
  140. <p>provides APIs for working with finite fields. Finite fields allow simple mathematical operations based on a finite set of discrete values. the results of these operations are also contained in the same set.</p>
  141. <p>A simple example of a finite field is all integers from zero that are less than a given value.</p>
  142. <p>The elements (<a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa" title="An element in a finite field. ">FfElement</a>) of a finite field can be used in a variety of simple mathematical operations that result in elements of the same field. </p>
  143. <h2 class="groupheader">Function Documentation</h2>
  144. <a class="anchor" id="ga1bad3c6945d1d709fceb07a1dd03000e"></a>
  145. <div class="memitem">
  146. <div class="memproto">
  147. <table class="memname">
  148. <tr>
  149. <td class="memname">void DeleteFfElement </td>
  150. <td>(</td>
  151. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> **&#160;</td>
  152. <td class="paramname"><em>ff_elem</em></td><td>)</td>
  153. <td></td>
  154. </tr>
  155. </table>
  156. </div><div class="memdoc">
  157. <p>Frees a previously allocated FfElement. </p>
  158. <p>Frees memory pointed to by ff_elem. Nulls the pointer.</p>
  159. <dl class="params"><dt>Parameters</dt><dd>
  160. <table class="params">
  161. <tr><td class="paramdir">[in]</td><td class="paramname">ff_elem</td><td>The finite field element. Can be NULL.</td></tr>
  162. </table>
  163. </dd>
  164. </dl>
  165. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#gacc54f315ede2dbeb8c5990c024a0de6c" title="Creates a new finite field element. ">NewFfElement</a> </dd></dl>
  166. </div>
  167. </div>
  168. <a class="anchor" id="gacbdd2871ecf93dadaac9d2c5b16e1e5f"></a>
  169. <div class="memitem">
  170. <div class="memproto">
  171. <table class="memname">
  172. <tr>
  173. <td class="memname">void DeleteFiniteField </td>
  174. <td>(</td>
  175. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> **&#160;</td>
  176. <td class="paramname"><em>ff</em></td><td>)</td>
  177. <td></td>
  178. </tr>
  179. </table>
  180. </div><div class="memdoc">
  181. <p>Frees a previously allocated FiniteField. </p>
  182. <p>Frees memory pointed to by finite field. Nulls the pointer.</p>
  183. <dl class="params"><dt>Parameters</dt><dd>
  184. <table class="params">
  185. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The Finite field. Can be NULL.</td></tr>
  186. </table>
  187. </dd>
  188. </dl>
  189. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#ga7d99fdc5e4573668a5744e49df7ab67c" title="Creates new finite field. ">NewFiniteField</a> </dd></dl>
  190. </div>
  191. </div>
  192. <a class="anchor" id="ga1a6e6d3c2319bb24eae8670b021e223b"></a>
  193. <div class="memitem">
  194. <div class="memproto">
  195. <table class="memname">
  196. <tr>
  197. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> FfAdd </td>
  198. <td>(</td>
  199. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *&#160;</td>
  200. <td class="paramname"><em>ff</em>, </td>
  201. </tr>
  202. <tr>
  203. <td class="paramkey"></td>
  204. <td></td>
  205. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *&#160;</td>
  206. <td class="paramname"><em>a</em>, </td>
  207. </tr>
  208. <tr>
  209. <td class="paramkey"></td>
  210. <td></td>
  211. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *&#160;</td>
  212. <td class="paramname"><em>b</em>, </td>
  213. </tr>
  214. <tr>
  215. <td class="paramkey"></td>
  216. <td></td>
  217. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *&#160;</td>
  218. <td class="paramname"><em>r</em>&#160;</td>
  219. </tr>
  220. <tr>
  221. <td></td>
  222. <td>)</td>
  223. <td></td><td></td>
  224. </tr>
  225. </table>
  226. </div><div class="memdoc">
  227. <p>Adds two finite field elements. </p>
  228. <dl class="params"><dt>Parameters</dt><dd>
  229. <table class="params">
  230. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The finite field. </td></tr>
  231. <tr><td class="paramdir">[out]</td><td class="paramname">a</td><td>The left hand parameter. </td></tr>
  232. <tr><td class="paramdir">[out]</td><td class="paramname">b</td><td>The right hand parameter. </td></tr>
  233. <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>The result of adding a and b.</td></tr>
  234. </table>
  235. </dd>
  236. </dl>
  237. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a> </dd></dl>
  238. </div>
  239. </div>
  240. <a class="anchor" id="gaf0ddbc1bad048d67771cba119eb44a6c"></a>
  241. <div class="memitem">
  242. <div class="memproto">
  243. <table class="memname">
  244. <tr>
  245. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> FfExp </td>
  246. <td>(</td>
  247. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *&#160;</td>
  248. <td class="paramname"><em>ff</em>, </td>
  249. </tr>
  250. <tr>
  251. <td class="paramkey"></td>
  252. <td></td>
  253. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *&#160;</td>
  254. <td class="paramname"><em>a</em>, </td>
  255. </tr>
  256. <tr>
  257. <td class="paramkey"></td>
  258. <td></td>
  259. <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *&#160;</td>
  260. <td class="paramname"><em>b</em>, </td>
  261. </tr>
  262. <tr>
  263. <td class="paramkey"></td>
  264. <td></td>
  265. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *&#160;</td>
  266. <td class="paramname"><em>r</em>&#160;</td>
  267. </tr>
  268. <tr>
  269. <td></td>
  270. <td>)</td>
  271. <td></td><td></td>
  272. </tr>
  273. </table>
  274. </div><div class="memdoc">
  275. <p>Raises an element of a finite field to a power. </p>
  276. <dl class="params"><dt>Parameters</dt><dd>
  277. <table class="params">
  278. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The finite field in which to perform the operation </td></tr>
  279. <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>The base. </td></tr>
  280. <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>The power. </td></tr>
  281. <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>The result of raising a to the power b.</td></tr>
  282. </table>
  283. </dd>
  284. </dl>
  285. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  286. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#ga7d99fdc5e4573668a5744e49df7ab67c" title="Creates new finite field. ">NewFiniteField</a> </dd>
  287. <dd>
  288. <a class="el" href="group___finite_field_primitives.html#gacc54f315ede2dbeb8c5990c024a0de6c" title="Creates a new finite field element. ">NewFfElement</a> </dd></dl>
  289. </div>
  290. </div>
  291. <a class="anchor" id="ga6622db072782fd9e53b4d59dd3dbd8e8"></a>
  292. <div class="memitem">
  293. <div class="memproto">
  294. <table class="memname">
  295. <tr>
  296. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> FfGetRandom </td>
  297. <td>(</td>
  298. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *&#160;</td>
  299. <td class="paramname"><em>ff</em>, </td>
  300. </tr>
  301. <tr>
  302. <td class="paramkey"></td>
  303. <td></td>
  304. <td class="paramtype"><a class="el" href="struct_big_num_str.html">BigNumStr</a> const *&#160;</td>
  305. <td class="paramname"><em>low_bound</em>, </td>
  306. </tr>
  307. <tr>
  308. <td class="paramkey"></td>
  309. <td></td>
  310. <td class="paramtype"><a class="el" href="group___epid_common.html#ga6119a2c0323a3fca9e502b24bc378c2c">BitSupplier</a>&#160;</td>
  311. <td class="paramname"><em>rnd_func</em>, </td>
  312. </tr>
  313. <tr>
  314. <td class="paramkey"></td>
  315. <td></td>
  316. <td class="paramtype">void *&#160;</td>
  317. <td class="paramname"><em>rnd_param</em>, </td>
  318. </tr>
  319. <tr>
  320. <td class="paramkey"></td>
  321. <td></td>
  322. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *&#160;</td>
  323. <td class="paramname"><em>r</em>&#160;</td>
  324. </tr>
  325. <tr>
  326. <td></td>
  327. <td>)</td>
  328. <td></td><td></td>
  329. </tr>
  330. </table>
  331. </div><div class="memdoc">
  332. <p>Generate random finite field element. </p>
  333. <dl class="params"><dt>Parameters</dt><dd>
  334. <table class="params">
  335. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The finite field associated with the random finite field element. </td></tr>
  336. <tr><td class="paramdir">[in]</td><td class="paramname">low_bound</td><td>Lower bound of the random finite field to be generated. </td></tr>
  337. <tr><td class="paramdir">[in]</td><td class="paramname">rnd_func</td><td>Random number generator. </td></tr>
  338. <tr><td class="paramdir">[in]</td><td class="paramname">rnd_param</td><td>Pass through context data for rnd_func. </td></tr>
  339. <tr><td class="paramdir">[in,out]</td><td class="paramname">r</td><td>The random finite field element.</td></tr>
  340. </table>
  341. </dd>
  342. </dl>
  343. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  344. <dl class="retval"><dt>Return values</dt><dd>
  345. <table class="retval">
  346. <tr><td class="paramname"><a class="el" href="group___error_codes.html#ggafdb27c77c2c4b32c807e326a8a0da360a61234ad9610406da6bf7977afd72a357" title="reached max iteration for random number generation ">kEpidRandMaxIterErr</a></td><td>the function should be called again with different random data.</td></tr>
  347. </table>
  348. </dd>
  349. </dl>
  350. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#gacc54f315ede2dbeb8c5990c024a0de6c" title="Creates a new finite field element. ">NewFfElement</a> </dd>
  351. <dd>
  352. <a class="el" href="group___epid_common.html#ga6119a2c0323a3fca9e502b24bc378c2c" title="Generates random data. ">BitSupplier</a> </dd></dl>
  353. </div>
  354. </div>
  355. <a class="anchor" id="ga18a952cebb4a1274c73e6cb0c19e8aea"></a>
  356. <div class="memitem">
  357. <div class="memproto">
  358. <table class="memname">
  359. <tr>
  360. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> FfHash </td>
  361. <td>(</td>
  362. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *&#160;</td>
  363. <td class="paramname"><em>ff</em>, </td>
  364. </tr>
  365. <tr>
  366. <td class="paramkey"></td>
  367. <td></td>
  368. <td class="paramtype">void const *&#160;</td>
  369. <td class="paramname"><em>msg</em>, </td>
  370. </tr>
  371. <tr>
  372. <td class="paramkey"></td>
  373. <td></td>
  374. <td class="paramtype">size_t&#160;</td>
  375. <td class="paramname"><em>msg_len</em>, </td>
  376. </tr>
  377. <tr>
  378. <td class="paramkey"></td>
  379. <td></td>
  380. <td class="paramtype"><a class="el" href="group___epid_types.html#ga5e450438f6f9a5eacd0cf5ce354ec890">HashAlg</a>&#160;</td>
  381. <td class="paramname"><em>hash_alg</em>, </td>
  382. </tr>
  383. <tr>
  384. <td class="paramkey"></td>
  385. <td></td>
  386. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *&#160;</td>
  387. <td class="paramname"><em>r</em>&#160;</td>
  388. </tr>
  389. <tr>
  390. <td></td>
  391. <td>)</td>
  392. <td></td><td></td>
  393. </tr>
  394. </table>
  395. </div><div class="memdoc">
  396. <p>Hashes an arbitrary message to an element in a finite field. </p>
  397. <dl class="params"><dt>Parameters</dt><dd>
  398. <table class="params">
  399. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The finite field. </td></tr>
  400. <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>The message. </td></tr>
  401. <tr><td class="paramdir">[in]</td><td class="paramname">msg_len</td><td>The size of msg in bytes. </td></tr>
  402. <tr><td class="paramdir">[in]</td><td class="paramname">hash_alg</td><td>The hash algorithm. </td></tr>
  403. <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>The hashed value.</td></tr>
  404. </table>
  405. </dd>
  406. </dl>
  407. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  408. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#ga7d99fdc5e4573668a5744e49df7ab67c" title="Creates new finite field. ">NewFiniteField</a> </dd>
  409. <dd>
  410. <a class="el" href="group___finite_field_primitives.html#gacc54f315ede2dbeb8c5990c024a0de6c" title="Creates a new finite field element. ">NewFfElement</a> </dd></dl>
  411. </div>
  412. </div>
  413. <a class="anchor" id="ga26069d035d0f6ade33af2b5d5c14949a"></a>
  414. <div class="memitem">
  415. <div class="memproto">
  416. <table class="memname">
  417. <tr>
  418. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> FfInv </td>
  419. <td>(</td>
  420. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *&#160;</td>
  421. <td class="paramname"><em>ff</em>, </td>
  422. </tr>
  423. <tr>
  424. <td class="paramkey"></td>
  425. <td></td>
  426. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *&#160;</td>
  427. <td class="paramname"><em>a</em>, </td>
  428. </tr>
  429. <tr>
  430. <td class="paramkey"></td>
  431. <td></td>
  432. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *&#160;</td>
  433. <td class="paramname"><em>r</em>&#160;</td>
  434. </tr>
  435. <tr>
  436. <td></td>
  437. <td>)</td>
  438. <td></td><td></td>
  439. </tr>
  440. </table>
  441. </div><div class="memdoc">
  442. <p>Calculates the multiplicative inverse of a finite field element. </p>
  443. <dl class="params"><dt>Parameters</dt><dd>
  444. <table class="params">
  445. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The finite field. </td></tr>
  446. <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>The element. </td></tr>
  447. <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>The inverted element.</td></tr>
  448. </table>
  449. </dd>
  450. </dl>
  451. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  452. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#ga7d99fdc5e4573668a5744e49df7ab67c" title="Creates new finite field. ">NewFiniteField</a> </dd>
  453. <dd>
  454. <a class="el" href="group___finite_field_primitives.html#gacc54f315ede2dbeb8c5990c024a0de6c" title="Creates a new finite field element. ">NewFfElement</a> </dd></dl>
  455. </div>
  456. </div>
  457. <a class="anchor" id="gaed2acb8583e9c9f6b49fdb660c672625"></a>
  458. <div class="memitem">
  459. <div class="memproto">
  460. <table class="memname">
  461. <tr>
  462. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> FfIsEqual </td>
  463. <td>(</td>
  464. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *&#160;</td>
  465. <td class="paramname"><em>ff</em>, </td>
  466. </tr>
  467. <tr>
  468. <td class="paramkey"></td>
  469. <td></td>
  470. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *&#160;</td>
  471. <td class="paramname"><em>a</em>, </td>
  472. </tr>
  473. <tr>
  474. <td class="paramkey"></td>
  475. <td></td>
  476. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *&#160;</td>
  477. <td class="paramname"><em>b</em>, </td>
  478. </tr>
  479. <tr>
  480. <td class="paramkey"></td>
  481. <td></td>
  482. <td class="paramtype"><a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a> *&#160;</td>
  483. <td class="paramname"><em>is_equal</em>&#160;</td>
  484. </tr>
  485. <tr>
  486. <td></td>
  487. <td>)</td>
  488. <td></td><td></td>
  489. </tr>
  490. </table>
  491. </div><div class="memdoc">
  492. <p>Checks if two finite field elements are equal. </p>
  493. <dl class="params"><dt>Parameters</dt><dd>
  494. <table class="params">
  495. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The finite field. </td></tr>
  496. <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>An element to check. </td></tr>
  497. <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Another element to check. </td></tr>
  498. <tr><td class="paramdir">[out]</td><td class="paramname">is_equal</td><td>The result of the check.</td></tr>
  499. </table>
  500. </dd>
  501. </dl>
  502. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  503. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___ec_group_primitives.html#gaf4e23677dd378ef2e0cf55df79cbdb62" title="Constructs a new EcGroup. ">NewEcGroup</a> </dd>
  504. <dd>
  505. <a class="el" href="group___ec_group_primitives.html#ga6417b0ce72ba96de00c329e322fec7fb" title="Creates a new EcPoint. ">NewEcPoint</a> </dd></dl>
  506. </div>
  507. </div>
  508. <a class="anchor" id="ga20d9140e5670d679ef8183d9b5115f53"></a>
  509. <div class="memitem">
  510. <div class="memproto">
  511. <table class="memname">
  512. <tr>
  513. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> FfIsZero </td>
  514. <td>(</td>
  515. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *&#160;</td>
  516. <td class="paramname"><em>ff</em>, </td>
  517. </tr>
  518. <tr>
  519. <td class="paramkey"></td>
  520. <td></td>
  521. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *&#160;</td>
  522. <td class="paramname"><em>a</em>, </td>
  523. </tr>
  524. <tr>
  525. <td class="paramkey"></td>
  526. <td></td>
  527. <td class="paramtype"><a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a> *&#160;</td>
  528. <td class="paramname"><em>is_zero</em>&#160;</td>
  529. </tr>
  530. <tr>
  531. <td></td>
  532. <td>)</td>
  533. <td></td><td></td>
  534. </tr>
  535. </table>
  536. </div><div class="memdoc">
  537. <p>Checks if given finite field element is the additive identity (zero). </p>
  538. <dl class="params"><dt>Parameters</dt><dd>
  539. <table class="params">
  540. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The finite field. </td></tr>
  541. <tr><td class="paramdir">[out]</td><td class="paramname">a</td><td>The element. </td></tr>
  542. <tr><td class="paramdir">[out]</td><td class="paramname">is_zero</td><td>The result of the check.</td></tr>
  543. </table>
  544. </dd>
  545. </dl>
  546. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  547. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#ga7d99fdc5e4573668a5744e49df7ab67c" title="Creates new finite field. ">NewFiniteField</a> </dd>
  548. <dd>
  549. <a class="el" href="group___finite_field_primitives.html#gacc54f315ede2dbeb8c5990c024a0de6c" title="Creates a new finite field element. ">NewFfElement</a> </dd></dl>
  550. </div>
  551. </div>
  552. <a class="anchor" id="ga4613a75bd001a974b3e3e494c3a112a5"></a>
  553. <div class="memitem">
  554. <div class="memproto">
  555. <table class="memname">
  556. <tr>
  557. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> FfMul </td>
  558. <td>(</td>
  559. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *&#160;</td>
  560. <td class="paramname"><em>ff</em>, </td>
  561. </tr>
  562. <tr>
  563. <td class="paramkey"></td>
  564. <td></td>
  565. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *&#160;</td>
  566. <td class="paramname"><em>a</em>, </td>
  567. </tr>
  568. <tr>
  569. <td class="paramkey"></td>
  570. <td></td>
  571. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *&#160;</td>
  572. <td class="paramname"><em>b</em>, </td>
  573. </tr>
  574. <tr>
  575. <td class="paramkey"></td>
  576. <td></td>
  577. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *&#160;</td>
  578. <td class="paramname"><em>r</em>&#160;</td>
  579. </tr>
  580. <tr>
  581. <td></td>
  582. <td>)</td>
  583. <td></td><td></td>
  584. </tr>
  585. </table>
  586. </div><div class="memdoc">
  587. <p>Multiplies two finite field elements. </p>
  588. <dl class="params"><dt>Parameters</dt><dd>
  589. <table class="params">
  590. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The finite field. </td></tr>
  591. <tr><td class="paramdir">[out]</td><td class="paramname">a</td><td>The left hand parameter. </td></tr>
  592. <tr><td class="paramdir">[out]</td><td class="paramname">b</td><td>The right hand parameter. If ff is an extension field of a field F then this parameter may be an element of either ff or F. </td></tr>
  593. <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>The result of multiplying a and b.</td></tr>
  594. </table>
  595. </dd>
  596. </dl>
  597. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  598. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#ga7d99fdc5e4573668a5744e49df7ab67c" title="Creates new finite field. ">NewFiniteField</a> </dd>
  599. <dd>
  600. <a class="el" href="group___finite_field_primitives.html#gacc54f315ede2dbeb8c5990c024a0de6c" title="Creates a new finite field element. ">NewFfElement</a> </dd></dl>
  601. </div>
  602. </div>
  603. <a class="anchor" id="ga84d21decc1c957bcf6e98e1492eb2ac3"></a>
  604. <div class="memitem">
  605. <div class="memproto">
  606. <table class="memname">
  607. <tr>
  608. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> FfMultiExp </td>
  609. <td>(</td>
  610. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *&#160;</td>
  611. <td class="paramname"><em>ff</em>, </td>
  612. </tr>
  613. <tr>
  614. <td class="paramkey"></td>
  615. <td></td>
  616. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const **&#160;</td>
  617. <td class="paramname"><em>a</em>, </td>
  618. </tr>
  619. <tr>
  620. <td class="paramkey"></td>
  621. <td></td>
  622. <td class="paramtype"><a class="el" href="struct_big_num_str.html">BigNumStr</a> const **&#160;</td>
  623. <td class="paramname"><em>b</em>, </td>
  624. </tr>
  625. <tr>
  626. <td class="paramkey"></td>
  627. <td></td>
  628. <td class="paramtype">size_t&#160;</td>
  629. <td class="paramname"><em>m</em>, </td>
  630. </tr>
  631. <tr>
  632. <td class="paramkey"></td>
  633. <td></td>
  634. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *&#160;</td>
  635. <td class="paramname"><em>r</em>&#160;</td>
  636. </tr>
  637. <tr>
  638. <td></td>
  639. <td>)</td>
  640. <td></td><td></td>
  641. </tr>
  642. </table>
  643. </div><div class="memdoc">
  644. <p>Multi-exponentiates finite field elements. </p>
  645. <p>Calculates FfExp(p[0],b[0]) * ... * FfExp(p[m-1],b[m-1]) for m &gt; 1</p>
  646. <dl class="params"><dt>Parameters</dt><dd>
  647. <table class="params">
  648. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The finite field in which to perform the operation </td></tr>
  649. <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>The bases. </td></tr>
  650. <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>The powers. </td></tr>
  651. <tr><td class="paramdir">[in]</td><td class="paramname">m</td><td>Number of entries in a and b. </td></tr>
  652. <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>The result of raising each a to the corresponding power b and multiplying the results.</td></tr>
  653. </table>
  654. </dd>
  655. </dl>
  656. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  657. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#ga7d99fdc5e4573668a5744e49df7ab67c" title="Creates new finite field. ">NewFiniteField</a> </dd>
  658. <dd>
  659. <a class="el" href="group___finite_field_primitives.html#gacc54f315ede2dbeb8c5990c024a0de6c" title="Creates a new finite field element. ">NewFfElement</a> </dd></dl>
  660. </div>
  661. </div>
  662. <a class="anchor" id="gae7a8c7503b6fc7a41bcaab4d45ca37b2"></a>
  663. <div class="memitem">
  664. <div class="memproto">
  665. <table class="memname">
  666. <tr>
  667. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> FfNeg </td>
  668. <td>(</td>
  669. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *&#160;</td>
  670. <td class="paramname"><em>ff</em>, </td>
  671. </tr>
  672. <tr>
  673. <td class="paramkey"></td>
  674. <td></td>
  675. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *&#160;</td>
  676. <td class="paramname"><em>a</em>, </td>
  677. </tr>
  678. <tr>
  679. <td class="paramkey"></td>
  680. <td></td>
  681. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *&#160;</td>
  682. <td class="paramname"><em>r</em>&#160;</td>
  683. </tr>
  684. <tr>
  685. <td></td>
  686. <td>)</td>
  687. <td></td><td></td>
  688. </tr>
  689. </table>
  690. </div><div class="memdoc">
  691. <p>Calculates the additive inverse of a finite field element. </p>
  692. <dl class="params"><dt>Parameters</dt><dd>
  693. <table class="params">
  694. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The finite field. </td></tr>
  695. <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>The element. </td></tr>
  696. <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>The inverted element.</td></tr>
  697. </table>
  698. </dd>
  699. </dl>
  700. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  701. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#ga7d99fdc5e4573668a5744e49df7ab67c" title="Creates new finite field. ">NewFiniteField</a> </dd>
  702. <dd>
  703. <a class="el" href="group___finite_field_primitives.html#gacc54f315ede2dbeb8c5990c024a0de6c" title="Creates a new finite field element. ">NewFfElement</a> </dd></dl>
  704. </div>
  705. </div>
  706. <a class="anchor" id="ga0d0c31a22bbfb665a16b2d25b0cd2634"></a>
  707. <div class="memitem">
  708. <div class="memproto">
  709. <table class="memname">
  710. <tr>
  711. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> FfSscmMultiExp </td>
  712. <td>(</td>
  713. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *&#160;</td>
  714. <td class="paramname"><em>ff</em>, </td>
  715. </tr>
  716. <tr>
  717. <td class="paramkey"></td>
  718. <td></td>
  719. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const **&#160;</td>
  720. <td class="paramname"><em>a</em>, </td>
  721. </tr>
  722. <tr>
  723. <td class="paramkey"></td>
  724. <td></td>
  725. <td class="paramtype"><a class="el" href="struct_big_num_str.html">BigNumStr</a> const **&#160;</td>
  726. <td class="paramname"><em>b</em>, </td>
  727. </tr>
  728. <tr>
  729. <td class="paramkey"></td>
  730. <td></td>
  731. <td class="paramtype">size_t&#160;</td>
  732. <td class="paramname"><em>m</em>, </td>
  733. </tr>
  734. <tr>
  735. <td class="paramkey"></td>
  736. <td></td>
  737. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *&#160;</td>
  738. <td class="paramname"><em>r</em>&#160;</td>
  739. </tr>
  740. <tr>
  741. <td></td>
  742. <td>)</td>
  743. <td></td><td></td>
  744. </tr>
  745. </table>
  746. </div><div class="memdoc">
  747. <p>Software side-channel mitigated implementation of FfMultiExp. </p>
  748. <p>Calculates FfExp(p[0],b[0]) * ... * FfExp(p[m-1],b[m-1]) for m &gt; 1</p>
  749. <dl class="section attention"><dt>Attention</dt><dd>The reference implementation of FfSscmMultiExp calls FfMultiExp directly because the implementation of FfMultiExp is already side channel mitigated. Implementers providing their own versions of this function are responsible for ensuring that FfSscmMultiExp is side channel mitigated per section 8 of the Intel(R) EPID 2.0 spec.</dd></dl>
  750. <dl class="params"><dt>Parameters</dt><dd>
  751. <table class="params">
  752. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The finite field in which to perform the operation. </td></tr>
  753. <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>The bases. </td></tr>
  754. <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>The powers. </td></tr>
  755. <tr><td class="paramdir">[in]</td><td class="paramname">m</td><td>Number of entries in a and b. </td></tr>
  756. <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>The result of raising each a to the corresponding power b and multiplying the results.</td></tr>
  757. </table>
  758. </dd>
  759. </dl>
  760. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  761. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#ga7d99fdc5e4573668a5744e49df7ab67c" title="Creates new finite field. ">NewFiniteField</a> </dd>
  762. <dd>
  763. <a class="el" href="group___finite_field_primitives.html#gacc54f315ede2dbeb8c5990c024a0de6c" title="Creates a new finite field element. ">NewFfElement</a> </dd></dl>
  764. </div>
  765. </div>
  766. <a class="anchor" id="gacc54f315ede2dbeb8c5990c024a0de6c"></a>
  767. <div class="memitem">
  768. <div class="memproto">
  769. <table class="memname">
  770. <tr>
  771. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> NewFfElement </td>
  772. <td>(</td>
  773. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> const *&#160;</td>
  774. <td class="paramname"><em>ff</em>, </td>
  775. </tr>
  776. <tr>
  777. <td class="paramkey"></td>
  778. <td></td>
  779. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> **&#160;</td>
  780. <td class="paramname"><em>new_ff_elem</em>&#160;</td>
  781. </tr>
  782. <tr>
  783. <td></td>
  784. <td>)</td>
  785. <td></td><td></td>
  786. </tr>
  787. </table>
  788. </div><div class="memdoc">
  789. <p>Creates a new finite field element. </p>
  790. <p>Allocates memory and creates a new finite field element.</p>
  791. <p>Use <a class="el" href="group___finite_field_primitives.html#ga1bad3c6945d1d709fceb07a1dd03000e" title="Frees a previously allocated FfElement. ">DeleteFfElement()</a> to free memory.</p>
  792. <dl class="params"><dt>Parameters</dt><dd>
  793. <table class="params">
  794. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The finite field. </td></tr>
  795. <tr><td class="paramdir">[out]</td><td class="paramname">new_ff_elem</td><td>The Newly constructed finite field element.</td></tr>
  796. </table>
  797. </dd>
  798. </dl>
  799. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  800. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#ga7d99fdc5e4573668a5744e49df7ab67c" title="Creates new finite field. ">NewFiniteField</a> </dd>
  801. <dd>
  802. <a class="el" href="group___finite_field_primitives.html#ga1bad3c6945d1d709fceb07a1dd03000e" title="Frees a previously allocated FfElement. ">DeleteFfElement</a> </dd></dl>
  803. </div>
  804. </div>
  805. <a class="anchor" id="ga7d99fdc5e4573668a5744e49df7ab67c"></a>
  806. <div class="memitem">
  807. <div class="memproto">
  808. <table class="memname">
  809. <tr>
  810. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> NewFiniteField </td>
  811. <td>(</td>
  812. <td class="paramtype"><a class="el" href="struct_big_num_str.html">BigNumStr</a> const *&#160;</td>
  813. <td class="paramname"><em>prime</em>, </td>
  814. </tr>
  815. <tr>
  816. <td class="paramkey"></td>
  817. <td></td>
  818. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> **&#160;</td>
  819. <td class="paramname"><em>ff</em>&#160;</td>
  820. </tr>
  821. <tr>
  822. <td></td>
  823. <td>)</td>
  824. <td></td><td></td>
  825. </tr>
  826. </table>
  827. </div><div class="memdoc">
  828. <p>Creates new finite field. </p>
  829. <p>Allocates memory and creates a new finite field GF(prime).</p>
  830. <p>Use <a class="el" href="group___finite_field_primitives.html#gacbdd2871ecf93dadaac9d2c5b16e1e5f" title="Frees a previously allocated FiniteField. ">DeleteFiniteField()</a> to free memory.</p>
  831. <dl class="params"><dt>Parameters</dt><dd>
  832. <table class="params">
  833. <tr><td class="paramdir">[in]</td><td class="paramname">prime</td><td>The order of finite field. </td></tr>
  834. <tr><td class="paramdir">[out]</td><td class="paramname">ff</td><td>The Newly constructed finite field.</td></tr>
  835. </table>
  836. </dd>
  837. </dl>
  838. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  839. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#gacbdd2871ecf93dadaac9d2c5b16e1e5f" title="Frees a previously allocated FiniteField. ">DeleteFiniteField</a> </dd></dl>
  840. </div>
  841. </div>
  842. <a class="anchor" id="ga83041e3be9984a4bd8f1021934bfa3a2"></a>
  843. <div class="memitem">
  844. <div class="memproto">
  845. <table class="memname">
  846. <tr>
  847. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> NewFiniteFieldViaBinomalExtension </td>
  848. <td>(</td>
  849. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> const *&#160;</td>
  850. <td class="paramname"><em>ground_field</em>, </td>
  851. </tr>
  852. <tr>
  853. <td class="paramkey"></td>
  854. <td></td>
  855. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *&#160;</td>
  856. <td class="paramname"><em>ground_element</em>, </td>
  857. </tr>
  858. <tr>
  859. <td class="paramkey"></td>
  860. <td></td>
  861. <td class="paramtype">int&#160;</td>
  862. <td class="paramname"><em>degree</em>, </td>
  863. </tr>
  864. <tr>
  865. <td class="paramkey"></td>
  866. <td></td>
  867. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> **&#160;</td>
  868. <td class="paramname"><em>ff</em>&#160;</td>
  869. </tr>
  870. <tr>
  871. <td></td>
  872. <td>)</td>
  873. <td></td><td></td>
  874. </tr>
  875. </table>
  876. </div><div class="memdoc">
  877. <p>Creates a new finite field using binomial extension. </p>
  878. <p>Allocates memory and creates a finite field using binomial extension.</p>
  879. <p>Use <a class="el" href="group___finite_field_primitives.html#gacbdd2871ecf93dadaac9d2c5b16e1e5f" title="Frees a previously allocated FiniteField. ">DeleteFiniteField()</a> to free memory.</p>
  880. <dl class="params"><dt>Parameters</dt><dd>
  881. <table class="params">
  882. <tr><td class="paramdir">[in]</td><td class="paramname">ground_field</td><td>The ground field. </td></tr>
  883. <tr><td class="paramdir">[in]</td><td class="paramname">ground_element</td><td>The low-order term of the extension. </td></tr>
  884. <tr><td class="paramdir">[in]</td><td class="paramname">degree</td><td>The degree of the extension. </td></tr>
  885. <tr><td class="paramdir">[out]</td><td class="paramname">ff</td><td>The Newly constructed finite field.</td></tr>
  886. </table>
  887. </dd>
  888. </dl>
  889. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  890. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#gacbdd2871ecf93dadaac9d2c5b16e1e5f" title="Frees a previously allocated FiniteField. ">DeleteFiniteField</a> </dd></dl>
  891. </div>
  892. </div>
  893. <a class="anchor" id="ga884d9e1baadf29a410244a735853e3c7"></a>
  894. <div class="memitem">
  895. <div class="memproto">
  896. <table class="memname">
  897. <tr>
  898. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> ReadFfElement </td>
  899. <td>(</td>
  900. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *&#160;</td>
  901. <td class="paramname"><em>ff</em>, </td>
  902. </tr>
  903. <tr>
  904. <td class="paramkey"></td>
  905. <td></td>
  906. <td class="paramtype">void const *&#160;</td>
  907. <td class="paramname"><em>ff_elem_str</em>, </td>
  908. </tr>
  909. <tr>
  910. <td class="paramkey"></td>
  911. <td></td>
  912. <td class="paramtype">size_t&#160;</td>
  913. <td class="paramname"><em>strlen</em>, </td>
  914. </tr>
  915. <tr>
  916. <td class="paramkey"></td>
  917. <td></td>
  918. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *&#160;</td>
  919. <td class="paramname"><em>ff_elem</em>&#160;</td>
  920. </tr>
  921. <tr>
  922. <td></td>
  923. <td>)</td>
  924. <td></td><td></td>
  925. </tr>
  926. </table>
  927. </div><div class="memdoc">
  928. <p>Deserializes a FfElement from a string. </p>
  929. <dl class="params"><dt>Parameters</dt><dd>
  930. <table class="params">
  931. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The the finite field. </td></tr>
  932. <tr><td class="paramdir">[in]</td><td class="paramname">ff_elem_str</td><td>The serialized value. </td></tr>
  933. <tr><td class="paramdir">[in]</td><td class="paramname">strlen</td><td>The size of ff_elem_str in bytes. </td></tr>
  934. <tr><td class="paramdir">[out]</td><td class="paramname">ff_elem</td><td>the target FfElement.</td></tr>
  935. </table>
  936. </dd>
  937. </dl>
  938. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  939. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#gacc54f315ede2dbeb8c5990c024a0de6c" title="Creates a new finite field element. ">NewFfElement</a> </dd>
  940. <dd>
  941. <a class="el" href="group___finite_field_primitives.html#ga678694636708463b078d842d5c58a900" title="Serializes a finite field element to a string. ">WriteFfElement</a> </dd></dl>
  942. </div>
  943. </div>
  944. <a class="anchor" id="ga678694636708463b078d842d5c58a900"></a>
  945. <div class="memitem">
  946. <div class="memproto">
  947. <table class="memname">
  948. <tr>
  949. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> WriteFfElement </td>
  950. <td>(</td>
  951. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *&#160;</td>
  952. <td class="paramname"><em>ff</em>, </td>
  953. </tr>
  954. <tr>
  955. <td class="paramkey"></td>
  956. <td></td>
  957. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *&#160;</td>
  958. <td class="paramname"><em>ff_elem</em>, </td>
  959. </tr>
  960. <tr>
  961. <td class="paramkey"></td>
  962. <td></td>
  963. <td class="paramtype">void *&#160;</td>
  964. <td class="paramname"><em>ff_elem_str</em>, </td>
  965. </tr>
  966. <tr>
  967. <td class="paramkey"></td>
  968. <td></td>
  969. <td class="paramtype">size_t&#160;</td>
  970. <td class="paramname"><em>strlen</em>&#160;</td>
  971. </tr>
  972. <tr>
  973. <td></td>
  974. <td>)</td>
  975. <td></td><td></td>
  976. </tr>
  977. </table>
  978. </div><div class="memdoc">
  979. <p>Serializes a finite field element to a string. </p>
  980. <dl class="params"><dt>Parameters</dt><dd>
  981. <table class="params">
  982. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The finite field. </td></tr>
  983. <tr><td class="paramdir">[in]</td><td class="paramname">ff_elem</td><td>The FfElement to be serialized. </td></tr>
  984. <tr><td class="paramdir">[out]</td><td class="paramname">ff_elem_str</td><td>The target string. </td></tr>
  985. <tr><td class="paramdir">[in]</td><td class="paramname">strlen</td><td>The size of ff_elem_str in bytes.</td></tr>
  986. </table>
  987. </dd>
  988. </dl>
  989. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  990. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___finite_field_primitives.html#gacc54f315ede2dbeb8c5990c024a0de6c" title="Creates a new finite field element. ">NewFfElement</a> </dd>
  991. <dd>
  992. <a class="el" href="struct_fp_elem_str.html" title="a number in [0, p-1] ">FpElemStr</a> </dd>
  993. <dd>
  994. <a class="el" href="struct_fq_elem_str.html" title="a number in [0, q-1] ">FqElemStr</a> </dd>
  995. <dd>
  996. <a class="el" href="struct_gt_elem_str.html" title="Serialized GT element. ">GtElemStr</a> </dd></dl>
  997. </div>
  998. </div>
  999. </div><!-- contents -->
  1000. </div><!-- doc-content -->
  1001. <!-- HTML footer for doxygen 1.8.10-->
  1002. <!-- start footer part -->
  1003. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  1004. <ul>
  1005. <li class="footer">
  1006. &copy; 2016 Intel Corporation
  1007. </li>
  1008. </ul>
  1009. </div>
  1010. </body>
  1011. </html>