123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- <!-- HTML header for doxygen 1.8.10-->
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.11"/>
- <title>Intel® Enhanced Privacy ID SDK: ecdsa</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="navtree.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="resize.js"></script>
- <script type="text/javascript" src="navtreedata.js"></script>
- <script type="text/javascript" src="navtree.js"></script>
- <script type="text/javascript">
- $(document).ready(initResizable);
- $(window).load(resizeHeight);
- </script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- <link href="epidstyle.css" rel="stylesheet" type="text/css"/>
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname"><a
- onclick="storeLink('index.html')"
- id="projectlink"
- class="index.html"
- href="index.html">Intel® Enhanced Privacy ID SDK</a>
-  <span id="projectnumber">2.0.0</span>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.11 -->
- </div><!-- top -->
- <div id="side-nav" class="ui-resizable side-nav-resizable">
- <div id="nav-tree">
- <div id="nav-tree-contents">
- <div id="nav-sync" class="sync"></div>
- </div>
- </div>
- <div id="splitbar" style="-moz-user-select:none;"
- class="ui-resizable-handle">
- </div>
- </div>
- <script type="text/javascript">
- $(document).ready(function(){initNavTree('group___ecdsa_primitives.html','');});
- </script>
- <div id="doc-content">
- <div class="header">
- <div class="summary">
- <a href="#func-members">Functions</a> </div>
- <div class="headertitle">
- <div class="title">ecdsa<div class="ingroups"><a class="el" href="group___epid_module.html">epid</a> » <a class="el" href="group___epid_common.html">common</a> » <a class="el" href="group___epid_math.html">math</a></div></div> </div>
- </div><!--header-->
- <div class="contents">
- <p>Elliptic Curve Digital Signature Algorithm Primitives.
- <a href="#details">More...</a></p>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
- Functions</h2></td></tr>
- <tr class="memitem:gaab68de7291db6e42a01e99c2fa40057f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___ecdsa_primitives.html#gaab68de7291db6e42a01e99c2fa40057f">EcdsaVerifyBuffer</a> (void const *buf, size_t buf_len, <a class="el" href="struct_ecdsa_public_key.html">EcdsaPublicKey</a> const *pubkey, <a class="el" href="struct_ecdsa_signature.html">EcdsaSignature</a> const *sig)</td></tr>
- <tr class="memdesc:gaab68de7291db6e42a01e99c2fa40057f"><td class="mdescLeft"> </td><td class="mdescRight">Verifies authenticity of a digital signature over a buffer. <a href="#gaab68de7291db6e42a01e99c2fa40057f">More...</a><br /></td></tr>
- <tr class="separator:gaab68de7291db6e42a01e99c2fa40057f"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ga67091ecae643c1b8a0b0a4946eda7afe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___ecdsa_primitives.html#ga67091ecae643c1b8a0b0a4946eda7afe">EcdsaSignBuffer</a> (void const *buf, size_t buf_len, <a class="el" href="struct_ecdsa_private_key.html">EcdsaPrivateKey</a> const *privkey, <a class="el" href="group___epid_common.html#ga6119a2c0323a3fca9e502b24bc378c2c">BitSupplier</a> rnd_func, void *rnd_param, <a class="el" href="struct_ecdsa_signature.html">EcdsaSignature</a> *sig)</td></tr>
- <tr class="memdesc:ga67091ecae643c1b8a0b0a4946eda7afe"><td class="mdescLeft"> </td><td class="mdescRight">Creates ECDSA signature of buffer. <a href="#ga67091ecae643c1b8a0b0a4946eda7afe">More...</a><br /></td></tr>
- <tr class="separator:ga67091ecae643c1b8a0b0a4946eda7afe"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <p>Elliptic Curve Digital Signature Algorithm Primitives. </p>
- <p>Provides APIs for computing and checking buffer signatures using the Elliptic Curve Digital Signature Algorithm. </p>
- <h2 class="groupheader">Function Documentation</h2>
- <a class="anchor" id="ga67091ecae643c1b8a0b0a4946eda7afe"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> EcdsaSignBuffer </td>
- <td>(</td>
- <td class="paramtype">void const * </td>
- <td class="paramname"><em>buf</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">size_t </td>
- <td class="paramname"><em>buf_len</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="struct_ecdsa_private_key.html">EcdsaPrivateKey</a> const * </td>
- <td class="paramname"><em>privkey</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="group___epid_common.html#ga6119a2c0323a3fca9e502b24bc378c2c">BitSupplier</a> </td>
- <td class="paramname"><em>rnd_func</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>rnd_param</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="struct_ecdsa_signature.html">EcdsaSignature</a> * </td>
- <td class="paramname"><em>sig</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Creates ECDSA signature of buffer. </p>
- <p>Uses Elliptic Curve Digital Signature Algorithm (ECDSA) to generate a signature of the SHA256 hash of the input buffer with the provided private key.</p>
- <p>The operation is over the standard secp256r1 curve.</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Pointer to buffer containing message to sign. </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">buf_len</td><td>The size of buf in bytes. </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">privkey</td><td>The ECDSA private key on secp256r1 curve. </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">rnd_func</td><td>Random number generator. </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">rnd_param</td><td>Pass through context data for rnd_func. </td></tr>
- <tr><td class="paramdir">[out]</td><td class="paramname">sig</td><td>The resulting ECDSA signature.</td></tr>
- </table>
- </dd>
- </dl>
- <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>
- <dl class="retval"><dt>Return values</dt><dd>
- <table class="retval">
- <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>Failed to sign after maximum number of iterations due to bad luck in random number generation.</td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___ecdsa_primitives.html#ga67091ecae643c1b8a0b0a4946eda7afe" title="Creates ECDSA signature of buffer. ">EcdsaSignBuffer</a> </dd></dl>
- </div>
- </div>
- <a class="anchor" id="gaab68de7291db6e42a01e99c2fa40057f"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> EcdsaVerifyBuffer </td>
- <td>(</td>
- <td class="paramtype">void const * </td>
- <td class="paramname"><em>buf</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">size_t </td>
- <td class="paramname"><em>buf_len</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="struct_ecdsa_public_key.html">EcdsaPublicKey</a> const * </td>
- <td class="paramname"><em>pubkey</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="struct_ecdsa_signature.html">EcdsaSignature</a> const * </td>
- <td class="paramname"><em>sig</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Verifies authenticity of a digital signature over a buffer. </p>
- <p>Uses Elliptic Curve Digital Signature Algorithm (ECDSA) to verify that the SHA256 hash of the input buffer was signed with the private key corresponding to the provided public key.</p>
- <p>The operation is over the standard secp256r1 curve.</p>
- <dl class="section warning"><dt>Warning</dt><dd>It is the responsibility of the caller to verify the identity of the public key.</dd></dl>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramdir">[in]</td><td class="paramname">buf</td><td>Pointer to buffer containing message to verify. </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">buf_len</td><td>The size of buf in bytes. </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">pubkey</td><td>The ECDSA public key on secp256r1 curve. </td></tr>
- <tr><td class="paramdir">[in]</td><td class="paramname">sig</td><td>The ECDSA signature to be verified.</td></tr>
- </table>
- </dd>
- </dl>
- <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>
- <dl class="retval"><dt>Return values</dt><dd>
- <table class="retval">
- <tr><td class="paramname"><a class="el" href="group___error_codes.html#ggafdb27c77c2c4b32c807e326a8a0da360ab45ad60085d03c03ea30b40a0519897e" title="Signature is valid. ">kEpidSigValid</a></td><td><a class="el" href="struct_ecdsa_signature.html" title="ECDSA Signature using NIST 256-bit curve secp256r1. ">EcdsaSignature</a> is valid for the given buffer. </td></tr>
- <tr><td class="paramname"><a class="el" href="group___error_codes.html#ggafdb27c77c2c4b32c807e326a8a0da360aeedd19b8a1cbdecf963f90b4860e02b8" title="Signature is invalid. ">kEpidSigInvalid</a></td><td><a class="el" href="struct_ecdsa_signature.html" title="ECDSA Signature using NIST 256-bit curve secp256r1. ">EcdsaSignature</a> is invalid for the given buffer.</td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___ecdsa_primitives.html#ga67091ecae643c1b8a0b0a4946eda7afe" title="Creates ECDSA signature of buffer. ">EcdsaSignBuffer</a> </dd></dl>
- </div>
- </div>
- </div><!-- contents -->
- </div><!-- doc-content -->
- <!-- HTML footer for doxygen 1.8.10-->
- <!-- start footer part -->
- <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
- <ul>
- <li class="footer">
- © 2016 Intel Corporation
- </li>
- </ul>
- </div>
- </body>
- </html>
|