I want to create a bit-by-bit backup of my DVD and a Blu-ray disc without removing its encryption. Is dd be the best method, and if so, what flags or settings should I use? Also, is comparing the SHA-256 hash of the generated ISO file with the hash of the original disc’s raw data (read from /dev/sr0) the best method for verifying the backup’s integrity?


dd is neither the best nor a suitable method (dd is a scalpel not a shovel, use cp or cat). But optical media are tricky either way, with purposedly placed reading errors and stuff. redumper was made for a disc preservation initiative. Does a good job so far for me, but best to use old SATA drives with it. Those between 2010 and 2015 (pre-DRM-crackdown) also don’t need libredrive.
Optical media don’t even have a bitstream. When you dd from something other than a CD-ROM, it’s not clear what you’re getting. You might just get an error saying it’s not a CD-ROM. Different kinds of CDs use completely different encoding layers in between “the bitstream” and the actual pattern of dots engraved on the disk. Obviously a CD-ROM has “a bitstream” because it’s designed purely for computer use and the computer wants to see it as a bitstream, but for other kinds it’s not so clear.
You can’t fast-forward or rewind an audio CD in a CD player is that the CD player has no idea which sector it’s on. At most it can just count how many seconds of audio it’s played so far. It just keeps the laser locked on to the spiral, and keeps playing as long as the data keeps coming. And there’s some kind of skip code for tracks so you can skip to a track number, but only for tracks. If it accidentally skipped over a bit of audio it would have absolutely no way to know, that’s why programs like cdparanoia employ so many heuristics to know they got it right. A CD-ROM by contrast has a sector number on every sector, because that’s non-negotiable for computers.
Thanks for mentioning redumper. I’ll check it out. In your experience, after completing the disk dump with redumper, did you have a method to verify the copied data matched the original exactly?