title: Is it possible to decrypt files encrypted with php mcrypt_encode with third party utilities?
body: <p>I am inexperienced with symmetric encryption. I am encrypting a pdf file in php using the following code:</p>
  
  <pre><code>$source_filepath = RB::get('docroot') . RB::get('baseUrl') . '/submissions/' . $this-&gt;_filename;
  $encrypted_filepath =  $source_filepath . '.nc';
  $pdf_data = file_get_contents($source_filepath);
  $encrypted_data = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, '1234567812345678', $pdf_data, MCRYPT_MODE_ECB);
  file_put_contents($encrypted_filepath, $encrypted_data);
  </code></pre>
  
  <p>Then I need to decrypt it outside of php, potentially using a desktop application/utility on another computer. I have attempted to decrypt the file with the aescrypt utility (<a href="http://www.aescrypt.com/" rel="nofollow noreferrer">http://www.aescrypt.com/</a>) which tells me:</p>
  
  <p>"Error: Bad file header (not aescrypt file or is corrupted? [c, fffffff0, fffffffe])"</p>
  
  <p>as well as the mcrypt command which tells me:
  File thefile.pdf.nc was NOT decrypted successfully.</p>
  
  <p>I have yet to be able to decrypt anything encrypted with encrypt outside of php. I have tried using blowfish and decrypting it with bcrypt (<a href="http://bcrypt.sourceforge.net/" rel="nofollow noreferrer">http://bcrypt.sourceforge.net/</a>) as well with similar results. I suspect my ignorance of how encryption works is to blame but any help or education would be appreciated. Thanks.</p>