Wednesday, August 25, 2010

Re: vim and encryption

Ответ на сообщение «vim and encryption»,
присланное в 16:30:26 25 августа 2010, Среда,
отправитель Tobias Klausmann:

You forgot to add an ampersand: you should use either
set viminfo=
or
let &viminfo=""
. Now you are setting only global variable g:viminfo.

Текст сообщения:
> Hey,
>
> I was really happy to read that newer Vims (i.e. 7.3) include
> Blowfish encryption, which is markedly more secure than what vim
> used to use (the pkzip thing).
>
> I'd like to use vim to keep an encrypted file of sensitive data.
> I'm aware of the implications of keyloggers, exchanged binaries
> and the fact that my text file is still unencrypted in memory
> (and may even go to disk if it's large enough to be swapped).
>
> All that said, I'd still like to use it this way. What I have
> been unable to accomplish is keeping vim from writing a viminfo
> file. At first I tried this in vimrc:
>
> if exists("key")
> let viminfo=""
> endif
>
> This does not work. Also, using "set noviminfo" and "let
> viminfo=n/dev/null" won't work either. In all cases, my edit
> commands were recallable after quitting vim and starting it
> again.
>
> What can I do? The help page doesn't mention any other variable I
> could check.
>
> Regards & TIA,
> Tobias
>
> PS: Also, the Notes section at the end of the encryption help
> text probably should be changed, it currently reads:
>
> """
> - The algorithm used is breakable. A 4 character key in about one hour, a
> 6 character key in one day (on a Pentium 133 PC). This requires that you
> know some text that must appear in the file. An expert can break it for
> any key. When the text has been decrypted, this also means that the key
> can be revealed, and other files encrypted with the same key can be
> decrypted. - Pkzip uses the same encryption, and US Govt has no objection
> to its export. Pkzip's public file APPNOTE.TXT describes this algorithm in
> detail. """
>
> This does not reflect the newly available Blowfish encryption. I
> can write up a patch for this passage if that is desired.

No comments: