Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RevK

macrumors member
Original poster
Apr 26, 2004
65
0
Hello MacRumors,

I have been thinking about trying to encrypt text in Objective-C, preferably using TDES. I have no idea where to start. Is there a publicly available framework for easy encrypting and decrypting w/key? Is there is, some help implementing that into an XCode project would be great.

If there is not, how does one write one? All I preferably would like is a quick and easy solution to this.

Thanks!
 
As the above poster said, you need to use the OpenSSL C-libraries. The best explanation of how to use OpenSSL is the OReilly book. The online documentation is a bit sparse, and the man pages are only helpful if you already know what you're looking for.
 
As the above poster said, you need to use the OpenSSL C-libraries. The best explanation of how to use OpenSSL is the OReilly book. The online documentation is a bit sparse, and the man pages are only helpful if you already know what you're looking for.

Which O'Reilly book are you referring to? There are many Cocoa ones.
 
OpenSSL is the way to go, but why not use AES? It's now a more accepted symmetric encryption algorithm than DES, has a concise mathematical structure, and has stood up to very rigorous analysis.
 
OpenSSL is the way to go, but why not use AES? It's now a more accepted symmetric encryption algorithm than DES, has a concise mathematical structure, and has stood up to very rigorous analysis.

I'm not sure why I decided on TDES, I've just heard about it alot recently. Are they both available in OpenSSL?
 
I'm not sure why I decided on TDES, I've just heard about it alot recently. Are they both available in OpenSSL?

Yes, both are. AES runs much quicker than Triple DES (not that it really matters on modern hardware). Triple DES should only really be used in cases where other ciphers are not possible. AES is not the only good modern symmetric cipher, but it's probably the most widely used.

Even though Triple DES has a 168 bit key length, the effective key length is only 112 bits due to a so-called meet-in-the-middle attack. AES on the other hand has 128, 192, and 256 bit variants.
 
Yes, both are. AES runs much quicker than Triple DES (not that it really matters on modern hardware). Triple DES should only really be used in cases where other ciphers are not possible. AES is not the only good modern symmetric cipher, but it's probably the most widely used.

Even though Triple DES has a 168 bit key length, the effective key length is only 112 bits due to a so-called meet-in-the-middle attack. AES on the other hand has 128, 192, and 256 bit variants.

Ok, thanks for the information, I think I will go with AES then.

For this little mini-project I am doing, I just would like to be able to encrypt an array of data (or start with just some text). Do I need to download the OpenSSL C libraries or are they already included in the Developer tools? I've only ever used basic Cocoa libaries.
 
Ok, thanks for the information, I think I will go with AES then.

For this little mini-project I am doing, I just would like to be able to encrypt an array of data (or start with just some text). Do I need to download the OpenSSL C libraries or are they already included in the Developer tools? I've only ever used basic Cocoa libaries.

I'll have to defer to others on that. I've never written a lick of Cocoa in my life. I just know a bit about encryption.

OpenSSL is absolutely included in OS X (go to the command line and run 'openssl' -- this is the front end that uses libopenssl). If I had to guess, using it in Cocoa is just a matter of linking. Googling "openssl cocoa" turns up some info.
 
I'll have to defer to others on that. I've never written a lick of Cocoa in my life. I just know a bit about encryption.

OpenSSL is absolutely included in OS X (go to the command line and run 'openssl' -- this is the front end that uses libopenssl). If I had to guess, using it in Cocoa is just a matter of linking. Googling "openssl cocoa" turns up some info.

Thank you so much for pointing me toward OpenSSL (all of you guys). I found this site from that google search (http://tombuntu.com/index.php/2007/12/12/simple-file-encryption-with-openssl/) which has been very helpful.

If I have any other problems with my project, I will post again. Thanks!
 
Hi All,

Had any one had success on decrypting the DUKPT+3DES Encrypted content. Actually I am using an external credit card reader (iDynamo), where it is responding with DUKPT+3DES Encoded content.

Any idea how to decode it using Objective C. I don't have any key, how it was encoded.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.