3 ms·
No, the Reed Solomon codes used in the CD have one EC byte for every 3 data bytes. But there's a interleaving system where the data is encoded with error correc
by adhesive_wombat 3y ago
No, the Reed Solomon codes used in the CD have one EC byte for every 3 data bytes. But there's a interleaving system where the data is encoded with error correction (adding 4 bytes to every 24) interleaved so that burst errors (that affect nearby disk surface) are distributed in the data stream, then encoded again (adding 4 bytes to 24 + 4 to give 32, with 8 EC bytes).
So you'd have to find mutations that are big enough to not be automatically corrected (more than 2 bits, you can't change, say a single 0x30 to 0x31), and also happen have the right signature so they don't flag as erasures, so you can't freely change bytes to just anything. And then you have to also satisfy the outer code that your modified byte after interleaving is correct. And do it all by only bring able to bit-flip in one direction. The only upside is that you can also flip bits in the correction bytes if you need.
Also, if the data you're modifying has any coding or compression (ZIP, Word documents, videos, most images), or there are checksums, you have to not upset that. And if it's encrypted, you won't know what to change in the first place.
So it's theoretically possible, but it would be very tricky and highly unlikely that you could change a useful piece of data unless you were extremely lucky with what the data was, what you wanted it to be, and where it was on the disk.
If you're concerned about people modifying your CD-R: encrypt and SHA-256 the whole thing and you'll be fine. I assume this threat model mostly targets governments, so they should first do both of those things and maybe also stop leaving them on trains.