title: GNUPG decryption in iOS environment
body: <p>A colleague provided me two text files he encrypted using GNUPG, AES128/AES256 with no salt.</p>
  
  <p>Using the following example, <a href="https://stackoverflow.com/a/1400596/300972">https://stackoverflow.com/a/1400596/300972</a>, I tried to decrypt both files in an iOS application, one using the AES256 example, the second by modifying the algo to kCCAlgorithmAES128 and keysize to kCCKeySizeAES128.</p>
  
  <p>Loading the files to an NSData object proved successful; I am able to output the NSData. However, on decrypt they always fail with kCCDecodeError (-4304). I thought it may be the padding, so we tried different variations, the original being kCCOptionPKCS7Padding, still the same error. I tried a padding of 0, which provides a truncated NSData object which I cannot create an NSString from. (UTF8 encoded).</p>
  
  <p>Has anyone been successfully able to decrypt a file encrypted using GNUPG in an iOS environment? Can you provide us with lessons learned?</p>