On Jun 6, 2012, at 10:24 AM, Charlie Dickman wrote: > I have an application on OS X, not IOS, that contains some sensitive data > that I want to withhold from those not licensed to use it. I wish to use RSA > encryption/decryption in block mode (I think).
It sounds like the data is hardcoded into, and distributed with, your app, but encrypted, and when the user gets a license they'll be provided with a key to decrypt it? That sounds more like a case for a symmetric cipher, not RSA. You make up a key, then encrypt the data with it when you build the app. When a user registers, you send them the key, and the app can then use it to decrypt the data. > I want to encrypt both the public and the private key and I think I want to > use (at least) 128 bit techniques although 64 bit would probably do. 128-bit would be better. Although in this use case no one's going to try to brute-force decrypt the data; they'll just look around on a warez site for the key that some earlier unscrupulous user has uploaded. > I plan to re-encrypt the keys after each use. I'm not sure what that means. I *think* you're referring to keeping the decryption key secure on the user's machine? To do this you'd add it to the keychain. The API you want is probably the one in <CommonCrypto/CommonCryptor.h>. AES128 is good default algorithm to use. To access the keychain use <Security/SecKeychainItem.h>. —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