Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 07-28-2011, 10:06 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 23
alexstuckey is on a distinguished road
Default App contents encryption

I'm making an app that requires its contents to be encrypted. I have seen other applications on the App Store that offer hardware encryption of data stored in the apps.

I need to encrypt multiple entire directories, and be able to access their contents on the fly if possible.

How would I go about doing this?

Thanks
Alex
__________________
Dab Attack: http://bit.ly/dabattack

Capitals Quiz: http://bit.ly/capitalsquiz
alexstuckey is offline   Reply With Quote
Old 08-03-2011, 12:45 PM   #2 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 241
MattW is on a distinguished road
Default

Quote:
Originally Posted by alexstuckey View Post
I'm making an app that requires its contents to be encrypted. I have seen other applications on the App Store that offer hardware encryption of data stored in the apps.

I need to encrypt multiple entire directories, and be able to access their contents on the fly if possible.

How would I go about doing this?

Thanks
Alex
There's no hardware encryption (other than what Apple use at the hardware level to store files). You'll have to write your own encryption/decryption algorithm in software (there are plenty of options available to read about on the web). I'm sure there are open source solutions too if you don't want to write your own.

If the files you're going to encrypt are in your bundle, you'll have to write a Mac app to encrypt them before you compile your bundle. If they're user-generated files, you'll need to encrypt them in your app before writing them to the directory.

The only issue you're going to run into with the decryption might be speed, depending on how quickly and how often you need to access the data and what algorithm you use (although optimizing decryption algorithms is fun! ).
__________________

Highlight PDF text like no other app: iHighlight (now available for iPad and iPhone!)
-----
Create iPhone lists with no typing: Insta-List
-----
Make spelling fun, and create your own tests: iWillSpell
-----
A fast, elegant flashlight app: Insta-Light
-----


FourSixteen Productions
MattW is offline   Reply With Quote
Old 08-10-2011, 02:56 PM   #3 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 5
clarket2 is on a distinguished road
Default

Yes as MattW said there is no "hardware encryption" other than the security service on the device itself. You will need to implment the cryptography yourself. For symmetric block encryption e.g. AES you can use apple crypto library or something like https://github.com/dev5tec/FBEncryptor). For asymmetric encryption you will need certificates in different formats (DER, PKCS#12, etc) depending on what you want to do specifically and you can use the "Certificate, Key and Trust API" to encrypt, decrypt, sign and verify data etc.

My advice is to keep it simple as things like padding cause cause headaches. If symmectric encryption will suffice I would use it.

Thanks,

Tony
clarket2 is offline   Reply With Quote
Reply

Bookmarks

Tags
encryption, file, secure

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 389
17 members and 372 guests
Absentia, AyClass, bignoggins, Diligent, dre, givensur, hussain1982, jbro, jPuzzle, LunarMoon, momolgtm, Newbie123, Paul10, revg, skog, taylor202
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,643
Threads: 94,110
Posts: 402,858
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Diligent
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:46 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0