I'm moving from a Debian-based distro to CentOS 7. I have files encrypted with blowfish that I edit transparently in VIM with this setting in ~/.vimrc
:
:set cryptmethod=blowfish2
This is the error that I receive:
E474: Invalid argument: cryptmethod=blowfish2
However, I cannot seem to find the appropriate package in CentOS. I have installed the following packages, but I still get the error:
$ sudo yum install bcrypt cryptsetup-python libcryptui py-bcrypt
Here are all the packages that seem to be relevant:
$ yum search bcrypt
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.nonstop.co.il
* epel: mirror.nonstop.co.il
* extras: mirror.nonstop.co.il
* updates: mirror.nonstop.co.il
============================= N/S matched: bcrypt ==============================
libcryptui-devel.i686 : Header files required to develop with libcryptui
libcryptui-devel.x86_64 : Header files required to develop with libcryptui
rubygem-bcrypt.x86_64 : Wrapper around bcrypt() password hashing algorithm
rubygem-bcrypt-doc.x86_64 : Documentation for rubygem-bcrypt
bcrypt.x86_64 : File encryption utility
cryptsetup-python.x86_64 : Python bindings for libcryptsetup
libcryptui.i686 : Interface components for OpenPGP
libcryptui.x86_64 : Interface components for OpenPGP
py-bcrypt.x86_64 : Python bindings for OpenBSD's Blowfish password hashing code
Name and summary matches only, use "search all" for everything.
$ yum search blowfish
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.nonstop.co.il
* epel: mirror.nonstop.co.il
* extras: mirror.nonstop.co.il
* updates: mirror.nonstop.co.il
============================ N/S matched: blowfish =============================
perl-Crypt-Eksblowfish.x86_64 : Eksblowfish block cipher
php-horde-Horde-Crypt-Blowfish.noarch : Blowfish Encryption Library
php-pear-Crypt-Blowfish.noarch : Quick two-way blowfish encryption
php-phpseclib-crypt-blowfish.noarch : Pure-PHP implementation of Blowfish
py-bcrypt.x86_64 : Python bindings for OpenBSD's Blowfish password hashing code
Name and summary matches only, use "search all" for everything
CentOS 7 shipped with vim 7.4.160. However, cryptmethod=blowfish2 requires vim 7.4.401 or later.
And anyway, you probably should be using full disk encryption and more carefully vetted crypto such as OpenPGP. The reason cryptmethod=blowfish2 exists to begin with is that cryptmethod=blowfish was horribly broken. And it's not compatible with anything.
The issue was that CentOS 7 ships with VIM 7.4.160, as Michael Hampton points out we need 7.4.401. In a comment I mention how to install the later VIM, here are the complete instructions for those who might follow in my footsteps. All credit goes to Michael for identifying the issue and to this Gist for laying out the proper
configure
line: