| 1 | |
|---|
| 2 | <?xml version="1.0" encoding="UTF-8"?> |
|---|
| 3 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|---|
| 4 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> |
|---|
| 5 | <head> |
|---|
| 6 | <style type="text/css"><!-- |
|---|
| 7 | @import url("../www/wizard.css"); |
|---|
| 8 | //--></style> |
|---|
| 9 | <title>Wizard's Toolkit: Command-line Tools: Encipher</title> |
|---|
| 10 | <meta http-equiv="Content-Language" content="en-US"/> |
|---|
| 11 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
|---|
| 12 | <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/> |
|---|
| 13 | <meta name="Generator" content="PHP"/> |
|---|
| 14 | <meta name="Keywords" content="command-line, tools:, encipher, WizardsToolkit, Wizard's, Toolkit"/> |
|---|
| 15 | <meta name="Description" content="The Wizard's Toolkit, version 1.0.2, is a free C API that includes a number of methods most developers will find useful in their projects."/> |
|---|
| 16 | <meta name="Rating" content="INDEX, FOLLOW"/> |
|---|
| 17 | <meta name="Robots" content="ALL"/> |
|---|
| 18 | <meta name="Generator" content="ImageMagick Studio LLC"/> |
|---|
| 19 | <meta name="Author" content="ImageMagick Studio LLC"/> |
|---|
| 20 | <meta name="Revisit-after" content="2 DAYS"/> |
|---|
| 21 | <meta name="Resource-type" content="document"/> |
|---|
| 22 | <meta name="Copyright" content="Copyright (c) 1999-2009 ImageMagick Studio LLC"/> |
|---|
| 23 | <meta name="Distribution" content="Global"/> |
|---|
| 24 | <link rel="shortcut icon" href="../images/wand.ico" type="images/vnd.microsoft.icon"/> |
|---|
| 25 | </head> |
|---|
| 26 | |
|---|
| 27 | <body id="www-wizards-toolkit.org"> |
|---|
| 28 | <table id="titlebar" style="width: 100%;background-color: #f5f5f5" cellpadding="0" cellspacing="0" border="0" summary="Wizard's Toolkit"> |
|---|
| 29 | <tbody> |
|---|
| 30 | <tr valign="top"> |
|---|
| 31 | <td align="left"><a href="../index.html"><img id="titlebar-west" src="../images/script.png" alt="[Wizard's Toolkit]" width="400" height="60" border="0" vspace="28" name="titlebar-west" /></a></td> |
|---|
| 32 | <td align="left"><a href="http://www.wizards-toolkit.org/" target="1028828754"><img id="titlebar-west" src="../images/sponsor.jpg" alt="[sponsor]" border="0" vspace="28" name="titlebar-west" /></a></td> |
|---|
| 33 | <td width="99%"><br /></td> |
|---|
| 34 | <td style="background-color: white" align="right"><a href="../index.html"><img src="../images/sprite.jpg" alt="" width="114" height="118" border="0" name="titlebar-east" /></a></td> |
|---|
| 35 | <td style="background-color: white" align="right"><a href="http://www.wizards-toolkit.org/discourse-server/viewforum.html?f=17" target="380072785"><img id="titlebar-east" src="../images/logo.jpg" alt="" width="114" height="118" border="0" name="titlebar-east" /></a></td> |
|---|
| 36 | </tr> |
|---|
| 37 | </tbody> |
|---|
| 38 | </table> |
|---|
| 39 | |
|---|
| 40 | <table style="width: 100%" border="0" cellpadding="0" cellspacing="0" summary=""> |
|---|
| 41 | <tbody> |
|---|
| 42 | |
|---|
| 43 | <tr valign="top" style="height: 100%;"> |
|---|
| 44 | <td id="menu" width="1%" height="100%"> |
|---|
| 45 | <p><a href="#main">Skip to page contents</a></p> |
|---|
| 46 | <font size="-1"> |
|---|
| 47 | <span>[</span> |
|---|
| 48 | <a href="../index.html">About the<br />Wizard's Toolkit</a> |
|---|
| 49 | <span>]</span><br /><span>[</span> |
|---|
| 50 | <a href="../www/command-line-tools.html">Command-line Tools</a> |
|---|
| 51 | <span>]</span><br /><span>[</span> |
|---|
| 52 | <a href="../www/api.html">Application Program<br />Interface</a> |
|---|
| 53 | <span>]</span><br /><span>[</span> |
|---|
| 54 | <a href="../www/install-source.html">Install from Source</a> |
|---|
| 55 | <a href="../www/install-source.html#unix" class="sub">Unix</a> |
|---|
| 56 | <a href="../www/install-source.html#windows" class="sub">Windows</a> |
|---|
| 57 | <a href="../www/binary-releases.html">Binary Releases</a> |
|---|
| 58 | <a href="../www/binary-releases.html#unix" class="sub">Unix</a> |
|---|
| 59 | <a href="../www/binary-releases.html#windows" class="sub">Windows</a> |
|---|
| 60 | <span>]</span><br /><span>[</span> |
|---|
| 61 | <a href="../www/download.html">Download</a> |
|---|
| 62 | <span>]</span><br /><span>[</span> |
|---|
| 63 | <a href="../www/sponsors.html">Sponsors:</a> |
|---|
| 64 | <fieldset> |
|---|
| 65 | <a href="http://www.anxietyspinnerrings.com" class="sponsor" target="sponsor">Silver Rings</a><!-- 200904010140 --> |
|---|
| 66 | <br /> |
|---|
| 67 | </fieldset> |
|---|
| 68 | <span>]</span> |
|---|
| 69 | </font> |
|---|
| 70 | </td> |
|---|
| 71 | |
|---|
| 72 | <td id="main" valign="top"> |
|---|
| 73 | <p class="navigation-index">[<a href="#usage">Example Usage</a> • <a href="#options">Option Summary</a>]</p> |
|---|
| 74 | |
|---|
| 75 | <p>The <kbd>encipher</kbd> command-line utility converts plaintext to ciphertext.</p> |
|---|
| 76 | |
|---|
| 77 | <div style="margin: auto;"> |
|---|
| 78 | <h2><a name="usage"></a>Example Usage</h2> |
|---|
| 79 | </div> |
|---|
| 80 | |
|---|
| 81 | <p>We list a few examples of the <kbd>encipher</kbd> command here to illustrate its usefulness and ease of use. To get started, lets encrypt a text file:</p> |
|---|
| 82 | |
|---|
| 83 | <pre class="text"> |
|---|
| 84 | encipher -verbose README.txt README.cip |
|---|
| 85 | </pre> |
|---|
| 86 | |
|---|
| 87 | <p>The attributes are displayed and looks like this:</p> |
|---|
| 88 | |
|---|
| 89 | <pre class="code"> |
|---|
| 90 | Filename: README.cip |
|---|
| 91 | Cipher: |
|---|
| 92 | type: AES |
|---|
| 93 | mode: CTR |
|---|
| 94 | nonce: 85b5546f57c760620000000000000000 |
|---|
| 95 | Authenticate: |
|---|
| 96 | method: Secret |
|---|
| 97 | Key: |
|---|
| 98 | hash: SHA256 |
|---|
| 99 | length: 512 |
|---|
| 100 | session: b69f10215a7b65043faa45443017a8fccacecdd04073d1b9895bdd3a5eb8ace1 |
|---|
| 101 | Entropy Generator: |
|---|
| 102 | type: BZip |
|---|
| 103 | level: 6 |
|---|
| 104 | Keyed-Hashed Message Authentication Code: |
|---|
| 105 | hash: SHA256 |
|---|
| 106 | Random Generator: |
|---|
| 107 | hash: SHA256 |
|---|
| 108 | Chunksize: 8kb |
|---|
| 109 | Dates: |
|---|
| 110 | modify: 2009-01-19T20:41:19-05:00 |
|---|
| 111 | create: 2009-01-23T15:10:47-05:00 |
|---|
| 112 | timestamp: 2009-01-23T15:13:44-05:00 |
|---|
| 113 | Protocol: 1.0 |
|---|
| 114 | Version: WizardsToolkit 1.0.6 01/23/08 http://www.wizards-toolkit.org |
|---|
| 115 | </pre> |
|---|
| 116 | |
|---|
| 117 | <p>Here Bob enciphers a message destinated for Alice. To restore the message content, Alice must know the secret key and also have a copy of Bob's private keyring:</p> |
|---|
| 118 | |
|---|
| 119 | <pre class="text"> |
|---|
| 120 | encipher -keyring ./keyring.xdm message.txt secret-message.cip |
|---|
| 121 | </pre> |
|---|
| 122 | |
|---|
| 123 | <p>To ensure your ciphertext is not easily revealed, the encipher program takes these precautions:</p> |
|---|
| 124 | |
|---|
| 125 | <h5>Passphrase</h5> |
|---|
| 126 | <p>If your command line does not include the <a href="../www/command-line-options.html#passphrase" target="wizard-options">-passphrase <em class="option">filename</em></a> option, the passphrase is interactively requested and has a maximum length of 4096 characters and symbols. The phrase can be virtually unlimited if obtained from a file. Try to make your passphrases long and unpredictable.</p> |
|---|
| 127 | <h5>Keyring</h5> |
|---|
| 128 | <p>Your secret key is stored in a private keyring. If you lose your keyring, it is impossible to restore your original message content.</p> |
|---|
| 129 | <h5>Entropy</h5> |
|---|
| 130 | <p>If the encipher program appears to halt it may be waiting for your system to generate entropy. Move your mouse or press keystrokes in another window. Once enough entropy is generated, the encipher program will complete.</p> |
|---|
| 131 | <h5>Exceptions</h5> |
|---|
| 132 | <p>If simple mistakes are made, an exception message is displayed. For example if you use '-cpher' instead of '-cipher', cipher complains. However, if anything goes wrong inside the cipher engine, the program exits with a simple status code. This precaution is to prevent information leaks about the encipher process.</p> |
|---|
| 133 | |
|---|
| 134 | <div style="margin: auto;"> |
|---|
| 135 | <h2><a name="options"></a>Option Summary</h2> |
|---|
| 136 | </div> |
|---|
| 137 | |
|---|
| 138 | <p>The <kbd>encipher</kbd> command recognizes these options. Click on an option to get more details about how that option works.</p> |
|---|
| 139 | |
|---|
| 140 | <table id="table" cellpadding="2" cellspacing="0" style="width: 93%"> |
|---|
| 141 | <tbody> |
|---|
| 142 | <tr> |
|---|
| 143 | <th align="left">Option</th> |
|---|
| 144 | <th align="left">Description</th> |
|---|
| 145 | </tr> |
|---|
| 146 | |
|---|
| 147 | <tr> |
|---|
| 148 | <td valign="top"><a href="../www/command-line-options.html#authenticate" target="wizard-options">-authenticate <em class="option">method</em></a></td> |
|---|
| 149 | <td valign="top">authenticate with this method: Secret or Public</td> |
|---|
| 150 | </tr> |
|---|
| 151 | |
|---|
| 152 | <tr> |
|---|
| 153 | <td valign="top"><a href="../www/command-line-options.html#chunksize" target="wizard-options">-chunksize <em class="option">bytes</em></a></td> |
|---|
| 154 | <td valign="top">number of bytes in a chunk</td> |
|---|
| 155 | </tr> |
|---|
| 156 | |
|---|
| 157 | <tr> |
|---|
| 158 | <td valign="top"><a href="../www/command-line-options.html#cipher" target="wizard-options">-cipher <em class="option">type</em></a></td> |
|---|
| 159 | <td valign="top">cipher to encrypt content</td> |
|---|
| 160 | </tr> |
|---|
| 161 | |
|---|
| 162 | <tr> |
|---|
| 163 | <td valign="top"><a href="../www/command-line-options.html#debug" target="wizard-options">-debug <em class="option">events</em></a></td> |
|---|
| 164 | <td valign="top">display copious debugging information</td> |
|---|
| 165 | </tr> |
|---|
| 166 | |
|---|
| 167 | <tr> |
|---|
| 168 | <td valign="top"><a href="../www/command-line-options.html#(de)compress" target="wizard-options">-(de)compress</a></td> |
|---|
| 169 | <td valign="top">automagically (de)compress BZIP and ZIP files</td> |
|---|
| 170 | </tr> |
|---|
| 171 | |
|---|
| 172 | <tr> |
|---|
| 173 | <td valign="top"><a href="../www/command-line-options.html#entropy" target="wizard-options">-entropy <em class="option">type</em></a></td> |
|---|
| 174 | <td valign="top">increase content entropy</td> |
|---|
| 175 | </tr> |
|---|
| 176 | |
|---|
| 177 | <tr> |
|---|
| 178 | <td valign="top"><a href="../www/command-line-options.html#help" target="wizard-options">-help</a></td> |
|---|
| 179 | <td valign="top">print program options</td> |
|---|
| 180 | </tr> |
|---|
| 181 | |
|---|
| 182 | <tr> |
|---|
| 183 | <td valign="top"><a href="../www/command-line-options.html#hmac" target="wizard-options">-hmac <em class="option">hash</em></a></td> |
|---|
| 184 | <td valign="top">ensure message integrity with this hash</td> |
|---|
| 185 | </tr> |
|---|
| 186 | |
|---|
| 187 | <tr> |
|---|
| 188 | <td valign="top"><a href="../www/command-line-options.html#key" target="wizard-options">-key <em class="option">hash</em></a></td> |
|---|
| 189 | <td valign="top">strengthen the key with this hash</td> |
|---|
| 190 | </tr> |
|---|
| 191 | |
|---|
| 192 | <tr> |
|---|
| 193 | <td valign="top"><a href="../www/command-line-options.html#key-length" target="wizard-options">-key-length <em class="option">value</em></a></td> |
|---|
| 194 | <td valign="top">cipher key length in bits: 256, 512, 1024, or 2048</td> |
|---|
| 195 | </tr> |
|---|
| 196 | |
|---|
| 197 | <tr> |
|---|
| 198 | <td valign="top"><a href="../www/command-line-options.html#keyring" target="wizard-options">-keyring <em class="option">filename</em></a></td> |
|---|
| 199 | <td valign="top">get private key from this keyring</td> |
|---|
| 200 | </tr> |
|---|
| 201 | |
|---|
| 202 | <tr> |
|---|
| 203 | <td valign="top"><a href="../www/command-line-options.html#level" target="wizard-options">-level <em class="option">value</em></a></td> |
|---|
| 204 | <td valign="top">entropy level: 1 (less entropy) to 9 (more entropy)</td> |
|---|
| 205 | </tr> |
|---|
| 206 | |
|---|
| 207 | <tr> |
|---|
| 208 | <td valign="top"><a href="../www/command-line-options.html#list" target="wizard-options">-list <em class="option">type</em></a></td> |
|---|
| 209 | <td valign="top">print a list of supported option arguments</td> |
|---|
| 210 | </tr> |
|---|
| 211 | |
|---|
| 212 | <tr> |
|---|
| 213 | <td valign="top"><a href="../www/command-line-options.html#log" target="wizard-options">-log <em class="option">format</em></a></td> |
|---|
| 214 | <td valign="top">format of debugging information</td> |
|---|
| 215 | </tr> |
|---|
| 216 | |
|---|
| 217 | <tr> |
|---|
| 218 | <td valign="top"><a href="../www/command-line-options.html#mode" target="wizard-options">-mode <em class="option">type</em></a></td> |
|---|
| 219 | <td valign="top">mode of encryption</td> |
|---|
| 220 | </tr> |
|---|
| 221 | |
|---|
| 222 | <tr> |
|---|
| 223 | <td valign="top"><a href="../www/command-line-options.html#passphrase" target="wizard-options">-passphrase <em class="option">filename</em></a></td> |
|---|
| 224 | <td valign="top">get the passphrase from this file</td> |
|---|
| 225 | </tr> |
|---|
| 226 | |
|---|
| 227 | <tr> |
|---|
| 228 | <td valign="top"><a href="../www/command-line-options.html#properties" target="wizard-options">-properties <em class="option">filename</em></a></td> |
|---|
| 229 | <td valign="top">cipher properties to/from this file</td> |
|---|
| 230 | </tr> |
|---|
| 231 | |
|---|
| 232 | <tr> |
|---|
| 233 | <td valign="top"><a href="../www/command-line-options.html#random" target="wizard-options">-random <em class="option">hash</em></a></td> |
|---|
| 234 | <td valign="top">strengthen random data with this hash</td> |
|---|
| 235 | </tr> |
|---|
| 236 | |
|---|
| 237 | <tr> |
|---|
| 238 | <td valign="top"><a href="../www/command-line-options.html#true-random" target="wizard-options">-true-random</a></td> |
|---|
| 239 | <td valign="top">strengthen enciphering with true random numbers</td> |
|---|
| 240 | </tr> |
|---|
| 241 | |
|---|
| 242 | <tr> |
|---|
| 243 | <td valign="top"><a href="../www/command-line-options.html#verbose" target="wizard-options">-verbose</a></td> |
|---|
| 244 | <td valign="top">print detailed information about the secure content</td> |
|---|
| 245 | </tr> |
|---|
| 246 | |
|---|
| 247 | <tr> |
|---|
| 248 | <td valign="top"><a href="../www/command-line-options.html#version" target="wizard-options">-version</a></td> |
|---|
| 249 | <td valign="top">print version information</td> |
|---|
| 250 | </tr> |
|---|
| 251 | |
|---|
| 252 | </tbody> |
|---|
| 253 | </table> |
|---|
| 254 | </td> |
|---|
| 255 | <td id="margin" width="1%" height="100%" valign="top" align="right"> </td> |
|---|
| 256 | </tr> |
|---|
| 257 | </tbody> |
|---|
| 258 | </table> |
|---|
| 259 | <div id="linkbar"> |
|---|
| 260 | <a href="http://www.wizards-toolkit.org/discourse-server/viewforum.html?f=17" target="1032305925">Discourse Server</a> | |
|---|
| 261 | <a href="../www/license.html">License</a> | |
|---|
| 262 | <a href="../www/notice.html">Notice</a> |
|---|
| 263 | </div> |
|---|
| 264 | <div id="footer"> |
|---|
| 265 | <span id="footer-west">© 1999-2009 ImageMagick Studio LLC</span> |
|---|
| 266 | </div> |
|---|
| 267 | <div style="clear: both; margin: 0; width: 100%; "></div> |
|---|
| 268 | </body> |
|---|
| 269 | </html> |
|---|