On May 13, 2014, at 8:55 AM, Maxthon Chan <xcvi...@me.com> wrote:

> I am not exactly familiar with using RSA but as long as the format is 
> followed I believe whatever mechanism here is okay.

This is actually kind of problematic. There are a number of formats for 
encoding public keys, and of course they vary by the type of key (RSA, ECC, 
etc.) Most software seems to expect that public keys are going to be 
encapsulated in X.509 certificates instead of being sent around by themselves, 
so there doesn’t seem to be a standard way to do it.

RSA public keys seem to get encoded as a DER-encoded ASN.1 sequence containing 
the modulus and exponent, but I’ve seen at least two slightly different formats 
for that. (I spent several really frustrating days once trying to figure out 
what the format is of the public key data you get out of the iOS keychain.)

> Also if I didn’t made it wrong DER certificates are text files.

No, DER is a binary encoding of ASN.1 syntax. The text formats you’re thinking 
of, like PEM, are wrappers around base64-encoded DER.

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to