Re: Share and store RSA - public key in java server and vice versa
Re: Share and store RSA - public key in java server and vice versa
- Subject: Re: Share and store RSA - public key in java server and vice versa
- From: Jens Alfke <email@hidden>
- Date: Tue, 13 May 2014 09:29:45 -0700
On May 13, 2014, at 8:55 AM, Maxthon Chan <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden