Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Encrypting on iPhone using RSA for decryption in C#
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Encrypting on iPhone using RSA for decryption in C#




kSecPaddingPKCS1 is the padding you need - it is the same as PKCS #1 1.5. OAEP isn't available.


SSL would be broken on the phone if it didn't work, so no. I'm certain you'd get a more detailed exception if there was a padding issue, because that's what you need to determine whether you managed to decrypt successfully.

Conrad.

On Jul 15, 2009, at 6:01 PM, Bill Brown wrote:

I'm using the encryption method in the CryptoExercise sample app (specifically, SecKeyWrapper.cs's method wrapSymmetricKey). I've imported the public key onto the Keychain from a certificate. After encryption, I convert everything to base-64 to send down to an ASP.NET Web application. In that application, I get a "Bad Data" CryptographicException.

Microsoft's RSA implementation uses either PKCS #1 1.5 or OAEP padding, neither of which seem to be available for SecKeyEncrypt. I'm almost positive that this padding issue is what is causing the inability to decrypt in .NET: I've tried both kSecPaddingPKCS1 and kSecPaddingNone to no avail.

Is there something I'm missing here?

Thanks,

Bill
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Apple-cdsa mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Apple-cdsa mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Encrypting on iPhone using RSA for decryption in C# (From: Bill Brown <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.