hackbod wrote:
> (a) it uses a FAT
> filesystem and...

I'd just like to emphasise that if people write code that uses the SD 
card, this needs to be born in mind --- FAT has a few rather different 
semantics to a real Unix file system. Apart from the 2s-granularity 
timestamp, it also doesn't support sparse files.

I discovered this when I found that a simple call to 
RandomAccessFile.setLength() on FAT was taking 45 seconds to complete; 
rather than simply adjusting the length of the file as it does on yffs2, 
it was writing 15MB of zeroes to the card.

[...]
> Out of curiosity, are you interested in protecting your data from
> access by the user, or malicious access from others?

I don't know what his application is, but if it's anything like mine, we 
need to store secure hashes of data files to ensure that the user's not 
tampering with them.

I know this is actually impossible to do, but we don't need perfect 
security, merely *good-enough* security; we want to make it sufficiently 
hard to produce fake hashes that most people won't bother, and in 
particular we'd need a scheme that ensured that if the security was 
broken on one device, it's not also broken on all other devices.

For example, we could store an encrypted datafile with a key based on 
the application signature itself seeded with the device ID. Since the 
key can be calculated with code, it wouldn't be stored anywhere, so any 
attacker would have to extract the key from a running program (which is 
quite hard!); and even if someone did manage this and was able to 
decrypt the datafile, they'd need to repeat the process on every other 
phone.

But as this is a lot of work, it'd be much more convenient if there was 
a proper secure datastore on the device. Unfortunately the concept of 
'secure (from the user)' and 'open device' are probably antithetical...

-- 
David Given
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to