mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 20:00:58 +01:00
added api docs
This commit is contained in:
227
man/html/key_8h_source.html
Normal file
227
man/html/key_8h_source.html
Normal file
@@ -0,0 +1,227 @@
|
||||
<!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"/>
|
||||
<title>libpcp: key.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">libpcp
|
||||
 <span id="projectnumber">0.2.1</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.2 -->
|
||||
<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>Classes</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>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_76e3dfa7802a76391b3a5cc4012b4dd7.html">pcp</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">key.h</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div>
|
||||
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> This file is part of Pretty Curved Privacy (pcp1).</span></div>
|
||||
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"></span></div>
|
||||
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> Copyright (C) 2013-2014 T.v.Dein.</span></div>
|
||||
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"></span></div>
|
||||
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> This program is free software: you can redistribute it and/or modify</span></div>
|
||||
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> it under the terms of the GNU General Public License as published by</span></div>
|
||||
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> the Free Software Foundation, either version 3 of the License, or</span></div>
|
||||
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> (at your option) any later version.</span></div>
|
||||
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"></span></div>
|
||||
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> This program is distributed in the hope that it will be useful,</span></div>
|
||||
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
|
||||
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div>
|
||||
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> GNU General Public License for more details.</span></div>
|
||||
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"></span></div>
|
||||
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> You should have received a copy of the GNU General Public License</span></div>
|
||||
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> along with this program. If not, see <http://www.gnu.org/licenses/>.</span></div>
|
||||
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"></span></div>
|
||||
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> You can contact me by mail: <tom AT vondein DOT org>.</span></div>
|
||||
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment">*/</span></div>
|
||||
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div>
|
||||
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div>
|
||||
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#ifndef _HAVE_PCP_KEYPAIR_H</span></div>
|
||||
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor"></span><span class="preprocessor">#define _HAVE_PCP_KEYPAIR_H</span></div>
|
||||
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor"></span></div>
|
||||
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include <sodium.h></span></div>
|
||||
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <string.h></span></div>
|
||||
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include <stdio.h></span></div>
|
||||
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <time.h></span></div>
|
||||
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div>
|
||||
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "defines.h"</span></div>
|
||||
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include "platform.h"</span></div>
|
||||
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include "mem.h"</span></div>
|
||||
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include "mac.h"</span></div>
|
||||
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include "randomart.h"</span></div>
|
||||
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#include "version.h"</span></div>
|
||||
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include "z85.h"</span></div>
|
||||
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#include "uthash.h"</span></div>
|
||||
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#include "jenhash.h"</span></div>
|
||||
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor">#include "scrypt.h"</span></div>
|
||||
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="preprocessor">#include "keysig.h"</span></div>
|
||||
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div>
|
||||
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div>
|
||||
<div class="line"><a name="l00093"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html"> 93</a></span> <span class="keyword">struct </span><a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">_pcp_key_t</a> {</div>
|
||||
<div class="line"><a name="l00094"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#a776b37491c8bfd98de8f239bb9a41695"> 94</a></span>  byte <a class="code" href="struct__pcp__key__t.html#a776b37491c8bfd98de8f239bb9a41695" title="ED25519 master public key signing key.">masterpub</a>[32]; </div>
|
||||
<div class="line"><a name="l00095"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#a0df2e9e13765ae54213fb0e9cad65173"> 95</a></span>  byte <a class="code" href="struct__pcp__key__t.html#a0df2e9e13765ae54213fb0e9cad65173" title="ED25519 master secret key signing key.">mastersecret</a>[64]; </div>
|
||||
<div class="line"><a name="l00096"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#abf48278152e33968e634a4a5aea1076c"> 96</a></span>  byte <a class="code" href="struct__pcp__key__t.html#abf48278152e33968e634a4a5aea1076c" title="Curve25519 encryption public key.">pub</a>[32]; </div>
|
||||
<div class="line"><a name="l00097"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#a6d2a4ac0d698bc759b2a814f28d15282"> 97</a></span>  byte <a class="code" href="struct__pcp__key__t.html#a6d2a4ac0d698bc759b2a814f28d15282" title="Curve25519 encryption secret key.">secret</a>[32]; </div>
|
||||
<div class="line"><a name="l00098"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#a5fbb76c6d2988ee039966c19e64440ef"> 98</a></span>  byte <a class="code" href="struct__pcp__key__t.html#a5fbb76c6d2988ee039966c19e64440ef" title="ED25519 public signing key.">edpub</a>[32]; </div>
|
||||
<div class="line"><a name="l00099"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#a420b3fd1bc46d668c088c8360a53838d"> 99</a></span>  byte <a class="code" href="struct__pcp__key__t.html#a420b3fd1bc46d668c088c8360a53838d" title="ED25519 secret signing key.">edsecret</a>[64]; </div>
|
||||
<div class="line"><a name="l00100"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#a4363b752a7242f0d789ec8ca75e1c426"> 100</a></span>  byte <a class="code" href="struct__pcp__key__t.html#a4363b752a7242f0d789ec8ca75e1c426" title="random nonce used to encrypt secret keys">nonce</a>[24]; </div>
|
||||
<div class="line"><a name="l00101"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#a1da3d67421a27665dfe207403364a349"> 101</a></span>  byte <a class="code" href="struct__pcp__key__t.html#a1da3d67421a27665dfe207403364a349" title="concatenated and encrypted secret keys">encrypted</a>[176]; </div>
|
||||
<div class="line"><a name="l00102"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#a058c2dce0c18939b2b6b7b0272a7095d"> 102</a></span>  <span class="keywordtype">char</span> <a class="code" href="struct__pcp__key__t.html#a058c2dce0c18939b2b6b7b0272a7095d" title="the key owner, string">owner</a>[255]; </div>
|
||||
<div class="line"><a name="l00103"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#a6259d3e70f1ae793398e2e83eba9ae6d"> 103</a></span>  <span class="keywordtype">char</span> <a class="code" href="struct__pcp__key__t.html#a6259d3e70f1ae793398e2e83eba9ae6d" title="mail address of the owner, string">mail</a>[255]; </div>
|
||||
<div class="line"><a name="l00104"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#a99e0435c5d7a074e5969e7a83bc93f67"> 104</a></span>  <span class="keywordtype">char</span> <span class="keywordtype">id</span>[17]; </div>
|
||||
<div class="line"><a name="l00105"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#a5cefa1a4a2d1a49361aac5a3fb8d988f"> 105</a></span>  uint8_t <a class="code" href="struct__pcp__key__t.html#a5cefa1a4a2d1a49361aac5a3fb8d988f" title="key type: MASTER_SECRET or SECRET">type</a>; </div>
|
||||
<div class="line"><a name="l00106"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#ac848ee41e72b2d4da0a85288f90165fa"> 106</a></span>  uint64_t <a class="code" href="struct__pcp__key__t.html#ac848ee41e72b2d4da0a85288f90165fa" title="creation time, epoch">ctime</a>; </div>
|
||||
<div class="line"><a name="l00107"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#af9f00779fcbbedaf0b17caa3f3a6fa30"> 107</a></span>  uint32_t <a class="code" href="struct__pcp__key__t.html#af9f00779fcbbedaf0b17caa3f3a6fa30" title="key version">version</a>; </div>
|
||||
<div class="line"><a name="l00108"></a><span class="lineno"><a class="code" href="struct__pcp__key__t.html#a06aa6c7284118608fd6573a54372e263"> 108</a></span>  uint32_t <a class="code" href="struct__pcp__key__t.html#a06aa6c7284118608fd6573a54372e263" title="serial number of the key, randomly generated">serial</a>; </div>
|
||||
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  UT_hash_handle hh;</div>
|
||||
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> };</div>
|
||||
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div>
|
||||
<div class="line"><a name="l00113"></a><span class="lineno"><a class="code" href="group__KEYS.html#gae88eb39995125f3b68b4ce9175b41732"> 113</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">_pcp_key_t</a> <a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a>;</div>
|
||||
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> </div>
|
||||
<div class="line"><a name="l00122"></a><span class="lineno"><a class="code" href="struct__pcp__pubkey__t.html"> 122</a></span> <span class="keyword">struct </span><a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">_pcp_pubkey_t</a> {</div>
|
||||
<div class="line"><a name="l00123"></a><span class="lineno"><a class="code" href="struct__pcp__pubkey__t.html#a0c503b0cdf8a331d54f3affb18fd068e"> 123</a></span>  byte <a class="code" href="struct__pcp__pubkey__t.html#a0c503b0cdf8a331d54f3affb18fd068e" title="ED25519 master public key signing key.">masterpub</a>[32]; </div>
|
||||
<div class="line"><a name="l00124"></a><span class="lineno"><a class="code" href="struct__pcp__pubkey__t.html#a7e6b30f39e7107c4b3b7cd67cdc019f9"> 124</a></span>  byte <a class="code" href="struct__pcp__pubkey__t.html#a7e6b30f39e7107c4b3b7cd67cdc019f9" title="ED25519 public signing key.">sigpub</a>[32]; </div>
|
||||
<div class="line"><a name="l00125"></a><span class="lineno"><a class="code" href="struct__pcp__pubkey__t.html#a10cb7717fbf5cc0ba9584fd3c1d7bb33"> 125</a></span>  byte <a class="code" href="struct__pcp__pubkey__t.html#a10cb7717fbf5cc0ba9584fd3c1d7bb33" title="Curve25519 encryption public key.">pub</a>[32]; </div>
|
||||
<div class="line"><a name="l00126"></a><span class="lineno"><a class="code" href="struct__pcp__pubkey__t.html#a7d4d53e88c0ca2b09364394cf1dee200"> 126</a></span>  byte <a class="code" href="struct__pcp__pubkey__t.html#a7d4d53e88c0ca2b09364394cf1dee200" title="ED25519 public signing key (FIXME: huh? 2 of them???)">edpub</a>[32]; </div>
|
||||
<div class="line"><a name="l00127"></a><span class="lineno"><a class="code" href="struct__pcp__pubkey__t.html#a1cc906382ef13dc456e9a15b84843a79"> 127</a></span>  <span class="keywordtype">char</span> <a class="code" href="struct__pcp__pubkey__t.html#a1cc906382ef13dc456e9a15b84843a79" title="the key owner, string">owner</a>[255]; </div>
|
||||
<div class="line"><a name="l00128"></a><span class="lineno"><a class="code" href="struct__pcp__pubkey__t.html#a5d4e99518b3c0edcccd2917274e7cc29"> 128</a></span>  <span class="keywordtype">char</span> <a class="code" href="struct__pcp__pubkey__t.html#a5d4e99518b3c0edcccd2917274e7cc29" title="mail address of the owner, string">mail</a>[255]; </div>
|
||||
<div class="line"><a name="l00129"></a><span class="lineno"><a class="code" href="struct__pcp__pubkey__t.html#ad10eadcb9325538e71c9fd8b140dbdd2"> 129</a></span>  <span class="keywordtype">char</span> <span class="keywordtype">id</span>[17]; </div>
|
||||
<div class="line"><a name="l00130"></a><span class="lineno"><a class="code" href="struct__pcp__pubkey__t.html#a2154caabdc447e21106e117205c1259d"> 130</a></span>  uint8_t <a class="code" href="struct__pcp__pubkey__t.html#a2154caabdc447e21106e117205c1259d" title="key type: MASTER_SECRET or SECRET">type</a>; </div>
|
||||
<div class="line"><a name="l00131"></a><span class="lineno"><a class="code" href="struct__pcp__pubkey__t.html#a9ac602791697d90bf56ecb0a7a7c3714"> 131</a></span>  uint64_t <a class="code" href="struct__pcp__pubkey__t.html#a9ac602791697d90bf56ecb0a7a7c3714" title="creation time, epoch">ctime</a>; </div>
|
||||
<div class="line"><a name="l00132"></a><span class="lineno"><a class="code" href="struct__pcp__pubkey__t.html#aaebe0105dd79f3d22575dd29ff1d7356"> 132</a></span>  uint32_t <a class="code" href="struct__pcp__pubkey__t.html#aaebe0105dd79f3d22575dd29ff1d7356" title="key version">version</a>; </div>
|
||||
<div class="line"><a name="l00133"></a><span class="lineno"><a class="code" href="struct__pcp__pubkey__t.html#afd1941bc57da1a65f8038b47e3ccd21d"> 133</a></span>  uint32_t <a class="code" href="struct__pcp__pubkey__t.html#afd1941bc57da1a65f8038b47e3ccd21d" title="serial number of the key, randomly generated">serial</a>; </div>
|
||||
<div class="line"><a name="l00134"></a><span class="lineno"><a class="code" href="struct__pcp__pubkey__t.html#af93af4b3e259d6fa9e05009e564be8f7"> 134</a></span>  uint8_t <a class="code" href="struct__pcp__pubkey__t.html#af93af4b3e259d6fa9e05009e564be8f7" title="1 if import signature verified, 0 if not">valid</a>; </div>
|
||||
<div class="line"><a name="l00135"></a><span class="lineno"><a class="code" href="struct__pcp__pubkey__t.html#ad6952d39d4ebc81d0677649e5f369013"> 135</a></span>  byte <a class="code" href="struct__pcp__pubkey__t.html#ad6952d39d4ebc81d0677649e5f369013" title="raw binary blob of pubkey export signature">signature</a>[crypto_generichash_BYTES_MAX + crypto_sign_BYTES]; </div>
|
||||
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  UT_hash_handle hh;</div>
|
||||
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span> };</div>
|
||||
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span> </div>
|
||||
<div class="line"><a name="l00140"></a><span class="lineno"><a class="code" href="group__KEYS.html#ga859c793ca80717fdfc8ebef3e7224746"> 140</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">_pcp_pubkey_t</a> <a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">pcp_pubkey_t</a>;</div>
|
||||
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span> </div>
|
||||
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> </div>
|
||||
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="comment">/* the PBP public key format */</span></div>
|
||||
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span> <span class="comment">/* keys.mp+keys.cp+keys.sp+keys.name */</span></div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="keyword">struct </span>_pbp_pubkey_t {</div>
|
||||
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  byte sigpub[crypto_sign_PUBLICKEYBYTES];</div>
|
||||
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  byte edpub[crypto_sign_PUBLICKEYBYTES];</div>
|
||||
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  byte pub[crypto_box_PUBLICKEYBYTES];</div>
|
||||
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keywordtype">char</span> iso_ctime[32];</div>
|
||||
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordtype">char</span> iso_expire[32];</div>
|
||||
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="keywordtype">char</span> name[1024];</div>
|
||||
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span> };</div>
|
||||
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span> </div>
|
||||
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <span class="keyword">typedef</span> <span class="keyword">struct </span>_pbp_pubkey_t pbp_pubkey_t;</div>
|
||||
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> </div>
|
||||
<div class="line"><a name="l00166"></a><span class="lineno"><a class="code" href="struct__pcp__rec__t.html"> 166</a></span> <span class="keyword">struct </span><a class="code" href="struct__pcp__rec__t.html" title="Encrypted recipient list.">_pcp_rec_t</a> {</div>
|
||||
<div class="line"><a name="l00167"></a><span class="lineno"><a class="code" href="struct__pcp__rec__t.html#a1e3bc60866c85b917b284ed6590e4145"> 167</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="struct__pcp__rec__t.html#a1e3bc60866c85b917b284ed6590e4145" title="the size of the encrypted recipient list">ciphersize</a>; </div>
|
||||
<div class="line"><a name="l00168"></a><span class="lineno"><a class="code" href="struct__pcp__rec__t.html#a5ee9ab68d084ed116bb81bd773122ada"> 168</a></span>  byte *<a class="code" href="struct__pcp__rec__t.html#a5ee9ab68d084ed116bb81bd773122ada" title="contains the whole encrypted recipient list">cipher</a>; </div>
|
||||
<div class="line"><a name="l00169"></a><span class="lineno"><a class="code" href="struct__pcp__rec__t.html#a0167577bf19d9845c4f16c83878f74c8"> 169</a></span>  <a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *<a class="code" href="struct__pcp__rec__t.html#a0167577bf19d9845c4f16c83878f74c8" title="the secret key of the recipient for signing">secret</a>; </div>
|
||||
<div class="line"><a name="l00170"></a><span class="lineno"><a class="code" href="struct__pcp__rec__t.html#ac8918a7a90e23d54ca5d1873c6fbcd02"> 170</a></span>  <a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">pcp_pubkey_t</a> *<a class="code" href="struct__pcp__rec__t.html#ac8918a7a90e23d54ca5d1873c6fbcd02" title="if verification were ok, contains the public key of the signer">pub</a>; </div>
|
||||
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> };</div>
|
||||
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span> </div>
|
||||
<div class="line"><a name="l00174"></a><span class="lineno"><a class="code" href="group__KEYS.html#gab69d94a862952b046c6f340d3c701dd0"> 174</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__pcp__rec__t.html" title="Encrypted recipient list.">_pcp_rec_t</a> <a class="code" href="struct__pcp__rec__t.html" title="Encrypted recipient list.">pcp_rec_t</a>;</div>
|
||||
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span> </div>
|
||||
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span> <span class="preprocessor">#define PCP_RAW_KEYSIZE sizeof(pcp_key_t) - sizeof(UT_hash_handle)</span></div>
|
||||
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span> <span class="preprocessor"></span><span class="preprocessor">#define PCP_RAW_PUBKEYSIZE sizeof(pcp_pubkey_t) - sizeof(UT_hash_handle)</span></div>
|
||||
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span> <span class="preprocessor"></span></div>
|
||||
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> </div>
|
||||
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span> <a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *<a class="code" href="group__KEYS.html#gaecf6a1829b4133350a7cb694c3eca8ad" title="Generate a new key structure.">pcpkey_new</a> ();</div>
|
||||
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span> </div>
|
||||
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span> <span class="keywordtype">void</span> pcp_keypairs(byte *msk, byte *mpk, byte *csk, byte *cpk, byte *esk, byte *epk);</div>
|
||||
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span> </div>
|
||||
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span> <span class="keywordtype">char</span> *<a class="code" href="group__KEYS.html#gabdc09d45ad7a6f9f039f9240635a743f" title="Generate an ASCII art image of the public key.">pcppubkey_get_art</a>(<a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">pcp_pubkey_t</a> *k);</div>
|
||||
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span> </div>
|
||||
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span> <span class="keywordtype">char</span> *<a class="code" href="group__KEYS.html#ga13aae5cf5986e308f1af674bedf0e6fd" title="Generate an ASCII art image of the public key part of a secret key.">pcpkey_get_art</a>(<a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *k);</div>
|
||||
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span> </div>
|
||||
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span> <a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *<a class="code" href="group__KEYS.html#ga30c2d289b43fe80562fc74068f2566ae" title="Encrypt a secret key structure.">pcpkey_encrypt</a>(<a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *key, <span class="keywordtype">char</span> *passphrase);</div>
|
||||
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span> </div>
|
||||
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span> <a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *<a class="code" href="group__KEYS.html#gad91934413b36cfe316458c90ceb1eb99" title="Decrypt a secret key structure.">pcpkey_decrypt</a>(<a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *key, <span class="keywordtype">char</span> *passphrase);</div>
|
||||
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span> </div>
|
||||
<div class="line"><a name="l00300"></a><span class="lineno"> 300</span> <a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">pcp_pubkey_t</a> *<a class="code" href="group__KEYS.html#ga22c965c007208e860deaa4c145046283" title="Generate a public key structure from a given secret key structure.">pcpkey_pub_from_secret</a>(<a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *key);</div>
|
||||
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span> </div>
|
||||
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span> </div>
|
||||
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span> <span class="keywordtype">char</span> *<a class="code" href="group__KEYS.html#gaac64db4cd21af0cf79512ea0ea43261f" title="Calculate a key-id from public key fields.">pcp_getkeyid</a>(<a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *k);</div>
|
||||
<div class="line"><a name="l00320"></a><span class="lineno"> 320</span> </div>
|
||||
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span> </div>
|
||||
<div class="line"><a name="l00332"></a><span class="lineno"> 332</span> <span class="keywordtype">char</span> *<a class="code" href="group__KEYS.html#gab16e85cdb769465c8ce8808b581c7a3d" title="Calculate a key-id from public key fields.">pcp_getpubkeyid</a>(<a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">pcp_pubkey_t</a> *k);</div>
|
||||
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span> </div>
|
||||
<div class="line"><a name="l00347"></a><span class="lineno"> 347</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="group__KEYS.html#ga78309dfa0b19b697ca64d8af2e7d796d" title="Calculate a checksum of a public key.">pcppubkey_getchecksum</a>(<a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">pcp_pubkey_t</a> *k);</div>
|
||||
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span> </div>
|
||||
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="group__KEYS.html#gaa2678fef0a024456ee82d1bfa60c5fb2" title="Calculate a checksum of a public key part of the given secret key.">pcpkey_getchecksum</a>(<a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *k);</div>
|
||||
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span> </div>
|
||||
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span> </div>
|
||||
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span> <a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *<a class="code" href="group__KEYS.html#ga2cea694131a6a86a9ba76c2514ef1bff" title="Checks if a secret key structure is registered in the secret key hash.">pcpkey_exists</a>(<span class="keywordtype">char</span> *<span class="keywordtype">id</span>);</div>
|
||||
<div class="line"><a name="l00373"></a><span class="lineno"> 373</span> </div>
|
||||
<div class="line"><a name="l00386"></a><span class="lineno"> 386</span> <a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">pcp_pubkey_t</a> *<a class="code" href="group__KEYS.html#gacad3aeb15a79c5d8d848452d33db08f8" title="Checks if a public key structure is registered in the public key hash.">pcppubkey_exists</a>(<span class="keywordtype">char</span> *<span class="keywordtype">id</span>);</div>
|
||||
<div class="line"><a name="l00387"></a><span class="lineno"> 387</span> </div>
|
||||
<div class="line"><a name="l00388"></a><span class="lineno"> 388</span> <a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> * key2be(<a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *k);</div>
|
||||
<div class="line"><a name="l00389"></a><span class="lineno"> 389</span> <a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *key2native(<a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *k);</div>
|
||||
<div class="line"><a name="l00390"></a><span class="lineno"> 390</span> <a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">pcp_pubkey_t</a> * pubkey2be(<a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">pcp_pubkey_t</a> *k);</div>
|
||||
<div class="line"><a name="l00391"></a><span class="lineno"> 391</span> <a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">pcp_pubkey_t</a> *pubkey2native(<a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">pcp_pubkey_t</a> *k);</div>
|
||||
<div class="line"><a name="l00392"></a><span class="lineno"> 392</span> </div>
|
||||
<div class="line"><a name="l00401"></a><span class="lineno"> 401</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <a class="code" href="group__KEYS.html#ga201b09819c67a813de56bee423dce5c9" title="Generate a nonce.">pcp_gennonce</a>();</div>
|
||||
<div class="line"><a name="l00402"></a><span class="lineno"> 402</span> </div>
|
||||
<div class="line"><a name="l00403"></a><span class="lineno"> 403</span> <span class="comment">/* use scrypt() to create a key from a passphrase and a nonce</span></div>
|
||||
<div class="line"><a name="l00404"></a><span class="lineno"> 404</span> <span class="comment"> FIXME: use pure scrypt() instead.</span></div>
|
||||
<div class="line"><a name="l00405"></a><span class="lineno"> 405</span> <span class="comment">*/</span></div>
|
||||
<div class="line"><a name="l00406"></a><span class="lineno"> 406</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *pcp_derivekey(<span class="keywordtype">char</span> *passphrase, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *nonce);</div>
|
||||
<div class="line"><a name="l00407"></a><span class="lineno"> 407</span> </div>
|
||||
<div class="line"><a name="l00408"></a><span class="lineno"> 408</span> <span class="comment">/* FIXME: abandon and use Buffer instead */</span></div>
|
||||
<div class="line"><a name="l00409"></a><span class="lineno"> 409</span> <span class="keywordtype">void</span> pcp_seckeyblob(<span class="keywordtype">void</span> *blob, <a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *k);</div>
|
||||
<div class="line"><a name="l00410"></a><span class="lineno"> 410</span> <span class="keywordtype">void</span> pcp_pubkeyblob(<span class="keywordtype">void</span> *blob, <a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">pcp_pubkey_t</a> *k);</div>
|
||||
<div class="line"><a name="l00411"></a><span class="lineno"> 411</span> <span class="keywordtype">void</span> *pcp_keyblob(<span class="keywordtype">void</span> *k, <span class="keywordtype">int</span> type); <span class="comment">/* allocates blob */</span></div>
|
||||
<div class="line"><a name="l00412"></a><span class="lineno"> 412</span> </div>
|
||||
<div class="line"><a name="l00420"></a><span class="lineno"> 420</span> <span class="keywordtype">int</span> <a class="code" href="group__KEYS.html#gafd7aed4591ab1ef769e5d061fe77a3de" title="Make a sanity check of the given public key structure.">pcp_sanitycheck_pub</a>(<a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">pcp_pubkey_t</a> *key);</div>
|
||||
<div class="line"><a name="l00421"></a><span class="lineno"> 421</span> </div>
|
||||
<div class="line"><a name="l00429"></a><span class="lineno"> 429</span> <span class="keywordtype">int</span> <a class="code" href="group__KEYS.html#ga749e28028744cf7206492911564c559a" title="Make a sanity check of the given secret key structure.">pcp_sanitycheck_key</a>(<a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *key);</div>
|
||||
<div class="line"><a name="l00430"></a><span class="lineno"> 430</span> </div>
|
||||
<div class="line"><a name="l00435"></a><span class="lineno"> 435</span> <span class="keywordtype">void</span> <a class="code" href="group__KEYS.html#ga8aa66f20f7671d80e75d7b05a7e692c4" title="Dump a secret key structure to stderr.">pcp_dumpkey</a>(<a class="code" href="struct__pcp__key__t.html" title="PCP private key structure.">pcp_key_t</a> *k);</div>
|
||||
<div class="line"><a name="l00436"></a><span class="lineno"> 436</span> </div>
|
||||
<div class="line"><a name="l00441"></a><span class="lineno"> 441</span> <span class="keywordtype">void</span> <a class="code" href="group__KEYS.html#gaf37d43db0d210b3fbeab0929e3a76ebf" title="Dump a public key structure to stderr.">pcp_dumppubkey</a>(<a class="code" href="struct__pcp__pubkey__t.html" title="PCP public key structure.">pcp_pubkey_t</a> *k);</div>
|
||||
<div class="line"><a name="l00442"></a><span class="lineno"> 442</span> </div>
|
||||
<div class="line"><a name="l00443"></a><span class="lineno"> 443</span> </div>
|
||||
<div class="line"><a name="l00444"></a><span class="lineno"> 444</span> <span class="preprocessor">#endif </span><span class="comment">/* _HAVE_PCP_KEYPAIR_H */</span><span class="preprocessor"></span></div>
|
||||
<div class="line"><a name="l00445"></a><span class="lineno"> 445</span> <span class="preprocessor"></span></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Thu Feb 20 2014 19:59:14 for libpcp by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.2
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user