I'm making an iOS game. All developers need to determine whether their app uses cryptography or not.
My game saves files in the Documents folder. They are .plist files representing dictionaries. They are encoded in base 64.
From what I gather, encoding is not encrypting. So we're fine there.
However, the values inside the dictionary (after decoding) are a bit tricky. Suppose that your score is 250
. In the dictionary the value is a string like:
@2@5@0@
So for the game to read your score, it removes the @
characters (and when saving the game, it puts them back).
That's just an example. Does that count as cryptography?
NOTE: I'm not asking about Apple's policies. I mentioned it for context.
-
This sounds like a simple form of Steganography: hiding messages inside something else, like text inside an image. The problem with your scheme is that it doesn't seem to meet the goal of encryption: hiding the message so that only the intended recipient can read it. Anyone can decode your message, and pretty easily filter out the noise, and read the original message.sea-rob– sea-rob2014年06月25日 06:07:39 +00:00Commented Jun 25, 2014 at 6:07
-
This is not even Steganography, in which the plaintext is "hidden" not obvious. Here is it quite obvious to the naked eye. This is just encoding IMO.Omer Iqbal– Omer Iqbal2014年06月25日 06:08:42 +00:00Commented Jun 25, 2014 at 6:08
1 Answer 1
No. This is also just encoding.
Cryptography is well-defined, and according to no definition of encryption do you have a ciphertext. Per Wikipedia,
Cryptography is the practice and study of techniques for secure communication in the presence of third parties (called adversaries).
Unless you believe adding the @ can make your communication secure, you're good :-)
-
If I repeatedly encode something in base 64 over and over, that's still encoding?Saturn– Saturn2014年06月25日 06:36:38 +00:00Commented Jun 25, 2014 at 6:36
-
Yes. A rule of thumb you might want to use is that it is only encryption if, to retrieve the stored information, you need a secret key. See also obfuscation, which repeatedly Base64ing something might be, which is more useful for preventing people from accidentally reading something (think spoilers).Jasmijn– Jasmijn2014年06月25日 08:53:24 +00:00Commented Jun 25, 2014 at 8:53
-
@Omega Yes, IMO, that would still be encoding and not encryption. If by looking at your code, one can easily understand how to get the original values back, then its not encryption. Encryption algorithms are two types: original text is completely unrecoverable, e.g. in hashing, or recovering original text requires a secret without which it is irrecoverable. Your case is neither.Omer Iqbal– Omer Iqbal2014年06月25日 22:11:02 +00:00Commented Jun 25, 2014 at 22:11