This means no encryption at all. So that's not the way :)
------------
add 1) Your title says: "[TW5] TWederation and SJCL.js for public key crytpography"
So you are talking about PGP like encryption, that uses a private and public key pair. Which immediately brings the "key management problem" with it, as you point out.
So one "hypothetical" but really bad solution would be to store the public and the private key in the TW, but encrypt the private key with a password.
So the one with the password can create the "private key" and use it to decrypt the tiddler. -> This mechanism has the exact same result as the password method. ... So it's pretty much useless to increase security. It just makes everything more complicated.
add 2) TW uses a Password encryption at the moment. Which does this:
- If you want to encrypt the tiddler store you "enter a password"
- This password is made stronger, using some "salt" and many iterations. see: [1-5]
- a key is created, that is used to encrypt the message (tiddlers). Described here [5] and [4]
- This process creates the same key on every computer, -> if you know the password. [2]
- The salt value and the number of iterations are there, to make several attacks against the password harder [5]
- The default values used, imo are not changed by TW since [1] says they are sensible. Look at wikipedia [5] about this.
I think, we need a different discussion first.
... more replies to follow
have fun!
mario
[1]
http://bitwiseshiftleft.github.io/sjcl/ paragraph 4 about PBKDF2
[2]
https://github.com/Jermolene/TiddlyWiki5/blob/master/boot/boot.js#L600[3]
http://bitwiseshiftleft.github.io/sjcl/doc/symbols/sjcl.html[4]
http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_convenience.js.html[5]
https://en.wikipedia.org/wiki/PBKDF2