title: What are the standard encryption file formats?
body: <p>I'm a bit confused on encryption file formats.</p>
  
  <p>Let's say I want to encrypt a file with AES-256.  I run the file through the encryption algorithm and I now have a stream of encrypted bytes.</p>
  
  <p>I obviously can write that stream of bytes to a file, but any third-party encryption application is not going to understand it since it's not expecting just a raw stream of encrypted bytes.</p>
  
  <p>Into what file formats can I write that so that other encryption tools can understand it?</p>
  
  <p>The ones I know of (I think) are:</p>
  
  <pre><code>PKCS#7
  ASN.1
  DER
  PEM
  PKCS#8
  </code></pre>
  
  <p>but I'm not sure how they all relate to each other.</p>
  
  <p>Apparently the AESCrypt utility also has a format, which appears to be its own proprietary format:
  <a href="http://www.aescrypt.com/aes_file_format.html" rel="noreferrer">http://www.aescrypt.com/aes_file_format.html</a></p>
  
  <p>Is there a cheatsheet anywhere on this stuff?  I've been googling and found bits and pieces, but never felt like I had the complete picture.</p>