Re: How do I access encrypted files (with known password) from an outside application?
Thanks! Let me check that. On Tue, Apr 12, 2011 at 12:07 PM, Christian Brabandt wrote: > Hi Yu! > > On Di, 12 Apr 2011, Yu Di wrote: > > > 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. > > I guess you have to read the source. Look into memline.c look for the > struct block0 > > > regards, > Christian > > -- > 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 > -- 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
Re: How do I access encrypted files (with known password) from an outside application?
Hi Yu! On Di, 12 Apr 2011, Yu Di wrote: > 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. I guess you have to read the source. Look into memline.c look for the struct block0 regards, Christian -- 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
Re: How do I access encrypted files (with known password) from an outside application?
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
Re: How do I access encrypted files (with known password) from an outside application?
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
How do I access encrypted files (with known password) from an outside application?
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! -- 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
Re: encrypted files
On Sat, 8 Jan 2011, Robert wrote: Do encrypted files have a "type" so that something like: autocmd BufReadPre, BufRead * set nobackup nowritebackup viminfo= Or some such? Or do any of you have something to make sure creating/reading/writing/ vim encrypted files are as secure as possible? Maybe some of these precautions are already the default (anyone?). Either way, you could condition your settings on the presence of an encryption key, e.g.: aug SecureEm au! au BufReadPre,BufRead * if strlen(&key) | se nobk nowb vi= | endif aug END strlen(&key) reports '5' when a key is in use (so, encryption is being used). It surprised me slightly that the length of the key was given, but it's not actually the key length. It's the length of the replacement display string: '*'. -- Best, Ben -- 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
Re: encrypted files
> Or some such? Or do any of you have something to make > sure creating/reading/writing/ vim encrypted files are > as secure as possible? vim 7.3 has mostly-transparent blowfish encryption baked-in, see: http://blogs.techrepublic.com.com/security/?p=4870 HTH, Still-learning Stuart -- 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
encrypted files
Do encrypted files have a "type" so that something like: autocmd BufReadPre, BufRead * set nobackup nowritebackup viminfo= Or some such? Or do any of you have something to make sure creating/reading/writing/ vim encrypted files are as secure as possible? -- Robert -- 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