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?


Blueray have anti-copying built into non-data areas, plus Cinavia DRM on the content most of the time. This means your 1-to-1 copies won’t play.
If you are hoping to make a playable bluray, use one of the tools that reads past both and creates a non-drm image.
Depending on where you live, this likely breaks copywrite, but isn’t illegal.
I know it won’t work with DRM, but my main goal is just to back it up as close to the original as I can. If the disc breaks later, I can burn it to a DVD or Blu-ray and get everything back up and running.