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#




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.

Do you know what specific API call is failing on the server? Are you sure the web app is expecting the encrypted data to be just the raw symmetric-key bytes, instead of something more structured (like some kind of BER encoding containing more data like the algorithm used)?


—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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>)
 >Re: Encrypting on iPhone using RSA for decryption in C# (From: Conrad Sauerwald <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.