The combination of regulations and buying from reputable sellers should be enough IMO... though most people would probably view Walmart as a reputable seller, so that clearly doesn't work.
The combination of regulations and buying from reputable sellers should be enough IMO... though most people would probably view Walmart as a reputable seller, so that clearly doesn't work.
d = random_block()
for block in capacity:
block.write(d)
if block.read() != d:
fail("fake disk")
Since that would be fooled by a device mapping all reported blocks to the same actual storage. I guess you basically have to write unique data to all reported blocks first, then read them all back to verify.Since storage devices are often bigger than RAM, the data is probably best to generate procedurally (but deterministically) from the block number.
That sounds like fun!
* write encrypted zeroes
* decrypt it and count the zeroes
I think cbc mode is enough. I see a possible computational loophole, which I want to check before I post.
I was on a machine with limited user space. I used OpenSSL, no new binaries, reading and writing at close-to-wire speeds. "Counting zeroes" would track down where they don't match, doesn't it?
https://fight-flash-fraud.readthedocs.io/en/latest/usage.htm...
I've used it on a 2GB microSD that came with a 3d printer that turned out to be 100MB. I continued to use it to transport files to my 3d printer for a bit with this.
The documentation does mention it is possible for more advanced fake firmware to bypass this, but I don't think anyone has bothered yet. It's labelled experimental because of that, but I believe that was at least 5 years ago.