You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

CommonCrypto and export laws

You can answer "YES" to question #2, if the encryption in your app is:

(a) is specially designed for medical end-use;

(b) is limited to intellectual property or copyright protection;

(c) is limited to authentication, digital signature or the decryption of data or files;

(d) is specially designed and limited for banking use or 'money transactions';

(e) is limited to “fixed” data compression or coding techniques; or

(f) if your app meets the descriptions provided in Note 4 to Category 5 Part 2.


So, this is what Apple asks when submitting an app. Now, I read in some places if you use their CommonCrypto then it's ok, but in other places I read it still isn't ok. I sent them an e-mail, but still no answer. So I'm asking here too ...

My app encrypts user settings, like sound/mute, left handed, etc, the current game state(it's a game word, so people won't tamper with the files to modify the words/score) and the highscores, again, so people won't tamper with the highscores and send scores like 9999999 to the game center.

Obviously I'm using the CommonCrypto library.


I did search these forums, but the newest posts I could find were from 2008/2009.



Cheers,

Roland.

Mac mini, Mac OS X (10.6.8)

Posted on Jul 31, 2011 1:35 PM

Reply
Question marked as Top-ranking reply

Posted on Jul 31, 2011 4:23 PM

CommonCrypto is used by iOS, so you're not using anything unique you need to report. Your answer then is: No


http://developer.apple.com/library/mac/#documentation/Security/Conceptual/Securi ty_Overview/Architecture/Architecture.html

31 replies

Jul 31, 2011 4:32 PM in response to K T

Hmm, now that I read your answer and re-read my post, I didnt actually ask a question, thus I don't fully understand your answer. My fault.

I'll put two questions now, so I can be sure of this, I really don't want this kind of trouble, heh 🙂


1. What should I answer to that question?

2. Well, this isn't really a question, but if answer for 1 is No, then that means I will need a certificate from BIS. Because if I answer no, another set of questions will start appearing, all leading to "present a CCATS/BIS" ending.


Cheers.

Jul 31, 2011 4:45 PM in response to rspRoland

>So, this is what Apple asks when submitting an app.


And again, your answer, when asked, is: No.


Apple is using it, so it's already in the mix and you're not doing anything that needs you to declare for/with/about or concerning export laws. You're covered by Apple's implementation and default export agreements. No action by you.


When you answer 'No', the questions stop. You're done.


Don't over think this....it's a default question to give anyone using home grown, exotic crypto that may run afoul of the govt. It helps protect Apple - Apple is looking out for Apple, not you. You're not doing anything near the level of what they and the govt. are concerned with.

Jul 31, 2011 4:55 PM in response to K T

hmmm

What was the purpose of the "CommonCrypto is used by iOS, so you're not using anything unique you need to report" argument?

I mean, if I'm using something already used in iOS, therefore NOT using anything unique, why am I required to present a CCATS/BIS documents, but if I would have used something unique I didn't have to present any extra documents?


Because if I answer yes to the question, I can freely continue, if I answer no to the question I have to present extra documents... :S


So, basically, using something unique -> freely carry on, not using anything unique -> extra papers. Makes no real logic(to me at least).


Sorry if I'm being dumb here, but I really have no idea how this export law works 😟


edit: you edited while I was writing this. but thats where u are wrong, answering No continues the set of questions, answering yes stops.

http://imageshack.us/photo/my-images/26/screenshot20110801at251.png/


only if I answer No to the first question, the chain of questions stops, but that would be lying, wouldnt it? It's true that what I'm encrypting is not even close to what Apple/the Gov cares about, but still :S

Jul 31, 2011 5:06 PM in response to rspRoland

When adding an app, you are asked if you've included any encryption requiring export declaration (anything unique/not already authorized) - you can at that point only say 'yes' or 'no'.


If all you're using is CommonCrypto for the keychain, the answer is 'no', (doesn't require additional authorization) ...full stop on the topic....done.


If outside, you may need an ERN. now, not a CCATS.

