Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > c18ee9bd72eeb0aba0917f7f57195cba > files > 87

encryptpad-docs-0.4.0.4-5.mga7.noarch.rpm

<h1>Open a plain text file, protect it with a passphrase and save as a GPG file</h1>

<p>We are going to open a plain text file, protect it with a passphrase and save as a GPG file.</p>

<h2>Open a plain text file</h2>

<p>1. Click the Open File tool button</p>

<p><img src="images/open_text_file.png" alt="Open File tool button" /></p>

<p>2. Select Plain Text file type and click Save button</p>

<p><img src="images/open_file_dialog_text_file.png" alt="Plain Text file type" /></p>

<p>3. The plain text file opened</p>

<p><img src="images/text_file_opened.png" alt="Text file opened" /></p>

<p>Now EncryptPad is in unprotected plain text mode. It works as an ordinary text editor.</p>

<p><img src="images/unprotected_status.png" alt="Unprotected mode" /></p>

<h2>Protect with a passphrase and save as a GPG file</h2>

<p>4. Click the Save As tool button.</p>

<p><img src="images/save_as_tool_button.png" alt="Save As tool button" /></p>

<p>5. Select GnuPG file type and click Save button</p>

<p><img src="images/save_as_dialog.png" alt="Save As dialogue" /></p>

<p>Please note that the file name has changed to &ldquo;war and peace.gpg&rdquo; in the Save As dialogue.</p>

<p>6. You will be asked to enter a passphrase twice. Enter <code>DemoPwd</code> for this example and click OK.</p>

<p><img src="images/set_passphrase.png" alt="Set passphrase" /></p>

<p>7. Now the file has been saved on the disk and it is encrypted with our passphrase. See the file extension and the status on the picture below.</p>

<p><img src="images/gpg_file_saved.png" alt="GPG file saved" /></p>

<h2>The GPG file on disk</h2>

<p>It is an Open PGP file. You can send it to someone who does not have EncryptPad. It is easily decrypted with <a href="https://www.gpg4win.org/">Gpg4Win</a> for example.</p>

<p><img src="images/kleopatra_decrypted.png" alt="Kleopatra decrypted our file" /></p>

<p>GPG packet &ndash;list-packets command output:</p>

<p><code>gpg --list-packets "war and peace.gpg"</code><br/></p>

<p><code>:symkey enc packet: version 4, cipher 9, s2k 3, hash 8</code><br/>
<code>       salt 9cd701f1d2e0aca8, count 65536 (96)</code><br/>
<code>gpg: AES256 encrypted data</code><br/>
<code>:encrypted data packet:</code><br/>
<code>       length: 1201175</code><br/>
<code>       mdc_method: 2</code><br/>
<code>gpg: encrypted with 1 passphrase</code><br/>
<code>:compressed packet: algo=2</code><br/>
<code>:literal data packet:</code><br/>
<code>       mode t (74), created 0, name="CONSOLE",</code><br/>
<code>       raw data: unknown length</code><br/></p>

<h2>Update the file</h2>

<p>If you modify the text now and click Save tool button, EncryptPad will not ask you to enter the passphrase again because it stores several salted hashes of your passphrase.</p>

<h2>Open another plain text file</h2>

<p>If you try to open a plain text file now, it will fail with the following message.</p>

<p><img src="images/open_another_plain_text.png" alt="Cannot open plain text" /></p>

<p>EncryptPad &ldquo;thinks&rdquo; that the file is encrypted with a passphrase because its mode is &ldquo;passphrase protected&rdquo; as you can see in the status bar. It tried to decrypt the plain text and failed. To proceed with opening the file, clear passphrase protection by clicking the Clear passphrase tool button or even better click Close and Reset. The latter will close the text file and reset both parts of the protection.</p>

<p><img src="images/clear_pwd_or_close_and_reset.png" alt="Clear passphrase or Close and Reset" /></p>

<p>Now you can open your plain text file.</p>