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: Devarshi Kulshreshtha <email@hidden>
- Date: Wed, 14 May 2014 09:17:35 +0530
@Jens thanks for informing about apple_cdsa list, I am definitely
going to trouble guys over there ;)
I am correcting the steps which I wrote before:
1. SecKeyWrapper *keyWrapper = [SecKeyWrapper sharedWrapper];
2. [keyWrapper generateKeyPair];
2. NSData *publicKeyData = [keyWrapper getPublicKeyBits];
Now I am going to try at other end in android code to decode this data
and will try to get the public key object.
if CryptoExample is out of date, then what is the other best other
option for me, from the previous discussion I am unable to extract
anything useful which will help me to resolve my problem :-(
On Tue, May 13, 2014 at 10:07 PM, Jens Alfke <email@hidden> wrote:
> On May 13, 2014, at 22:20, Devarshi Kulshreshtha
> <email@hidden> wrote:
>
> In CyrptoExercise sample provided by apple, we have a wrapper class:
> SecKeyWrapper.
>
>
> First, I think CryptoExercise is out of date. It’s not included in Xcode
> 5.1’s doc set. I found it on Apple’s website, but it looks like it was last
> updated for iOS 3, and it has a bunch of obsolete workarounds for running in
> the simulator (a long time ago the Keychain APIs were different in the
> device and simulator environments.)
>
> Shall I use below code to create and send an encoded string to server:
>
> 1. SecKeyWrapper *keyWrapper = [SecKeyWrapper sharedWrapper];
> 2. NSData *publicKeyData = [keyWrapper getPublicKeyBits];
>
>
> It’s sample code, not a black box, so you can look at what it does yourself.
> The two lines you gave aren’t going to do anything by themselves —
> getPublicKeyBits just reads an already-existing public key out of the
> Keychain and encodes it. You have to generate the key first.
>
> —Jens
>
> PS: This discussion really belongs on the apple_cdsa list, which is for
> crypto/security discussions. Unfortunately Apple’s engineers never help out
> on that list (unlike on xcode-users or macnetworkprog), but there are some
> other fairly knowledgeable people there.
--
Thanks,
Devarshi
_______________________________________________
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