I'm trying to protect offline data stored on mobile devices (android / ios), and part of the protection is to prevent a user from restoring his old data.
Is there some unique value on android / ios that will not change unless a user does a factory reset or use some sort of image backup-restore? And of course that value should be accessible in an un-rooted device.
I know it is kind of weird / ambiguous question, but I could not find anything while googling.
Note: I'm not trying to protect against rooted devices, only devices with official images.
Update As to the request in the comments, here is a simple example:
I have 2 mobile devices, with 2 applications, one "client" app and one "server" app. The 2 devices communicates using BT.
When the "client" app first communicates with the "server" app, it receives an encrypted file that contains a number Z.
After that, each transaction between the "client" and the "server" works as followed:
- The "client" sends the file to the "server" and deletes the file.
- The "server" decrypts the file and decrease the number by 1 (Z - 1)
- The "server" re-encrypt the file and send it back to the "client".
- The "client" stores the file for use in the next transaction.
I'm trying to prevent the "client" data restore. For example, the user of the "client" device will create an image of his phone after receiving the file for the first time, and after E transactions, when the file contains the number Z - E, the user will restore his phone back using the backup image.
The "catch" is that it must be done OFFLINE (online would solve it without a doubt).