Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 9e72f3e7ecf68cce016a7c5c59e863d3 > files > 163

lib64polarssl-devel-1.3.8-1.mga4.x86_64.rpm

<!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: ccm.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&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;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&#160;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">ccm.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="ccm_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>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#ifndef POLARSSL_CCM_H</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define POLARSSL_CCM_H</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="cipher_8h.html">cipher.h</a>&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="ccm_8h.html#a511bce4dba4b1934174a199e716ed37d">   32</a></span>&#160;<span class="preprocessor">#define POLARSSL_ERR_CCM_BAD_INPUT      -0x000D </span></div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="ccm_8h.html#a51ba7afc7f66aa40e849813869c5d402">   33</a></span>&#160;<span class="preprocessor">#define POLARSSL_ERR_CCM_AUTH_FAILED    -0x000F </span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structccm__context.html">   42</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="structccm__context.html#a91e58dba6b94b59dd8fdce63bc2491fa">   43</a></span>&#160;    <a class="code" href="structcipher__context__t.html">cipher_context_t</a> <a class="code" href="structccm__context.html#a91e58dba6b94b59dd8fdce63bc2491fa">cipher_ctx</a>;    </div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;}</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<a class="code" href="structccm__context.html">ccm_context</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="keywordtype">int</span> <a class="code" href="ccm_8h.html#aeea3832a1d2ee9eb264e3cd9013900d8">ccm_init</a>( <a class="code" href="structccm__context.html">ccm_context</a> *ctx, <a class="code" href="cipher_8h.html#a373f5d3a0a42c77ff4f5fe4fe7da0560">cipher_id_t</a> cipher,</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;              <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *key, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> keysize );</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="keywordtype">void</span> <a class="code" href="ccm_8h.html#a884657cd0c69f0870e8ecc92dbdb9dd3">ccm_free</a>( <a class="code" href="structccm__context.html">ccm_context</a> *ctx );</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="keywordtype">int</span> <a class="code" href="ccm_8h.html#a4e501cc42e38bf5e6f9b51920213d4bd">ccm_encrypt_and_tag</a>( <a class="code" href="structccm__context.html">ccm_context</a> *ctx, <span class="keywordtype">size_t</span> length,</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;                         <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *iv, <span class="keywordtype">size_t</span> iv_len,</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;                         <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *add, <span class="keywordtype">size_t</span> add_len,</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;                         <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *input, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *output,</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;                         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *tag, <span class="keywordtype">size_t</span> tag_len );</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="keywordtype">int</span> <a class="code" href="ccm_8h.html#a3cabbc9a5e7f023d25b1e9a7e7583506">ccm_auth_decrypt</a>( <a class="code" href="structccm__context.html">ccm_context</a> *ctx, <span class="keywordtype">size_t</span> length,</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;                      <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *iv, <span class="keywordtype">size_t</span> iv_len,</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;                      <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *add, <span class="keywordtype">size_t</span> add_len,</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;                      <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *input, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *output,</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                      <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *tag, <span class="keywordtype">size_t</span> tag_len );</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<span class="preprocessor">#if defined(POLARSSL_SELF_TEST) &amp;&amp; defined(POLARSSL_AES_C)</span></div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="keywordtype">int</span> <a class="code" href="ccm_8h.html#aec9358c27a327452ef89a3d1e1392eee">ccm_self_test</a>( <span class="keywordtype">int</span> verbose );</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* POLARSSL_SELF_TEST &amp;&amp; POLARSSL_AES_C */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="preprocessor"></span>}</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* POLARSSL_CGM_H */</span><span class="preprocessor"></span></div>
<div class="ttc" id="structcipher__context__t_html"><div class="ttname"><a href="structcipher__context__t.html">cipher_context_t</a></div><div class="ttdoc">Generic cipher context. </div><div class="ttdef"><b>Definition:</b> <a href="cipher_8h_source.html#l00258">cipher.h:258</a></div></div>
<div class="ttc" id="ccm_8h_html_a3cabbc9a5e7f023d25b1e9a7e7583506"><div class="ttname"><a href="ccm_8h.html#a3cabbc9a5e7f023d25b1e9a7e7583506">ccm_auth_decrypt</a></div><div class="ttdeci">int ccm_auth_decrypt(ccm_context *ctx, size_t length, const unsigned char *iv, size_t iv_len, const unsigned char *add, size_t add_len, const unsigned char *input, unsigned char *output, const unsigned char *tag, size_t tag_len)</div><div class="ttdoc">CCM buffer authenticated decryption. </div></div>
<div class="ttc" id="structccm__context_html"><div class="ttname"><a href="structccm__context.html">ccm_context</a></div><div class="ttdoc">CCM context structure. </div><div class="ttdef"><b>Definition:</b> <a href="ccm_8h_source.html#l00042">ccm.h:42</a></div></div>
<div class="ttc" id="cipher_8h_html"><div class="ttname"><a href="cipher_8h.html">cipher.h</a></div><div class="ttdoc">Generic cipher wrapper. </div></div>
<div class="ttc" id="ccm_8h_html_aeea3832a1d2ee9eb264e3cd9013900d8"><div class="ttname"><a href="ccm_8h.html#aeea3832a1d2ee9eb264e3cd9013900d8">ccm_init</a></div><div class="ttdeci">int ccm_init(ccm_context *ctx, cipher_id_t cipher, const unsigned char *key, unsigned int keysize)</div><div class="ttdoc">CCM initialization (encryption and decryption) </div></div>
<div class="ttc" id="ccm_8h_html_aec9358c27a327452ef89a3d1e1392eee"><div class="ttname"><a href="ccm_8h.html#aec9358c27a327452ef89a3d1e1392eee">ccm_self_test</a></div><div class="ttdeci">int ccm_self_test(int verbose)</div><div class="ttdoc">Checkup routine. </div></div>
<div class="ttc" id="cipher_8h_html_a373f5d3a0a42c77ff4f5fe4fe7da0560"><div class="ttname"><a href="cipher_8h.html#a373f5d3a0a42c77ff4f5fe4fe7da0560">cipher_id_t</a></div><div class="ttdeci">cipher_id_t</div><div class="ttdef"><b>Definition:</b> <a href="cipher_8h_source.html#l00071">cipher.h:71</a></div></div>
<div class="ttc" id="ccm_8h_html_a884657cd0c69f0870e8ecc92dbdb9dd3"><div class="ttname"><a href="ccm_8h.html#a884657cd0c69f0870e8ecc92dbdb9dd3">ccm_free</a></div><div class="ttdeci">void ccm_free(ccm_context *ctx)</div><div class="ttdoc">Free a CCM context and underlying cipher sub-context. </div></div>
<div class="ttc" id="ccm_8h_html_a4e501cc42e38bf5e6f9b51920213d4bd"><div class="ttname"><a href="ccm_8h.html#a4e501cc42e38bf5e6f9b51920213d4bd">ccm_encrypt_and_tag</a></div><div class="ttdeci">int ccm_encrypt_and_tag(ccm_context *ctx, size_t length, const unsigned char *iv, size_t iv_len, const unsigned char *add, size_t add_len, const unsigned char *input, unsigned char *output, unsigned char *tag, size_t tag_len)</div><div class="ttdoc">CCM buffer encryption. </div></div>
<div class="ttc" id="structccm__context_html_a91e58dba6b94b59dd8fdce63bc2491fa"><div class="ttname"><a href="structccm__context.html#a91e58dba6b94b59dd8fdce63bc2491fa">ccm_context::cipher_ctx</a></div><div class="ttdeci">cipher_context_t cipher_ctx</div><div class="ttdef"><b>Definition:</b> <a href="ccm_8h_source.html#l00043">ccm.h:43</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 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>