An encrypted tiddler is tagged with 'Decrypt(prompt)'
A decrypted tiddler, that will be encrypted, on save, is tagged with
'Encrypt(prompt)'
The process of saving the tiddlywiki looks for all tiddlers tagged
Encrypt(prompt), encrypts them and changes the tag to 'Decrypt(tag)'
An encrypted tiddler is loaded, as is, from the tiddlywiki (you can
look at the contents), whether it is from a local file or a remote
server.
When a tiddler is retrieved for display from an already loaded
tiddlywiki, the 'getTiddler' function has been overridden to look for
the 'Decrypt(prompt)' tag. If it finds it, it decrypts the tiddler,
otherwise, it does nothing and simply allows normal tiddler retrieval.
If you have not entered the password for a prompt, then encrypted
tiddlers will not automatically decrypt, you will need to press the
'decrypt' or 'decrypt all' buttons to enter the password. Once a
password is entered, it is not normally asked for again (unless you
configure it that way) - and all encrypted tiddlers will automatically
decrypt, from that point on.
When you hit the 'save changes' button or an auto-save happens,
TiddlerEncryptionPlugin searches for any tiddlers with 'Encrypt
(prompt)' in their tags - for each one, it encrypts and re-tags with
'Decrypt(prompt)'. Once all tiddlers have been checked and encrypted,
the save is handled using the existing save functionality.
So, the only time a tiddler is decrypted is when you display it and
press the decrypt button, or you use 'decrypt all'.
If a tiddler is downloaded from the net with encrypted tiddlers, the
tiddlers are encrypted whilst in transit. They only ever are decrypted
in your browser.
If the UploadPlugin had default upload urls as configuration settings
and overrode the 'save changes' method, like TiddlerEncryptionPlugin,
then the 'saved tiddlywiki', as uploaded, would be encrypted, in
transit, with no changes to the 'server side' - all the encryption is
done on the client.
It is even possible, to have a 'external tiddler' plugin (I think Eric
wrote one, amongst seemingly millions...), that if it overrode the
getTiddler and getTiddlerText functions, then TiddlerEncryptionPlugin
would even process 'external' tiddlers correctly - assuming the
plugins loaded 'external tiddlers' then TiddlerEncryptionPlugin
Note that if you close the tiddlywiki page or press the browser re-
load button, all cached passwords are lost.
Hopefully that answers your question.
:-)
...Lyall