• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Share and store RSA - public key in java server and vice versa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Share and store RSA - public key in java server and vice versa


  • Subject: Share and store RSA - public key in java server and vice versa
  • From: Devarshi Kulshreshtha <email@hidden>
  • Date: Tue, 13 May 2014 15:54:50 +0530

My requirements are:

Requirement 1: Share public key to java server.

Steps:

1. Generate public-private keys in iOS app.
2. Store the generated keys in keychain.
3. Send generated public key to java server.
4. Java server shall be able to store shared public key in database.

Requirement 2: Store public key sent by java server.

Steps:

1. Java server sends public key of other user.
2. Process data sent by java server and generate public key from it.
3. Store generated key in keychain, which can be later retrieved for
encrypting message to be transferred.

I am able to achieve steps 1-2 in requirement 1 by using below method
defined in SecKeyWrapper class (CommonCrypto sample):


    - (void)generateKeyPair:(NSUInteger)keySize


Question 1: Now problem is-  how shall I send that key to java server?

We have getPublicKeyBits method in the same class, which returns an
NSData object, on some googling I found that it is in DER encoded
format.

Question 2: If I send the same NSData object to server, which I guess
it will interpret as ByteBuffer object, will it be possible for other
devices, in my case it could be android, to interpret that data?

Question 3: What is the best way to share public key in above scenarios?

Please suggest.
_______________________________________________

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


  • Follow-Ups:
    • Re: Share and store RSA - public key in java server and vice versa
      • From: ChanMaxthon <email@hidden>
    • Re: Share and store RSA - public key in java server and vice versa
      • From: ChanMaxthon <email@hidden>
  • Prev by Date: Just Seeing For myself (no message content)
  • Next by Date: Re: Share and store RSA - public key in java server and vice versa
  • Previous by thread: Just Seeing For myself (no message content)
  • Next by thread: Re: Share and store RSA - public key in java server and vice versa
  • Index(es):
    • Date
    • Thread