<!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.5"/> <title>PolarSSL v1.3.8: hmac_drbg.h Source File</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="doxygen.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 style="padding-left: 0.5em;"> <div id="projectname">PolarSSL v1.3.8 </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.5 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_6a9bbd12bf4e19a18c45e270f8fae3fd.html">include</a></li><li class="navelem"><a class="el" href="dir_04272d44da4745cf8b8bfc767d6c6523.html">polarssl</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">hmac_drbg.h</div> </div> </div><!--header--> <div class="contents"> <a href="hmac__drbg_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> </div> <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#ifndef POLARSSL_HMAC_DRBG_H</span></div> <div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_HMAC_DRBG_H</span></div> <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "<a class="code" href="md_8h.html">md.h</a>"</span></div> <div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div> <div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment">/*</span></div> <div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment"> * Error codes</span></div> <div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment"> */</span></div> <div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="hmac__drbg_8h.html#a4d06fc2204001f56acb2a1eabfbbf036"> 35</a></span> <span class="preprocessor">#define POLARSSL_ERR_HMAC_DRBG_REQUEST_TOO_BIG -0x0003 </span></div> <div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="hmac__drbg_8h.html#a63ba4f9a4e98f5d1af93e33c3e1fe3b5"> 36</a></span> <span class="preprocessor">#define POLARSSL_ERR_HMAC_DRBG_INPUT_TOO_BIG -0x0005 </span></div> <div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="hmac__drbg_8h.html#a6a560c35edcfca2ab71f39e2c70d50c8"> 37</a></span> <span class="preprocessor">#define POLARSSL_ERR_HMAC_DRBG_FILE_IO_ERROR -0x0007 </span></div> <div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="hmac__drbg_8h.html#a0d9472d39e70c4eeb3cb06177c3012f8"> 38</a></span> <span class="preprocessor">#define POLARSSL_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED -0x0009 </span></div> <div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="preprocessor">#if !defined(POLARSSL_HMAC_DRBG_RESEED_INTERVAL)</span></div> <div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="hmac__drbg_8h.html#aa3d9fee8fa351e1e9c828f39f63e89f7"> 49</a></span> <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000 </span></div> <div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="preprocessor">#endif</span></div> <div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="preprocessor">#if !defined(POLARSSL_HMAC_DRBG_MAX_INPUT)</span></div> <div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="hmac__drbg_8h.html#ad42367f0fecb12f9962f0798857b86ae"> 53</a></span> <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_HMAC_DRBG_MAX_INPUT 256 </span></div> <div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="preprocessor">#endif</span></div> <div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="preprocessor">#if !defined(POLARSSL_HMAC_DRBG_MAX_REQUEST)</span></div> <div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="hmac__drbg_8h.html#a818a91c1f898a6e1ade715a0e3acd366"> 57</a></span> <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024 </span></div> <div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="preprocessor">#endif</span></div> <div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="preprocessor">#if !defined(POLARSSL_HMAC_DRBG_MAX_SEED_INPUT)</span></div> <div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="hmac__drbg_8h.html#a0118d9721a45e6c2e784d5ddb7a93dd9"> 61</a></span> <span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384 </span></div> <div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="preprocessor">#endif</span></div> <div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment">/* \} name SECTION: Module settings */</span></div> <div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div> <div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="hmac__drbg_8h.html#a1df2abd47fc8c24f9ce5c02c86337dad"> 66</a></span> <span class="preprocessor">#define POLARSSL_HMAC_DRBG_PR_OFF 0 </span></div> <div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="hmac__drbg_8h.html#a48149f1fd6d91c46a1a4f1574cd65653"> 67</a></span> <span class="preprocessor">#define POLARSSL_HMAC_DRBG_PR_ON 1 </span></div> <div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="preprocessor">#ifdef __cplusplus</span></div> <div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div> <div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="preprocessor">#endif</span></div> <div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="structhmac__drbg__context.html"> 76</a></span> <span class="keyword">typedef</span> <span class="keyword">struct</span></div> <div class="line"><a name="l00077"></a><span class="lineno"> 77</span> {</div> <div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="comment">/* Working state: the key K is not stored explicitely,</span></div> <div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment"> * but is implied by the HMAC context */</span></div> <div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="structhmac__drbg__context.html#a83469b6f20cd1d89fabe853c2531ff8e"> 80</a></span>  <a class="code" href="structmd__context__t.html">md_context_t</a> <a class="code" href="structhmac__drbg__context.html#a83469b6f20cd1d89fabe853c2531ff8e">md_ctx</a>; </div> <div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="structhmac__drbg__context.html#a1a65ebc3659a318fe1e692db220b6c6c"> 81</a></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> V[<a class="code" href="md_8h.html#a38c76a15d6a3874f898f3dc60750dde1">POLARSSL_MD_MAX_SIZE</a>]; </div> <div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="structhmac__drbg__context.html#a1bcf4e63608464d20a75486f6a8d2eba"> 82</a></span>  <span class="keywordtype">int</span> <a class="code" href="structhmac__drbg__context.html#a1bcf4e63608464d20a75486f6a8d2eba">reseed_counter</a>; </div> <div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="comment">/* Administrative state */</span></div> <div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="structhmac__drbg__context.html#a599a085156c46b5b793837b7d7fb9b4d"> 85</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="structhmac__drbg__context.html#a599a085156c46b5b793837b7d7fb9b4d">entropy_len</a>; </div> <div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="structhmac__drbg__context.html#abe5a16c6fabcb6783df5d1b3065d9c77"> 86</a></span>  <span class="keywordtype">int</span> <a class="code" href="structhmac__drbg__context.html#abe5a16c6fabcb6783df5d1b3065d9c77">prediction_resistance</a>; </div> <div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="structhmac__drbg__context.html#a43d2193b71699be512441df40b876008"> 88</a></span>  <span class="keywordtype">int</span> <a class="code" href="structhmac__drbg__context.html#a43d2193b71699be512441df40b876008">reseed_interval</a>; </div> <div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="comment">/* Callbacks */</span></div> <div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="structhmac__drbg__context.html#a240b25c07cb7600e1b8297b655c39196"> 91</a></span>  int (*f_entropy)(<span class="keywordtype">void</span> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *, size_t); </div> <div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="structhmac__drbg__context.html#ae9a222cf524533d74c84dbd44406baf3"> 92</a></span>  <span class="keywordtype">void</span> *<a class="code" href="structhmac__drbg__context.html#ae9a222cf524533d74c84dbd44406baf3">p_entropy</a>; </div> <div class="line"><a name="l00093"></a><span class="lineno"> 93</span> } <a class="code" href="structhmac__drbg__context.html">hmac_drbg_context</a>;</div> <div class="line"><a name="l00094"></a><span class="lineno"> 94</span> </div> <div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="keywordtype">int</span> <a class="code" href="hmac__drbg_8h.html#a9c45dacf4f93959d2978b07df9f3231e">hmac_drbg_init</a>( <a class="code" href="structhmac__drbg__context.html">hmac_drbg_context</a> *ctx,</div> <div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="keyword">const</span> <a class="code" href="structmd__info__t.html">md_info_t</a> * md_info,</div> <div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordtype">int</span> (*f_entropy)(<span class="keywordtype">void</span> *, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>),</div> <div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="keywordtype">void</span> *p_entropy,</div> <div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *custom,</div> <div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="keywordtype">size_t</span> len );</div> <div class="line"><a name="l00124"></a><span class="lineno"> 124</span> </div> <div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="keywordtype">int</span> <a class="code" href="hmac__drbg_8h.html#acd163a15df844543ab5b950f4d13d65f">hmac_drbg_init_buf</a>( <a class="code" href="structhmac__drbg__context.html">hmac_drbg_context</a> *ctx,</div> <div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <span class="keyword">const</span> <a class="code" href="structmd__info__t.html">md_info_t</a> * md_info,</div> <div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *data, <span class="keywordtype">size_t</span> data_len );</div> <div class="line"><a name="l00141"></a><span class="lineno"> 141</span> </div> <div class="line"><a name="l00151"></a><span class="lineno"> 151</span> <span class="keywordtype">void</span> <a class="code" href="hmac__drbg_8h.html#aaa415a1f75ea2656beb72e26c68cbe89">hmac_drbg_set_prediction_resistance</a>( <a class="code" href="structhmac__drbg__context.html">hmac_drbg_context</a> *ctx,</div> <div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <span class="keywordtype">int</span> resistance );</div> <div class="line"><a name="l00153"></a><span class="lineno"> 153</span> </div> <div class="line"><a name="l00162"></a><span class="lineno"> 162</span> <span class="keywordtype">void</span> <a class="code" href="hmac__drbg_8h.html#a13a01d030a558fc0cea9fa2b5c66da8a">hmac_drbg_set_entropy_len</a>( <a class="code" href="structhmac__drbg__context.html">hmac_drbg_context</a> *ctx,</div> <div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="keywordtype">size_t</span> len );</div> <div class="line"><a name="l00164"></a><span class="lineno"> 164</span> </div> <div class="line"><a name="l00172"></a><span class="lineno"> 172</span> <span class="keywordtype">void</span> <a class="code" href="hmac__drbg_8h.html#ae06ae3e9279e4e6a9023f469725c8227">hmac_drbg_set_reseed_interval</a>( <a class="code" href="structhmac__drbg__context.html">hmac_drbg_context</a> *ctx,</div> <div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keywordtype">int</span> interval );</div> <div class="line"><a name="l00174"></a><span class="lineno"> 174</span> </div> <div class="line"><a name="l00185"></a><span class="lineno"> 185</span> <span class="keywordtype">void</span> <a class="code" href="hmac__drbg_8h.html#aea5f53d8763e30ec7ecf053a119f4a23">hmac_drbg_update</a>( <a class="code" href="structhmac__drbg__context.html">hmac_drbg_context</a> *ctx,</div> <div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *additional, <span class="keywordtype">size_t</span> add_len );</div> <div class="line"><a name="l00187"></a><span class="lineno"> 187</span> </div> <div class="line"><a name="l00198"></a><span class="lineno"> 198</span> <span class="keywordtype">int</span> <a class="code" href="hmac__drbg_8h.html#a881091e2fc00dd15f3eb44e47bafd180">hmac_drbg_reseed</a>( <a class="code" href="structhmac__drbg__context.html">hmac_drbg_context</a> *ctx,</div> <div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *additional, <span class="keywordtype">size_t</span> len );</div> <div class="line"><a name="l00200"></a><span class="lineno"> 200</span> </div> <div class="line"><a name="l00217"></a><span class="lineno"> 217</span> <span class="keywordtype">int</span> <a class="code" href="hmac__drbg_8h.html#ad73affb17b14ea45ee6cd3cf95187724">hmac_drbg_random_with_add</a>( <span class="keywordtype">void</span> *p_rng,</div> <div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *output, <span class="keywordtype">size_t</span> output_len,</div> <div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *additional,</div> <div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="keywordtype">size_t</span> add_len );</div> <div class="line"><a name="l00221"></a><span class="lineno"> 221</span> </div> <div class="line"><a name="l00235"></a><span class="lineno"> 235</span> <span class="keywordtype">int</span> <a class="code" href="hmac__drbg_8h.html#ab2f1d201eaba90dc66b7033fa87c1eb9">hmac_drbg_random</a>( <span class="keywordtype">void</span> *p_rng, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *output, <span class="keywordtype">size_t</span> out_len );</div> <div class="line"><a name="l00236"></a><span class="lineno"> 236</span> </div> <div class="line"><a name="l00242"></a><span class="lineno"> 242</span> <span class="keywordtype">void</span> <a class="code" href="hmac__drbg_8h.html#a3a0bf86f3afd2e39cbb3c3a08faf5e44">hmac_drbg_free</a>( <a class="code" href="structhmac__drbg__context.html">hmac_drbg_context</a> *ctx );</div> <div class="line"><a name="l00243"></a><span class="lineno"> 243</span> </div> <div class="line"><a name="l00244"></a><span class="lineno"> 244</span> <span class="preprocessor">#if defined(POLARSSL_FS_IO)</span></div> <div class="line"><a name="l00245"></a><span class="lineno"> 245</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00254"></a><span class="lineno"> 254</span> <span class="keywordtype">int</span> hmac_drbg_write_seed_file( <a class="code" href="structhmac__drbg__context.html">hmac_drbg_context</a> *ctx, <span class="keyword">const</span> <span class="keywordtype">char</span> *path );</div> <div class="line"><a name="l00255"></a><span class="lineno"> 255</span> </div> <div class="line"><a name="l00267"></a><span class="lineno"> 267</span> <span class="keywordtype">int</span> hmac_drbg_update_seed_file( <a class="code" href="structhmac__drbg__context.html">hmac_drbg_context</a> *ctx, <span class="keyword">const</span> <span class="keywordtype">char</span> *path );</div> <div class="line"><a name="l00268"></a><span class="lineno"> 268</span> <span class="preprocessor">#endif </span><span class="comment">/* POLARSSL_FS_IO */</span><span class="preprocessor"></span></div> <div class="line"><a name="l00269"></a><span class="lineno"> 269</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00270"></a><span class="lineno"> 270</span> </div> <div class="line"><a name="l00271"></a><span class="lineno"> 271</span> <span class="preprocessor">#if defined(POLARSSL_SELF_TEST)</span></div> <div class="line"><a name="l00272"></a><span class="lineno"> 272</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00277"></a><span class="lineno"> 277</span> <span class="keywordtype">int</span> hmac_drbg_self_test( <span class="keywordtype">int</span> verbose );</div> <div class="line"><a name="l00278"></a><span class="lineno"> 278</span> <span class="preprocessor">#endif</span></div> <div class="line"><a name="l00279"></a><span class="lineno"> 279</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00280"></a><span class="lineno"> 280</span> <span class="preprocessor">#ifdef __cplusplus</span></div> <div class="line"><a name="l00281"></a><span class="lineno"> 281</span> <span class="preprocessor"></span>}</div> <div class="line"><a name="l00282"></a><span class="lineno"> 282</span> <span class="preprocessor">#endif</span></div> <div class="line"><a name="l00283"></a><span class="lineno"> 283</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00284"></a><span class="lineno"> 284</span> <span class="preprocessor">#endif </span><span class="comment">/* hmac_drbg.h */</span><span class="preprocessor"></span></div> <div class="ttc" id="hmac__drbg_8h_html_a13a01d030a558fc0cea9fa2b5c66da8a"><div class="ttname"><a href="hmac__drbg_8h.html#a13a01d030a558fc0cea9fa2b5c66da8a">hmac_drbg_set_entropy_len</a></div><div class="ttdeci">void hmac_drbg_set_entropy_len(hmac_drbg_context *ctx, size_t len)</div><div class="ttdoc">Set the amount of entropy grabbed on each reseed (Default: given by the security strength, which depends on the hash used, see hmac_drbg_init() ) </div></div> <div class="ttc" id="hmac__drbg_8h_html_ab2f1d201eaba90dc66b7033fa87c1eb9"><div class="ttname"><a href="hmac__drbg_8h.html#ab2f1d201eaba90dc66b7033fa87c1eb9">hmac_drbg_random</a></div><div class="ttdeci">int hmac_drbg_random(void *p_rng, unsigned char *output, size_t out_len)</div><div class="ttdoc">HMAC_DRBG generate random. </div></div> <div class="ttc" id="hmac__drbg_8h_html_ae06ae3e9279e4e6a9023f469725c8227"><div class="ttname"><a href="hmac__drbg_8h.html#ae06ae3e9279e4e6a9023f469725c8227">hmac_drbg_set_reseed_interval</a></div><div class="ttdeci">void hmac_drbg_set_reseed_interval(hmac_drbg_context *ctx, int interval)</div><div class="ttdoc">Set the reseed interval (Default: POLARSSL_HMAC_DRBG_RESEED_INTERVAL) </div></div> <div class="ttc" id="hmac__drbg_8h_html_a881091e2fc00dd15f3eb44e47bafd180"><div class="ttname"><a href="hmac__drbg_8h.html#a881091e2fc00dd15f3eb44e47bafd180">hmac_drbg_reseed</a></div><div class="ttdeci">int hmac_drbg_reseed(hmac_drbg_context *ctx, const unsigned char *additional, size_t len)</div><div class="ttdoc">HMAC_DRBG reseeding (extracts data from entropy source) </div></div> <div class="ttc" id="structhmac__drbg__context_html"><div class="ttname"><a href="structhmac__drbg__context.html">hmac_drbg_context</a></div><div class="ttdoc">HMAC_DRBG context. </div><div class="ttdef"><b>Definition:</b> <a href="hmac__drbg_8h_source.html#l00076">hmac_drbg.h:76</a></div></div> <div class="ttc" id="hmac__drbg_8h_html_a3a0bf86f3afd2e39cbb3c3a08faf5e44"><div class="ttname"><a href="hmac__drbg_8h.html#a3a0bf86f3afd2e39cbb3c3a08faf5e44">hmac_drbg_free</a></div><div class="ttdeci">void hmac_drbg_free(hmac_drbg_context *ctx)</div><div class="ttdoc">Free an HMAC_DRBG context. </div></div> <div class="ttc" id="structhmac__drbg__context_html_ae9a222cf524533d74c84dbd44406baf3"><div class="ttname"><a href="structhmac__drbg__context.html#ae9a222cf524533d74c84dbd44406baf3">hmac_drbg_context::p_entropy</a></div><div class="ttdeci">void * p_entropy</div><div class="ttdef"><b>Definition:</b> <a href="hmac__drbg_8h_source.html#l00092">hmac_drbg.h:92</a></div></div> <div class="ttc" id="hmac__drbg_8h_html_aaa415a1f75ea2656beb72e26c68cbe89"><div class="ttname"><a href="hmac__drbg_8h.html#aaa415a1f75ea2656beb72e26c68cbe89">hmac_drbg_set_prediction_resistance</a></div><div class="ttdeci">void hmac_drbg_set_prediction_resistance(hmac_drbg_context *ctx, int resistance)</div><div class="ttdoc">Enable / disable prediction resistance (Default: Off) </div></div> <div class="ttc" id="md_8h_html"><div class="ttname"><a href="md_8h.html">md.h</a></div><div class="ttdoc">Generic message digest wrapper. </div></div> <div class="ttc" id="hmac__drbg_8h_html_a9c45dacf4f93959d2978b07df9f3231e"><div class="ttname"><a href="hmac__drbg_8h.html#a9c45dacf4f93959d2978b07df9f3231e">hmac_drbg_init</a></div><div class="ttdeci">int hmac_drbg_init(hmac_drbg_context *ctx, const md_info_t *md_info, int(*f_entropy)(void *, unsigned char *, size_t), void *p_entropy, const unsigned char *custom, size_t len)</div><div class="ttdoc">HMAC_DRBG initialisation. </div></div> <div class="ttc" id="md_8h_html_a38c76a15d6a3874f898f3dc60750dde1"><div class="ttname"><a href="md_8h.html#a38c76a15d6a3874f898f3dc60750dde1">POLARSSL_MD_MAX_SIZE</a></div><div class="ttdeci">#define POLARSSL_MD_MAX_SIZE</div><div class="ttdef"><b>Definition:</b> <a href="md_8h_source.html#l00067">md.h:67</a></div></div> <div class="ttc" id="hmac__drbg_8h_html_ad73affb17b14ea45ee6cd3cf95187724"><div class="ttname"><a href="hmac__drbg_8h.html#ad73affb17b14ea45ee6cd3cf95187724">hmac_drbg_random_with_add</a></div><div class="ttdeci">int hmac_drbg_random_with_add(void *p_rng, unsigned char *output, size_t output_len, const unsigned char *additional, size_t add_len)</div><div class="ttdoc">HMAC_DRBG generate random with additional update input. </div></div> <div class="ttc" id="structhmac__drbg__context_html_a83469b6f20cd1d89fabe853c2531ff8e"><div class="ttname"><a href="structhmac__drbg__context.html#a83469b6f20cd1d89fabe853c2531ff8e">hmac_drbg_context::md_ctx</a></div><div class="ttdeci">md_context_t md_ctx</div><div class="ttdef"><b>Definition:</b> <a href="hmac__drbg_8h_source.html#l00080">hmac_drbg.h:80</a></div></div> <div class="ttc" id="structhmac__drbg__context_html_a1bcf4e63608464d20a75486f6a8d2eba"><div class="ttname"><a href="structhmac__drbg__context.html#a1bcf4e63608464d20a75486f6a8d2eba">hmac_drbg_context::reseed_counter</a></div><div class="ttdeci">int reseed_counter</div><div class="ttdef"><b>Definition:</b> <a href="hmac__drbg_8h_source.html#l00082">hmac_drbg.h:82</a></div></div> <div class="ttc" id="hmac__drbg_8h_html_acd163a15df844543ab5b950f4d13d65f"><div class="ttname"><a href="hmac__drbg_8h.html#acd163a15df844543ab5b950f4d13d65f">hmac_drbg_init_buf</a></div><div class="ttdeci">int hmac_drbg_init_buf(hmac_drbg_context *ctx, const md_info_t *md_info, const unsigned char *data, size_t data_len)</div><div class="ttdoc">Initilisation of simpified HMAC_DRBG (never reseeds). </div></div> <div class="ttc" id="structhmac__drbg__context_html_a43d2193b71699be512441df40b876008"><div class="ttname"><a href="structhmac__drbg__context.html#a43d2193b71699be512441df40b876008">hmac_drbg_context::reseed_interval</a></div><div class="ttdeci">int reseed_interval</div><div class="ttdef"><b>Definition:</b> <a href="hmac__drbg_8h_source.html#l00088">hmac_drbg.h:88</a></div></div> <div class="ttc" id="structhmac__drbg__context_html_abe5a16c6fabcb6783df5d1b3065d9c77"><div class="ttname"><a href="structhmac__drbg__context.html#abe5a16c6fabcb6783df5d1b3065d9c77">hmac_drbg_context::prediction_resistance</a></div><div class="ttdeci">int prediction_resistance</div><div class="ttdef"><b>Definition:</b> <a href="hmac__drbg_8h_source.html#l00086">hmac_drbg.h:86</a></div></div> <div class="ttc" id="hmac__drbg_8h_html_aea5f53d8763e30ec7ecf053a119f4a23"><div class="ttname"><a href="hmac__drbg_8h.html#aea5f53d8763e30ec7ecf053a119f4a23">hmac_drbg_update</a></div><div class="ttdeci">void hmac_drbg_update(hmac_drbg_context *ctx, const unsigned char *additional, size_t add_len)</div><div class="ttdoc">HMAC_DRBG update state. </div></div> <div class="ttc" id="structhmac__drbg__context_html_a599a085156c46b5b793837b7d7fb9b4d"><div class="ttname"><a href="structhmac__drbg__context.html#a599a085156c46b5b793837b7d7fb9b4d">hmac_drbg_context::entropy_len</a></div><div class="ttdeci">size_t entropy_len</div><div class="ttdef"><b>Definition:</b> <a href="hmac__drbg_8h_source.html#l00085">hmac_drbg.h:85</a></div></div> <div class="ttc" id="structmd__info__t_html"><div class="ttname"><a href="structmd__info__t.html">md_info_t</a></div><div class="ttdoc">Message digest information. </div><div class="ttdef"><b>Definition:</b> <a href="md_8h_source.html#l00074">md.h:74</a></div></div> <div class="ttc" id="structmd__context__t_html"><div class="ttname"><a href="structmd__context__t.html">md_context_t</a></div><div class="ttdoc">Generic message digest context. </div><div class="ttdef"><b>Definition:</b> <a href="md_8h_source.html#l00132">md.h:132</a></div></div> </div><!-- fragment --></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Thu Jul 31 2014 11:35:51 for PolarSSL v1.3.8 by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.5 </small></address> </body> </html>