I opened up a document from 2015 I saved using the built in crypto in vim (:X). That was saves using blowfish at the time.

The message I got now (2017) was this:

Warning: Using a weak encryption method; see :help 'cm'
Enter encryption key: *********************************************
Enter same key again: *********************************************

That was weird, I thought, but I assumed it had to do with some flaw, and after reading up on the crypto methods I set cryptomethod=blowfish2. This works after opening it, showing cryptomethod as blowfish 2. The problem is that I still get the message about using weak encryption! Why? Are there remnants of the old blowfish1 crypto signature? Do I have to export the text and resave it in order to fix it?

  • 2
    Try to encrypt it again with blowfish2 (that only works, if all your vim versions are new enough) Feb 10, 2017 at 19:19

1 Answer 1


The cryptmethod is stored in the file itself, and isn't automatically updated.

You can see this with less:

$ less a

VimCrypt~01! is cm=zip, VimCrypt~02! is cm=blowfish, and I think you can deduce what VimCrypt~03! stands for :-)

To upgrade a file, open it, explicitly set cm=blowfish2, and write it:

$ vim a
Need encryption key for "a"
Warning: Using a weak encryption method; see :help 'cm'
Enter encryption key: [enter-key]

:set cm?
:set cm=blowfish2
"a" [blowfish2] 1L, 3C written

$ less a
a lines 1-1/1 (END)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.