http://tigelane.blogspot.com/2011/01/apple-itunes-export-restrictions-on.html

Jul 31, 2011 5:16 PM in response to K T

"When adding an app, you are asked if you've included any encryption requiring export declaration (anything unique/not already authorized) - you can at that point only say 'yes' or 'no'."

Actually, as you can see in the screenshot I posted, you are asked, quoting from iTunes Connect

"Is your product designed to use cryptography or does it contain or incorporate cryptography?" - Doesnt say anything about export/unique/authorized/export declaration. YET. and when it does, it gets messy


I already mailed them, xnav, waiting for them to reply, only that it takes forever 😟

Are you sure about the AES thingie? Cos I could use AES64. ****, I could even use AES16, I only need it so people with Jailbroken phones/DiskAid won't go in and change highscores or the game flow.


So far I came up with an MD5 alternative, so that if someone does modify the file and the MD5 of the modified file obviously won't match the MD5 I saved when closing the app, it deletes all the highscores, but this isn't really elegant at all 😟

Jul 31, 2011 5:35 PM in response to rspRoland

>"Is your product designed to use cryptography or does it contain or incorporate cryptography?" -


Right...unless you're using CC outside of the keychain, you're using crypto that is already included and in a manner that doesn't require declaration prompted by export laws.


But I have to add - I don't think your plan to thwart score-spoofing is original enough to overcome exploits that are already in practice...lots of effort for little hope, perhaps.

Jul 31, 2011 6:06 PM in response to xnav

@xnav I honestly have no idea how encryption works(while I do know what AES/DES stand for, I dont really understand the works behind them), I just found a blog(http://iphonedevelopment.blogspot.com/2009/02/strong-encryption-for-cocoa-cocoa- touch.html) where a guy made a custom AES category, then another guy came up with this:

http://pastie.org/426530

and I just used it. if you would be willing to give me more info, I'd be really gratefull.


@KT Unfortunately, I AM using CC outside the keychain. I'm taking the current highscores from the file decrypting the data there, adding a new score to the array, encrypt the new data, save it back to the file :S

Can I actually do this inside the keychain? Doesn't sound really reasonable to me 🙂


Now onto plan B, it's the same as above, obviously, but without the encryption

What do you mean the plan isn't original enough? When I'm about to save the highscores I make a string out of my scores array, make an MD5 out of it, save that MD5 to a scores.hash file, then save the array into a score.txt file. When I read the highscores, I make an MD5 from the array I just read from scores.txt and it has to be the same as the MD5 string saved into scores.hash.

Now, I thought about "I can just take your data from scores.txt and guess how you made that MD5, modify the data, create a new MD5 which Ill manually put in your scores.hash file and presto", so I added a 'key' to the string that Im making the MD5 out of when adding, also when reading.

So if my scores are 100, 150, 200, the string is 100150200randomstring, so unless you guess that randomstring, I should be safe. Right? 😝

Could use some tips on it if you think it's still not that great, please



Cheers.

Jul 31, 2011 7:44 PM in response to rspRoland

You're not the first to ask the question and look for a solution and generally speaking, the issue exists at a level that is still looking for a solution that sticks.


Your idea seems generic enough that if it had merit, it would be page one news by now....and/or Apple would have been using it from the start.


If there were any tips that I knew of that worked and stuck, I would have happily dropped them in your lap to begin with 🙂 and you'd already be aware (I hope you've hit the google machine on the topic by now)...there aren't, and after all that's why this thread is here...


BTW, you can find tons of previous discussion on the iOS forums in the Dev Center - at least there you don't have every break artist in the planet looking over your shoulder while you try to suss a solution.


Good luck in any case.

Aug 1, 2011 3:40 AM in response to xnav

@KT true :p and ofc I googled my *** off first, hehe

well, all i can do is see how it works out, I don't think many will take the time to crack the MD5 to find that random string, and even if, some protection is still better than plain text where anyone can change it.


@xnav and that wont be subjective to export laws anymore? Won't I'd still be using encryption?

CommonCrypto and export laws

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.