title: Vim encryption: how to break it?
body: <p>Recently I decided to encrypt my engineering log using vim's :X 
  encryption feature. I wrote down the password, but evidently I 
  misspelled something or messed something up because decrypting the file just gives 
  gibberish. To make matters worse, <em>all</em> my backups are somehow 
  corrupted (don't ask, I am not sure how either).</p>
  
  <p>I am not going to make excuses: I know I messed up. Right now I want 
  to focus on how I can fix the mess I've made.</p>
  
  <p>Here's what I've tried:</p>
  
  <ol>
  <li><p>Use vimzipper to wrap the encrypted file in a zip so it can be 
  cracked by standard zip crackers like fcrackzip, zipcracker, 
  pkcrack, Advanced Zip Password Recovery, etc. Unfortunately this 
  hasn't worked. I recovered a line of plaintext from the file 
  using the leftover info from the registers in my VIMINFO, but I 
  don't have the offset in the file for the recovered plaintext. 
  Regardless, the zip cracking hasn't worked, even for a simple 
  test file with a three-character vim password.</p>
  
  <p>(see <a href="http://zeus.phys.uconn.edu/refs/crackers/vimzipper.c" rel="noreferrer">http://zeus.phys.uconn.edu/refs/crackers/vimzipper.c</a>)</p></li>
  <li><p>Recovery of the swapfile didn't work. When I re-opened the 
  encrypted file with the bad password, vim overwrote the "good" 
  swapfile.</p></li>
  <li><p>Run unixcrypt-breaker with a large database of plaintext (~30 
  books from Project Gutenberg) as reference data. This results in 
  gibberish, even if I only seed unixcrypt-breaker with the 
  recovered plaintext. Additionally, I can't seem to break even a 
  simple test file encrypted with vim using this method. (FYI, I am 
  stripping the VimCrypt~01! magic header before I run the 
  decryption and I strip it off using vim in PASTE mode so I don't 
  otherwise alter the file's contents).</p></li>
  <li><p>Desperately guess every password and misspelling I can imagine. I 
  have spent at least six hours guessing what I could possibly have 
  spelled wrong. :)</p></li>
  </ol>
  
  <p>In order to rapidly try passwords from a program, I tried compiling 
  an old UNIX copy of crypt/makekey, but the result of that is not the 
  same as the same file being encrypted using vim's -x encryption and 
  the same password.</p>
  
  <p>If anyone can help, I'd hugely appreciate it. If not, thanks for 
  reading. :)</p>