在 iPhone 上除了 CommonCrypto 之外还有什么替代方案?
准备将我的应用程序提交到 Apple 的 Itunes 商店,并在提交过程中对一个问题感到困惑:“出口法要求包含加密的产品获得适当的出口授权……您的产品使用加密吗?”
我使用 CommonCrypto CommonCryptor.h 对设置文件进行编码,以防止其未经授权的修改。 所以现在我不确定是否必须完全删除所有加密并基本上按原样保留 xml 文件,还是应该使用其他方法来保护该文件。 我还可以使用哪些其他简单的保护机制来保护它,同时不使用任何加密,以便我可以提交我的应用程序而无需大量额外的文书工作?
Getting ready to submit my app to the Apple's Itunes store and got puzzled by a question during the submission process: "Export laws require that products containing encryption be properly authorized for export...... Does your product use encryption?"
I've used CommonCrypto CommonCryptor.h to encode settings file against its unauthorized modifications.
So now I'm not sure if I have to remove all the encryption completely and leave just an xml file basically as is or should I use some other method to protect the file.
What other simple protection mechanisms I can use to protect it and at the same time do not use any encryption so I can submit my app without tons of extra paperwork?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您对“加密”的使用不受美国出口规则的约束,因为它不是为了“信息安全”(我认为您回答“是,是,是,否”左右,ICBW,否则他们可能会更改顺序)。本质上,如果它不能阻止美国国家安全局监视你,他们很乐意让你使用它。
然而,加密传统上提供机密性,而不是消息完整性。如果你想确保用户没有篡改设置文件(例如通过编辑iPhone备份),只需用MAC保存即可。也就是说,
[NSData dataWithContentsOfFile:path]
,然后-subdataWithRange:
两次才能获取“消息” ”和 MAC,然后验证 MAC,如果验证成功,则解析“消息”。它不会阻止某人使用越狱手机从您的二进制文件中提取 MAC 密钥,但不会太多。它也不会阻止某人读取明文设置文件,但这可能不是一个问题,
如果您在您控制的计算机上生成该文件(例如,它是从服务器下载的文件),那么从技术上讲,RSA 签名验证是等效的。加密,但我认为它不算是用于导出目的的加密(如果是的话,它是用于“身份验证”目的,但仍然不算加密)(我认为,它背后的数学原理)。超出了我的想象),也应该没问题。
Your use of "encryption" is not subject to US export rules because it's not for "information security" (I think you answer "yes, yes, yes, no" or so, ICBW, or they could have changed the order). Essentially, if it doesn't stop the NSA from spying on you, they're happy to let you use it.
However, encryption traditionally provides confidentiality, not message integrity. If you want to ensure that the user hasn't tampered with the settings file (e.g. by editing the iPhone backup), just save it with a MAC. That is,
[NSData dataWithContentsOfFile:path]
, then-subdataWithRange:
twice to get the "message" and MAC, then verify the MAC, and parse the "message" if verification succeeds.It won't stop someone with a jailbroken phone from extracting the MAC key from your binary, but not much will. It also won't stop someone from reading the plaintext settings file, but that might not be such a problem.
If you're generating the file on a computer you control (e.g. it's a file downloaded from a server), then sign it. Technically, RSA signature validation is equivalent to encryption, but I don't think it counts as encryption for export purposes (if it does, it's for "authentication" purposes and still doesn't count). DSA signature validation isn't encryption (I think, the math behind it went way over my head) and should also be fine.