Re: Crypt/Decrypt NSData
Re: Crypt/Decrypt NSData
- Subject: Re: Crypt/Decrypt NSData
- From: Nicko van Someren <email@hidden>
- Date: Thu, 7 Oct 2004 09:15:47 +0100
On 7 Oct 2004, at 8:58, Peter Karlsson wrote:
Is there a simple (and safe) way to Crypt/Decrypt NSData before it it
saved
to disc?
Speaking as a professional in the field of cryptography I'm inclined to
answer "no" to any such question! More seriously, what's the threat
model? Are you concerned with the security of temporary data (which is
being written to the disc and the read back by the same process), the
security of long term single user data (to be read back by the same
user at a later date) or data which is going to be shared between
users? The difference boils down to what are you going to do with the
key to be used for decryption.
There is a lot of cryptographic code built in to OS X; Apple's own
Keychain bits, the associated CDSA cryptographic code, OpenSSL's crypto
library [2] and various other bits. If you want to make key management
easy for the user then Keychain and CDSA is the way to go, though
arguably this fails your original question by being far from simple!
There is a handy wrapper around all this for Objective C programmers
available on Sourceforge [1] and I suspect that most of what you need
is in the demo program there called "Cryptographic Tester".
I hope this helps,
Nicko
[1]
http://sourceforge.net/projects/keychain/
[2]
http://www.openssl.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden