summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2016-10-09 02:04:38 +0200
committerDirk Engling <erdgeist@erdgeist.org>2016-10-09 02:04:38 +0200
commit7af3143ac0afe27143da4d5c0417588006565d23 (patch)
tree7dd2d7832def56e3581974bc5b6e2847d1ee9ef5
parentc932cd295d414f78c65167e7717b04f61e93122a (diff)
Fix code and line lengthHEADmaster
-rw-r--r--README.md52
1 files changed, 28 insertions, 24 deletions
diff --git a/README.md b/README.md
index a2eb441..ae205a0 100644
--- a/README.md
+++ b/README.md
@@ -1,27 +1,31 @@
1# Simple AES-256-CCM-PSK drop in front end script for the sjcl library 1# Simple AES-256-CCM-PSK drop in front end script for the sjcl library
2 2
3This script is intended to be just included in any HTML document via a simple <script src="sjcl-front.js"></script> 3This script is intended to be just included in any HTML document via a simple
4and provide ad-hoc group crypto for that site. 4`<script src="sjcl-front.js"></script>` and provide ad-hoc group crypto for that
5 5site.
6The script walks through all text nodes and checks for the sjcl-front signature sjcl:// 6
7and tries to retrieve a key from localStorage or sessionStorage whose name matches the 7The script walks through all text nodes and checks for the sjcl-front signature
8one encoded as associated data in the encoded sjcl dictionary. If it can decrypt the 8sjcl:// and tries to retrieve a key from localStorage or sessionStorage whose
9string, the text node's content is replaced by the plaintext and a class sjcl-decrypted 9name matches the one encoded as associated data in the encoded sjcl dictionary.
10is added to its parent node. 10If it can decrypt the string, the text node's content is replaced by the
11 11plaintext and a class sjcl-decrypted is added to its parent node.
12If the respective key can not be found, the class sjcl-undecrypted is added to the 12
13parent node, which also receives a copy of the ciphertext, before the text node is 13If the respective key can not be found, the class sjcl-undecrypted is added to
14replaced by an informative message. A click handler for sjcl-undecrypted objects allows 14the parent node, which also receives a copy of the ciphertext, before the text
15to later re-decrypt the text by providing a key. 15node is replaced by an informative message. A click handler for sjcl-undecrypted
16 16objects allows to later re-decrypt the text by providing a key.
17During initialisation, the script also walks through all TEXTAREA nodes and injects a 17
18hook revealing a contextual drop down menu that allows encrypting the TEXTAREA's content, 18During initialisation, the script also walks through all TEXTAREA nodes and
19decrypting it and adding/deleting keys in localStorage. Future versions may allow adding 19injects a hook revealing a contextual drop down menu that allows encrypting the
20that hook to text input fields or filtering by class or id. 20TEXTAREA's content, decrypting it and adding/deleting keys in localStorage.
21 21Future versions may allow adding that hook to text input fields or filtering by
22Finally the script injects CSS to the document's head to get the injected nodes working. 22class or id.
23 23
24You can try the script at [https://erdgeist.org/webcrypto/]. 24Finally the script injects CSS to the document's head to get the injected nodes
25 25working.
26The library that does the heavy lifting can be found here: https://github.com/bitwiseshiftleft/sjcl 26
27You can try the script at https://erdgeist.org/webcrypto/.
28
29The library that does the heavy lifting can be found here:
30https://github.com/bitwiseshiftleft/sjcl
27 31