Pregunta:
Sé que usar :set cryptmethod=zip
no es seguro, pero ¿qué tan seguro es usar :set cryptmethod=blowfish
?
En wikipedia leí que el cifrado de pez globo, como tal, debería ser seguro, pero esto no dice nada sobre la seguridad de la implementación de Vim.
¿Y qué hay de los archivos de intercambio, los archivos de copia de seguridad, los desarchivos y otras posibles formas de eludir el cifrado del pez globo? ¿Qué tan seguro está Vim allí?
Respuesta:
No es seguro. David Leadbeater publicó un código POC a fuerza bruta de hasta 64 bytes en un artículo titulado, irónicamente, encriptación de pez globo Vim … o por qué no debería lanzar su propia criptografía . La documentación de Vim ahora recomienda :
- The implementation of 'cryptmethod' "blowfish" has a flaw. It is possible
to crack the first 64 bytes of a file and in some circumstances more of the
file. Use of it is not recommended, but it's still the strongest method
supported by Vim 7.3 and 7.4. The "zip" method is even weaker.
Y, antes:
The text in the swap file and the undo file is also encrypted. E843
However, this is done block-by-block and may reduce the time needed to crack a
password. You can disable the swap file, but then a crash will cause you to
lose your work. The undo file can be disabled without much disadvantage.
:set noundofile
:noswapfile edit secrets
Note: The text in memory is not encrypted. A system administrator may be able
to see your text while you are editing it. When filtering text with
":!filter" or using ":w !command" the text is also not encrypted, this may
reveal it to others. The 'viminfo' file is not encrypted.
Resumen:
- Si le preocupa la seguridad, no debe utilizar
blowfish
. Utiliceblowfish2
lugar. - Mientras que los archivos de
swap
yundo
están cifrados,viminfo
no lo está.
Consejo no solicitado:
- Si le preocupa la seguridad, no utilice su propio cifrado . Y eso significa también la implementación de
blowfish2
. Utilice otra cosa, como GPG. El complementognupg.vim
puede resultar útil. Parece mantenerse . Deshabilitaviminfo
y el archivo de intercambio.