DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:encryptedpasswords

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:encryptedpasswords [2015-02-28 16:19] s.saharaplugin:encryptedpasswords [2024-04-16 11:57] (current) andi
Line 2: Line 2:
  
 ---- plugin ---- ---- plugin ----
-description: This plugin let you store 256 bit AES encrypted passwords in your DokuWiki pages. The password can be decrypted by clicking them (Javascript must be enabled). Based on the encryption library by Vincent Cheung (http://www.vincentcheung.ca/jsencryption) which incorporates the Gibberish AES library by Mark Percival (https://github.com/mdp/gibberish-aes)+description: This plugin lets you store 256 bit AES encrypted passwords in your DokuWiki pages. The password can be decrypted by clicking them. 
-author     : Wolfgang Reszel +author     : Andreas Gohr 
-email      : reszel@werbeagentur-willers.de+email      : dokuwiki@cosmocode.de
 type       : syntax, action type       : syntax, action
-lastupdate : 2015-03-01 +lastupdate : 2023-12-20 
-compatible : weatherwaxadora belle, rincewind, angua, binky, "Ponder Stibbons", Hrun+compatible : HogfatherIgor
 depends    :  depends    : 
-conflicts +conflicts dokucrypt
 similar    :  similar    : 
 tags       : convert, encryption, password tags       : convert, encryption, password
  
-downloadurl: https://github.com/ssahara/dw-plugin-encryptedpasswords/archive/master.zip +downloadurl: https://github.com/cosmocode/dokuwiki-plugin-encryptedpasswords/archive/master.zip 
-bugtracker : https://github.com/ssahara/dw-plugin-encryptedpasswords/issues +bugtracker : https://github.com/cosmocode/dokuwiki-plugin-encryptedpasswords/issues 
-sourcerepo : https://github.com/ssahara/dw-plugin-encryptedpasswords+sourcerepo : https://github.com/cosmocode/dokuwiki-plugin-encryptedpasswords
  
 ---- ----
  
-===== Download and Installation =====+This plugin is useful if you want to store passwords, API Keys or other secrets directly within your page. The passwords are stored encrypted in the wiki source files, so nobody is able to find out the passwords through the file system.
  
-Download and install the plugin using the [[plugin:plugin|Plugin Manager]] using the URL given aboveRefer to [[:Plugins]] on how to install plugins manually.+The encryption uses 256 bit AES-CBC symmetric encryption with the encryption key and IV derived from the given password using PKDF2 with SHA-256 using 10000 iterations. This is not the most secure mechanism available, but was chosen for it's compatibility with OpenSSL's ''enc'' mechanism (see below)This ensures your secrets can be decrypted without having to rely on the availability of this plugin.
  
-===== Syntax and Usage =====+All encryption and decryption is handled client side using JavaScript.
  
-This plugin is useful if you want to store passwords directly within your pageThe passwords are stored encrypted in the wiki source files, so nobody is able to find out the passwords through the file system.+This plugin was originally written by [[reszel@werbeagentur-willers.de|Wolfgang Reszel]] but has been rewritten for updated cryptography and use of modern browser APIs.
  
-To encrypt text, just select your text and click the toolbar button with the grey key: ''{{https://raw.githubusercontent.com/ssahara/dw-plugin-encryptedpasswords/master/encrypt.png|button icon}}''. Use the same encryption key on one page, as decrypting affects all passwords on a page.+The plugin is compatible with older releases of the plugin which used a MD5 based key derision functionOld style passwords will be decrypted using MD5 but any new encryption will use the new SHA-256 PKDF2 method.
  
-==== Example ==== 
-If you select "''foo ... 58979''" of the following text: 
-  foo       password 
-  π         3.14159265358979  <- enter the key "pass" 
  
-the text will be converted in the editor after encryption: +===== Download and Installation =====
-  <decrypt>U2FsdGVkX1+ywWIRvsyuIS0u0rFLhNk5d2rudYrUayapebwKo7AdT/xgqilvb/Zu +
-  5FdZupHudezVSbKhlF2tmg==</decrypt>  <- enter the key "pass"    +
  
-With version 2011-01-21 you can decrypt the text inside the editor by selecting a ''<decrypt>...</decrypt>'' block an pressing the button with the grey key.+Search and install the plugin using the [[plugin:extension|Extension Manager]]Refer to [[:Plugins]] on how to install plugins manually.
  
 +Please note that the modern encryption mechanisms used within this Plugin require a modern Browser, JavaScript enabled and a wiki served via HTTPS!
  
-===== Configuration and Settings =====+==== Changes ==== 
 +{{rss>https://github.com/cosmocode/dokuwiki-plugin-encryptedpasswords/commits/master.atom date 5}}
  
-The plugin can be configured with the configuration manager in the admin menu.  
  
-^''reload_seconds''  | Automatic page reload timeout (in seconds) after decryption to get back encrypted again.\\ Set 0 to disable auto-reload.\\  (default value 120)  |+===== Syntax and Usage =====
  
 +Passwords are encrypted and decrypted with a passphrase. Use the same passphrase on one page, as decryption affects all passwords on a page.
  
-===== Development =====+==== Editing ====
  
-The plugin was first developed by Wolfgang Reszel, and had been available from:\\ [[http://www.werbeagentur-willers.de/download/dokuwiki-plugins/encryptedpasswords.zip|www.werbeagentur-willers.de]] -- :!://Dead link to the zip file of version 2013-03-13//+Passwords are entered in the editor using the ''<encrypt>'' syntax. A "key" toolbar button {{https://github.com/cosmocode/dokuwiki-plugin-encryptedpasswords/raw/master/encrypt.png}} will wrap any selected text into that tag.
  
-It found that the original download link and email contact are NOT reachable.  +When you save or preview any text in the editor that contains the ''<encrypt>'' syntax you will be asked for the passphrase and your tags will be converted into encrypted ''<decrypt>'' tags.
-For the moment, the plugin which is compatible with the DW "Ponder Stibbons" is available from:\\ +
-https://github.com/ssahara/dw-plugin-encryptedpasswords/archive/master.zip \\ +
- --- [[user>s.sahara|s.sahara]] //2014-07-07 09:07//+
  
-=== Change Log from github repository === +To decrypt passwords in the editor (eg. to change them) use the "unlock" toolbar button {{https://github.com/cosmocode/dokuwiki-plugin-encryptedpasswords/raw/master/password.png}}.
-{{rss>https://github.com/ssahara/dw-plugin-encryptedpasswords/commits/master.atom date 5}}+
  
-=== ToDo/Wish List === +==== Viewing ====
-  * no immediate plan+
  
-===== Known Bugs and Issues =====+When a page contains one or more encrypted passwords, they can be decrypted clicking the lock icon behind them. Clicking the lock icon will decrypt and show all passwords in the page.
  
-==== Does not work in Hrun ==== +Clicking a encrypted or decrypted password will automatically copy the clear text password into your clipboard.
-In version Hrun, it says I can enter the password twice to confirm, but after I click OK, it fails to let me enter the password again and nothing happens. Also the icon is blank and has no key image on it.+
  
  
 +===== Configuration and Settings =====
  
 +The plugin can be configured with the configuration manager in the admin menu. 
  
-===== Known Bugs and Issues until 2013-03-13 release ===== +^''reload_seconds''  | Automatically hides decrypted passwords again after the configured time in seconds.\\ Set 0 to disable.\\  (default value 120)  |
-https://github.com/ssahara/dw-plugin-encryptedpasswords/tree/2013-03-13+
  
-==== Does not escape HTML characters ====+===== OpenSSL compatibility =====
  
-Using jQuery's.html() will attempt to render unencrypted strings. The fix is simple, in jsencryption.js on line 46, change it to: +This plugin stores secrets the same way the ''openssl enc'' does If for any reason in the future the decrypt should stop working (for example, JavaScript issues), you can still decrypt your secrets using openssl.
-<code javascript> +
-jQuery(c).text(e).after('<span class="recrypt"><a href="." onclick="location.reload(); return false;">['+enc_recrypt+']</a></span>'); +
-</code> +
-==== Broken by Ponder Stibbons release ==== +
- +
-First off, it appears the author's email is no longer validNext, the Ponder Stibbons release broke the plugin and you can't encrypt anymorethe fix is simple, in jsencryption.js on line 29, change it to: +
-<code javascript> +
-var selection = DWgetSelection(document.getElementById('wiki__text')); +
-</code>+
  
-==== Conflict with issuetracker ====+Passwords encrypted with the current version of the plugin can be decrypted like this:
  
-The 2011-01-21 version of encryptedpasswords conflicts with [[doku>plugin:issuetracker]] 2011-12-13.  With both plugins installed some browsers (eg. IE 8, Chrome 15) won't allow inline editing in issuetracker's tables.((See [[http://www.fristercons.de/fcon/doku.php?id=issuetracker:issuelist&do=showcaselink&showid=33&project=fcon_project|issue 33]] for more information.))  The conflict appears to be resolved by replacing the last few lines((Starting near line 961.)) of ''encryptedpasswords/jsencryption.js'' with +<code> 
-<code javascript+$> echo 'U2FsdGVkX18jbxDF9yk0oXYw6lOgmFvGwcSznfhTZ5U=openssl base64 -d |openssl aes-256-cbc -d -pbkdf2 
-if (!Array.indexOf) { +enter aes-256-cbc decryption password: test 
- Array.prototype.indexOf function(a, b) { +hello world
- for (var i = (b || 0); i < this.length; i++) { +
- if (this[i] == a) { +
- return i +
-+
-+
- return -1; // needed for compatibility with issuetracker plugin [Rik, 2011-12-15] +
- } +
-}+
 </code> </code>
  
-> Thanks for the report. I updated the plugin for Dokuwiki Angua and also replaced the old Gibberish AES with the latest Version which has not that conflicting code. I hope this will fix this issue too. -- Wolfgang 
  
 +Passwords encrypted using older versions of this plugin can be decrypted like this:
  
-==== JS compression is breaking code ==== +<code> 
- +$echo 'U2FsdGVkX1/oynrOig+RoUwMNCHvJH2bcmQeAq2xaLI=| openssl base64 -d |openssl aes-256-cbc -d -md md5 
-Hi, it seems that the JAVASCRIPT compression is breaking your code. At least I get an error in file ''jsencryption.js'' in line 95. Can you have a look into it. Thanks +enter aes-256-cbc decryption password: test 
- +*** WARNING : deprecated key derivation used
-==== Not compatible with Ponder Stibbons (?) ==== +Using -iter or -pbkdf2 would be better. 
- +hello world
-After dokuwiki update for Ponder Stibbons, I had problems when editing or creating encrypted content. I have not done an isolated test yet (new installation with this plugin only). As soon as I test it, I'll post the results. Thanks. +
- +
-==== Fix for Ponder Stibbons release ==== +
- +
-Hi everyone, We only need to change a line in //lib/plugins/encryptedpasswords/jsencryption.js// file, line 29, I think in this new version, **getSelection** method is deprecated and now We have to use **DWgetSelection**, After you modify your file, the plugin works like a charm+
- +
-//Before://  +
-<code javascript> +
-var selection = getSelection(document.getElementById('wiki__text'));+
 </code> </code>
  
-//After// 
-<code javascript> 
-var selection = DWgetSelection(document.getElementById('wiki__text')); 
-</code> 
- 
-> See above [[#Broken by Ponder Stibbons release]] 
-===== Feature Requests ===== 
-Thank you very much for this plugin, it is really a pleasure to use it. But after using it for a while i have two feature-requests, which would be nice to have. Maybe someone can implement them ;-). 
- 
-1. If you decrypt something, the page hops to the top. This is anoying especially for long pages, would be nice if the page stays where it was. 
- 
-2. If you decrypt something, everything with the same key will be decrypted too. Would be nice to set an option to choose if all are encrypted at once. I solved this temporary by adding an random generated number to the link, but thats not really well solved. Thank you very much. 
  
-3. I use a modified DW template with a black background (text color is white). Now, whenever I encode some password using this plugin, the little dots replacing the password are blue (as a link) and they are located inside a white rectangle (I guess this one is not visible on a white background). Upon decryption of the encoded password, the text is displayed in **white** inside the white rectangle and is thus unreadable (I can "ctrl+a" the page in order to read it but that's a little inconvenient)... Would there be a way for me to change that white rectangle into a black rectangle by modifying some preference value in some configuration file? If not, would there be a way for me to modify the color of the decrypted text from white to black inside this white rectangle, again by modifying some preference value in some configuration file? Thanks a lot, -a- 
plugin/encryptedpasswords.1425136784.txt.gz · Last modified: 2015-02-28 16:19 by s.sahara

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki