On Fri, 09 Aug 2013 08:37:16 -0400 Jacob Peck <[email protected]> wrote:
> Hello Leonistas, > > So, in my groggy hours this morning, an idea struck me. Many (myself > included) use Leo as a PIM. I, for one, use workbook.leo, synced with a > cloud sync platform, to keep my info updated across all my workstations. There's a light weight solution to this already, for storing things like passwords (i.e. I use it to store all the passwords / account info. I'm not going to remember). Docs. below. This is a simple one node body encryption, not a whole tree encryption like you're suggesting. Because the decrypted text only exists in the popup window, it shouldn't be written to disk at any time, unless the app. gets swapped. Your scheme would be better, but I wouldn't enter the key on the command line, too easy to forget to clear history afterwards, also, clearing history is a pain. So prompt the user for it instead. Cheers -Terry >From the help for stickynotes.py stickynote pop out current node as a sticky note stickynoter pop out current node as a rich text note stickynoteenc pop out current node as an encrypted note stickynoteenckey enter a new en/decryption key stickynoterekey enter the old key for the node, followed by the new, to change keys Sticky notes are synchronized (both ways) with their parent Leo node. Encrypted mode requires the python-crypto module. The first time you open a note in encrypted mode you'll be asked for a pass phrase. That phrase will be used for the rest of the session, you can change it with Alt-X stickynoteenckey, but probably won't need to. The encrypted note is stored in base64 encoded encrypted text in the parent Leo node, if you forget the pass phrase there's no way to un-encrypt it again. Also, you must not edit the text in the Leo node. When creating an encrypted note, you should start with an empty node. If you want to encrypt text that already exists in a node, select-all cut it to empty the node, then paste it into the note. If your data doesn't decode, you may need to upgrade your key. Use the Alt-X stickynoterekey command on the encryted node in Leo. Prefix the old key with "v0:" (vee zero colon without the quotes). Enter whatever you want for the new key, even the old key again without the "v0:". The decoded data should appear in the popoup window, if not, close the Leo file without saving. If you have multiple encoded nodes, repeat this process for each one. > In light of recent government-sponsored programs in the US (not that I > wish to start a political debate here), perhaps it's not a terrible idea > to write a plugin that hooks into the loading and saving code, > encrypting/decrypting your data? > > This could be controlled on a per .leo file basis, perhaps with some > @settings. The algorithm and passkey could be stored in the outline > itself, as a part of the @settings, and would automagically encrypt the > .leo on save. This wouldn't touch any @files/@autos/etc., just the > .leo. I can imagine there being a new field in the .leo structure, > something like <encrypted value="1" algorithm="rsa-256"> at the head of > the file, followed by the rest of the file, structure intact, encrypted > as a single string, stored in a tag <contents > value="onecrazylongstring">. On load, if it sees that tag, it would > prompt for the passkey, and unencrypt. If incorrect, it would simply > bail saying that it couldn't load the file. > > Opening on command line would simply require an additional command-line > parameter: leo --passkey "blahblahblah" myLeoFile.leo > > Worth an excursion after 4.11 is out the door? I'd love to work on > this, and have been looking for an excuse to play around with Leo's > hooks a bit more, as well as with encryption in python. > > Comments, concerns, questions? I see this as a plugin, but it may > require minor changes to core, for example, the command-line argument bit. > > -->Jake > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/groups/opt_out.
