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?


I would look at the tools that the preservation groups use for doing this. The optical media layouts are funky and IIRC using
ddon the block device is not enough to archive a bit-for-bit copy. There are details about the track layout and so on that need to be recorded separately. This is why formats like BIN/CUE exist.eg. https://wiki.redump.info/Redump#Technical_Questions