|
| 1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| 2 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 3 | +<html> |
| 4 | +<head> |
| 5 | + <title>Reference</title> |
| 6 | + <link rel="stylesheet" href="../luadoc.css" type="text/css" /> |
| 7 | + <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/--> |
| 8 | +</head> |
| 9 | + |
| 10 | +<body> |
| 11 | +<div id="container"> |
| 12 | + |
| 13 | +<div id="product"> |
| 14 | + <div id="product_logo"></div> |
| 15 | + <div id="product_name"><big><b></b></big></div> |
| 16 | + <div id="product_description"></div> |
| 17 | +</div> <!-- id="product" --> |
| 18 | + |
| 19 | +<div id="main"> |
| 20 | + |
| 21 | +<div id="navigation"> |
| 22 | + |
| 23 | + |
| 24 | +<h1>LuaDoc</h1> |
| 25 | +<ul> |
| 26 | + |
| 27 | + <li><a href="../index.html">Index</a></li> |
| 28 | + |
| 29 | +</ul> |
| 30 | + |
| 31 | + |
| 32 | +<!-- Module list --> |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | +<!-- File list --> |
| 37 | + |
| 38 | +<h1>Files</h1> |
| 39 | +<ul> |
| 40 | + |
| 41 | + <li><strong>salsa20.lua</strong></li> |
| 42 | + |
| 43 | +</ul> |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | +</div> <!-- id="navigation" --> |
| 51 | + |
| 52 | +<div id="content"> |
| 53 | + |
| 54 | +<h1>File <code>salsa20.lua</code></h1> |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | +<h2>Functions</h2> |
| 63 | +<table class="function_list"> |
| 64 | + |
| 65 | + <tr> |
| 66 | + <td class="name" nowrap><a href="#salsa20.decrypt">salsa20.decrypt</a> (key, nonce, ciphertext, rounds)</td> |
| 67 | + <td class="summary">Decrypt a string.</td> |
| 68 | + </tr> |
| 69 | + |
| 70 | + <tr> |
| 71 | + <td class="name" nowrap><a href="#salsa20.decrypt_table">salsa20.decrypt_table</a> (key, nonce, ciphertext, rounds)</td> |
| 72 | + <td class="summary">Decrypt a string.</td> |
| 73 | + </tr> |
| 74 | + |
| 75 | + <tr> |
| 76 | + <td class="name" nowrap><a href="#salsa20.encrypt">salsa20.encrypt</a> (key, nonce, plaintext, rounds)</td> |
| 77 | + <td class="summary">Encrypt a string.</td> |
| 78 | + </tr> |
| 79 | + |
| 80 | + <tr> |
| 81 | + <td class="name" nowrap><a href="#salsa20.encrypt_table">salsa20.encrypt_table</a> (key, nonce, plaintext, rounds)</td> |
| 82 | + <td class="summary">Encrypt a table of strings.</td> |
| 83 | + </tr> |
| 84 | + |
| 85 | + <tr> |
| 86 | + <td class="name" nowrap><a href="#salsa20.generate">salsa20.generate</a> (k, v, i, rounds)</td> |
| 87 | + <td class="summary">Generate the i^th 64-byte block of the Salsa20_k(v) 2^70-byte sequence.</td> |
| 88 | + </tr> |
| 89 | + |
| 90 | +</table> |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | +<br/> |
| 98 | +<br/> |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | +<h2><a name="functions"></a>Functions</h2> |
| 104 | +<dl class="function"> |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | +<dt><a name="salsa20.decrypt"></a><strong>salsa20.decrypt</strong> (key, nonce, ciphertext, rounds)</dt> |
| 109 | +<dd> |
| 110 | +Decrypt a string. |
| 111 | + |
| 112 | + |
| 113 | +<h3>Parameters:</h3> |
| 114 | +<ul> |
| 115 | + |
| 116 | + <li> |
| 117 | + <code><em>key</em></code>: A 16-octet or 32-octet bytestring. |
| 118 | + </li> |
| 119 | + |
| 120 | + <li> |
| 121 | + <code><em>nonce</em></code>: An 8-octet bytestring nonce. |
| 122 | + </li> |
| 123 | + |
| 124 | + <li> |
| 125 | + <code><em>ciphertext</em></code>: The encrypted message. |
| 126 | + </li> |
| 127 | + |
| 128 | + <li> |
| 129 | + <code><em>rounds</em></code>: Optional number of rounds. My be 20 (default), 12, or 8. |
| 130 | + </li> |
| 131 | + |
| 132 | +</ul> |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | +<h3>Return value:</h3> |
| 140 | +<ul>The unencrypted message.</ul> |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | +</dd> |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | +<dt><a name="salsa20.decrypt_table"></a><strong>salsa20.decrypt_table</strong> (key, nonce, ciphertext, rounds)</dt> |
| 150 | +<dd> |
| 151 | +Decrypt a string. |
| 152 | + |
| 153 | + |
| 154 | +<h3>Parameters:</h3> |
| 155 | +<ul> |
| 156 | + |
| 157 | + <li> |
| 158 | + <code><em>key</em></code>: A 16-octet or 32-octet bytestring. |
| 159 | + </li> |
| 160 | + |
| 161 | + <li> |
| 162 | + <code><em>nonce</em></code>: An 8-octet bytestring nonce. |
| 163 | + </li> |
| 164 | + |
| 165 | + <li> |
| 166 | + <code><em>ciphertext</em></code>: The encrypted messages. |
| 167 | + </li> |
| 168 | + |
| 169 | + <li> |
| 170 | + <code><em>rounds</em></code>: Optional number of rounds. My be 20 (default), 12, or 8. |
| 171 | + </li> |
| 172 | + |
| 173 | +</ul> |
| 174 | + |
| 175 | + |
| 176 | + |
| 177 | + |
| 178 | + |
| 179 | + |
| 180 | +<h3>Return value:</h3> |
| 181 | +<ul>The unencrypted messages.</ul> |
| 182 | + |
| 183 | + |
| 184 | + |
| 185 | +</dd> |
| 186 | + |
| 187 | + |
| 188 | + |
| 189 | + |
| 190 | +<dt><a name="salsa20.encrypt"></a><strong>salsa20.encrypt</strong> (key, nonce, plaintext, rounds)</dt> |
| 191 | +<dd> |
| 192 | +Encrypt a string. |
| 193 | + |
| 194 | + |
| 195 | +<h3>Parameters:</h3> |
| 196 | +<ul> |
| 197 | + |
| 198 | + <li> |
| 199 | + <code><em>key</em></code>: A 16-octet or 32-octet bytestring. |
| 200 | + </li> |
| 201 | + |
| 202 | + <li> |
| 203 | + <code><em>nonce</em></code>: An 8-octet bytestring nonce. |
| 204 | + </li> |
| 205 | + |
| 206 | + <li> |
| 207 | + <code><em>plaintext</em></code>: The unencrypted message. |
| 208 | + </li> |
| 209 | + |
| 210 | + <li> |
| 211 | + <code><em>rounds</em></code>: Optional number of rounds. My be 20 (default), 12, or 8. |
| 212 | + </li> |
| 213 | + |
| 214 | +</ul> |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | +<h3>Return value:</h3> |
| 222 | +<ul>The encrypted message.</ul> |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | +</dd> |
| 227 | + |
| 228 | + |
| 229 | + |
| 230 | + |
| 231 | +<dt><a name="salsa20.encrypt_table"></a><strong>salsa20.encrypt_table</strong> (key, nonce, plaintext, rounds)</dt> |
| 232 | +<dd> |
| 233 | +Encrypt a table of strings. |
| 234 | + |
| 235 | + |
| 236 | +<h3>Parameters:</h3> |
| 237 | +<ul> |
| 238 | + |
| 239 | + <li> |
| 240 | + <code><em>key</em></code>: A 16-octet or 32-octet bytestring. |
| 241 | + </li> |
| 242 | + |
| 243 | + <li> |
| 244 | + <code><em>nonce</em></code>: An 8-octet bytestring nonce. |
| 245 | + </li> |
| 246 | + |
| 247 | + <li> |
| 248 | + <code><em>plaintext</em></code>: The unencrypted messages. |
| 249 | + </li> |
| 250 | + |
| 251 | + <li> |
| 252 | + <code><em>rounds</em></code>: Optional number of rounds. My be 20 (default), 12, or 8. |
| 253 | + </li> |
| 254 | + |
| 255 | +</ul> |
| 256 | + |
| 257 | + |
| 258 | + |
| 259 | + |
| 260 | + |
| 261 | + |
| 262 | +<h3>Return value:</h3> |
| 263 | +<ul>The encrypted messages.</ul> |
| 264 | + |
| 265 | + |
| 266 | + |
| 267 | +</dd> |
| 268 | + |
| 269 | + |
| 270 | + |
| 271 | + |
| 272 | +<dt><a name="salsa20.generate"></a><strong>salsa20.generate</strong> (k, v, i, rounds)</dt> |
| 273 | +<dd> |
| 274 | +Generate the i^th 64-byte block of the Salsa20_k(v) 2^70-byte sequence. |
| 275 | + |
| 276 | + |
| 277 | +<h3>Parameters:</h3> |
| 278 | +<ul> |
| 279 | + |
| 280 | + <li> |
| 281 | + <code><em>k</em></code>: A 16-byte or 32-byte sequence representing the secret key. |
| 282 | + </li> |
| 283 | + |
| 284 | + <li> |
| 285 | + <code><em>v</em></code>: An 8-byte sequence representing the nonce. |
| 286 | + </li> |
| 287 | + |
| 288 | + <li> |
| 289 | + <code><em>i</em></code>: An 8-byte sequence representing the stream position of the 64-byte block. |
| 290 | + </li> |
| 291 | + |
| 292 | + <li> |
| 293 | + <code><em>rounds</em></code>: Optional number of rounds. My be 20 (default), 12, or 8. |
| 294 | + </li> |
| 295 | + |
| 296 | +</ul> |
| 297 | + |
| 298 | + |
| 299 | + |
| 300 | + |
| 301 | + |
| 302 | + |
| 303 | +<h3>Return value:</h3> |
| 304 | +<ul>A 64-byte output block.</ul> |
| 305 | + |
| 306 | + |
| 307 | + |
| 308 | +</dd> |
| 309 | + |
| 310 | + |
| 311 | +</dl> |
| 312 | + |
| 313 | + |
| 314 | + |
| 315 | + |
| 316 | + |
| 317 | + |
| 318 | + |
| 319 | +</div> <!-- id="content" --> |
| 320 | + |
| 321 | +</div> <!-- id="main" --> |
| 322 | + |
| 323 | +<div id="about"> |
| 324 | + <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p> |
| 325 | +</div> <!-- id="about" --> |
| 326 | + |
| 327 | +</div> <!-- id="container" --> |
| 328 | +</body> |
| 329 | +</html> |
0 commit comments