Hi, I do see that the file starts with "VimCrypt~01!" for pkzip and
"VimCrypt~02!" for blowfish, and the bytes after the header for pkzip
encryption does not change (as pkzip encryption does not have an iv), so I
think those are the encrypted bytes, but I cannot figure out what decryption
algorithm to use for that. As for blowfish, I would guess the 8 or 16 bytes
after the header represent the iv, but not exactly sure how. If there is a
way to locate the iv for blowfish, I guess I should be able to use cryptopp
to decrypt the other data, but the problem is I cannot locate any
documentation that describes the format. Thanks.

On Tue, Apr 12, 2011 at 11:14 AM, Tony Mechelynck <
antoine.mechely...@gmail.com> wrote:

> On 12/04/11 17:19, diyu01 wrote:
>
>> Hi, I am using vim to edit encrypted files and it works great.
>> However, I want to be able to read the (decrypted) file content from a
>> C++ application using cryptopp library. I am willing to embed the
>> password into the application, but how do I access the data? For
>> example, if the data is encrypted with blowfish, where do I get the
>> iv? If the data is encrypted with pkzip, what is the exact encryption
>> algorithm name that I should choose in cryptopp? (for some reason I
>> only see it being described as "zip", I never found out what the exact
>> algorithm name is). Thanks!
>>
>>
> AFAIK, you don't. There are some magic bytes at the start of the file which
> tell Vim that the file was encrypted, and with which encryption method.
>
> But you can of course run Vim as a batch program, with command-line
> switches to set 'key' then read the file and write it under another name.
> This wouldn't really be setting an example of secure processing however.
>
>
> Best regards,
> Tony.
> --
> Really heard in court in the U.S.A.:
> Q.: Doctor, before you started the autopsy, did you check the pulse?
> A.: No, I didn't.
> Q.: Did you test the blood pressure?
> A.: No, I didn't.
> Q.: Did you check the breathing?
> A.: No, I didn't.
> Q.: Then there is a possibility that you autopsied a living person?
> A.: No, there isn't.
> Q.: How can you be so sure, Doctor?
> A.: Because his brain was in a jar on my desk.
> Q.: I see. But couldn't the patient be still alive nevertheless?
> A.: Hm, yes, he could still be alive, practicing as a lawyer.
>

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to