开发者

Decrypting iPhone encrypted sting in .Net app

I am encrypting via the NSData AES128EncryptWithKey method and having problems decrypting it on the .Net side. I've read several posts that basically all say that my Salt and / or Initialization Vectors must be different and I suspect that my problem is related to that fact. However, I cannot find anything that says what the Salt used by the method is.

The AES128EncryptWithKey routine calls CCCrypt as follows:

CCCrypt(kCCEncrypt, kCCAlgorithmA开发者_开发问答ES128, kCCOptionPKCS7Padding,
                                      keyPtr, kCCKeySizeAES128, 
                                      NULL /* initialization vector (optional) */,
                                      [self bytes], dataLength, /* input */
                                      buffer, bufferSize, /* output */
                                      &numBytesEncrypted);

So I see the initialization vector is NULL, but where is the Salt?


I was confused by the simplicity of this Encryption method! AES does not have a Salt.

But I also found that .Net routines do not like a Null for the iv. A 16-byte array or 0's yes, but Null No.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