1
0
forked from aniani/vim

Add the blowfish encryption patch from Mohsin Ahmed. Needs more work.

This commit is contained in:
Bram Moolenaar
2010-05-16 22:32:54 +02:00
parent 64486671c3
commit 40e6a71c67
30 changed files with 1306 additions and 48 deletions

View File

@@ -1361,6 +1361,11 @@ the file is encrypted.
To disable the encryption, reset the 'key' option to an empty value: >
:set key=
You can use the 'cryptmethod' option to select the type of encryption. Do
this before writing the file. When reading an encrypted file it will be set
automatically to the method used when that file was written. You can change
'cryptmethod' before writing that file to change the method.
When reading a file that has been encrypted and this option is not empty, it
will be used for decryption. If the value is empty, you will be prompted to
enter the key. If you don't enter a key, the file is edited without being

View File

@@ -2049,6 +2049,19 @@ A jump table for the options with a short description can be found at |Q_op|.
with system specific functions.
*'cryptmethod'* *'cm'*
'cryptmethod' number (default 0)
local to buffer
{not in Vi}
Method used for encryption when the buffer is written to a file:
0 PkZip compatible method. A weak kind of encryption.
backwards compatible with Vim 7.2 and older.
1 Blowfish method. Strong encryption. Not compatible
with Vim 7.2 and older.
When reading an encrypted file 'cryptmethod' will be set automatically
to detected method for the file being read.
*'cscopepathcomp'* *'cspc'*
'cscopepathcomp' 'cspc' number (default 0)
global
@@ -4141,7 +4154,7 @@ A jump table for the options with a short description can be found at |Q_op|.
local to buffer
{not in Vi}
The key that is used for encrypting and decrypting the current buffer.
See |encryption|.
See |encryption| and 'cryptmethod'.
Careful: Do not set the key value by hand, someone might see the typed
key. Use the |:X| command. But you can make 'key' empty: >
:set key=

View File

@@ -30,6 +30,17 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
check blowfish.c
check sha256.c
Use 'cm' option only when FEAT_CRYPT is defined.
When not full match with magic, check for head and give warning about
unsupported crypt method.
if 'enc' is ucs-2, does utf-8 to ucs-2 encoding always work for seed?
Crypt update:
- move bf_self_test() and sha256_self_test() elsewhere
- Update E000 to error number.
Cursor positioning wrong with 0x200e character. (John Becket, 2010 May 6)
E315 when trying to change a file in FileChangedRO autocommand event.
@@ -1082,8 +1093,6 @@ restored. (Luc St-Louis)
Vim 7.3:
Patches to include:
- Add patch for 'relativenumber' option? Markus Heidelberg, 2008 Jun 27.
Update 2010 May 2.
- Add blowfish encryption. Openssl has an implementation. Also by Paul
Kocher (LGPL), close to original. Mohsin also has some ideas.
Take four bytes and turn them into unsigned to avoid byte-order problems.