The output file for all the algorithms (except unix crypt) when not used in
bare mode is:

3 bytes as: NULL + "m" + NULL
1 byte the algorithm
1 byte the algorithm's mode (CBC, ECB, CFB)
1 byte the key mode (7bit or 8bit)
blocksize bytes the crc32 of the plaintext(encrypted)
blocksize bytes the IV (if CBC or CFB)
x bytes encrypted data (x=k*blocksize, k=1,2...)
1 byte the number of bytes that didn't fit to the algorithm and were
  padded. (this byte does not exist in CFB mode)

blocksize is 8 bytes for DES, CAST, 3DES, Blowfish, GOST, TEA, Safer 
and 12 bytes for 3-way.
