我正在从基于 Debian 的发行版迁移到 CentOS 7。我有用 blowfish 加密的文件,我使用以下设置在 VIM 中透明地编辑这些文件~/.vimrc
:
:set cryptmethod=blowfish2
这是我收到的错误:
E474:无效参数:cryptmethod=blowfish2
但是,我似乎无法在 CentOS 中找到合适的软件包。我安装了以下软件包,但仍然出现错误:
$ sudo yum install bcrypt cryptsetup-python libcryptui py-bcrypt
以下是所有看似相关的软件包:
$ 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
答案1
CentOS 7 附带 vim 7.4.160。但是,cryptmethod=blowfish2 需要vim 7.4.401 或更高版本。
无论如何,您可能应该使用全盘加密和经过更仔细审查的加密,例如 OpenPGP。cryptmethod=blowfish2 存在的原因是 cryptmethod=blowfish 非常糟糕。而且它与任何东西都不兼容。