I'm having one doubt about the VIM ENCRYPTION key.
I having a text file, I encrypted that file using
:X
Now, where the encrypted key is stored (path).
Whether it stored in a separate file or the text file itself.
If I open a the file it asked Encryption key.
How it compare my key with the original key?
It doesn't store the key - it just encrypts or decrypts with the key you type.
Here's a hex dump of a 15-character file encrypted with a key ('elephant' - try it; the contents was not meaningful ('abcdededesdasd') before I encrypted it):
0x0000: 56 69 6D 43 72 79 70 74 7E 30 31 21 95 96 C7 F6 VimCrypt~01!....
0x0010: 75 C8 3B BF 1D BD BD 86 97 32 DA u.;......2.
0x001B:
It's 27 characters long; 'VimCrypt~01!' is 12 characters. If you decrypt it with the wrong key (say 'pinkpanther'), you get garbage. So, vim does no integrity checking on the encrypted file or decrypted file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With