Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Decrypting

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th November 2019, 19:16   #21  |  Link
candela
Registered User
 
Join Date: Jun 2005
Posts: 216
Quote:
Originally Posted by RealSnoopyDog View Post
I have one question regarding the disc keys in the keydb.cfg
Today I tried to playback the UHD of Valerian and the playback failed because the disc key was missing. So I queried the key with the little program "aacs_info", duplicated the line of the existing VALERIAN UHD and excanged only the disc key with the queried one. Is this already ok? The disc seems to playback fine with this modification.
can you paste both lines since this doesn't make any sense . For UHD aacs_info cannot retrieve any other keys than what is in keydb.cfg. So if the key was wrong for VLC, running aacs_info cannot show you a different key
candela is offline   Reply With Quote
Old 26th November 2019, 20:28   #22  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,268
I'm pretty sure they're talking about the Disc ID, not any of the keys. aacs_info should be able to get that much, no matter what happens to be inside keydb.cfg (since it's just the SHA-1 hash of Unit_Keys_RO.inf).
qyot27 is offline   Reply With Quote
Old 27th November 2019, 10:05   #23  |  Link
RealSnoopyDog
Registered User
 
Join Date: May 2011
Posts: 67
Yes, sorry, I confused the words. I mean the Disc ID
RealSnoopyDog is offline   Reply With Quote
Old 28th November 2019, 23:27   #24  |  Link
RealSnoopyDog
Registered User
 
Join Date: May 2011
Posts: 67
This is what I did
Code:
0x018D1B988A96CC29F2E0DABB07770D8CBE553851 = UHD_VALERIAN | U | 1-0x2DA7E5518B5D93220A99E3C01A89256A ; (UHD) (LEGACY) (NOTVALIDATED) (BD)
0x2C70B65B65A7EC26152698552E900A51C7575264 = UHD_VALERIAN | U | 1-0x2DA7E5518B5D93220A99E3C01A89256A ; (UHD) (LEGACY) (NOTVALIDATED) (BD)
and it works.
RealSnoopyDog is offline   Reply With Quote
Old 28th November 2019, 23:41   #25  |  Link
candela
Registered User
 
Join Date: Jun 2005
Posts: 216
Quote:
Originally Posted by RealSnoopyDog View Post
This is what I did
Code:
0x018D1B988A96CC29F2E0DABB07770D8CBE553851 = UHD_VALERIAN | U | 1-0x2DA7E5518B5D93220A99E3C01A89256A ; (UHD) (LEGACY) (NOTVALIDATED) (BD)
0x2C70B65B65A7EC26152698552E900A51C7575264 = UHD_VALERIAN | U | 1-0x2DA7E5518B5D93220A99E3C01A89256A ; (UHD) (LEGACY) (NOTVALIDATED) (BD)
and it works.
yes then it's a different release of the movie using the same UnitKey (and likely same MK) but different VUK/VID so the discid is different. this works quite often
candela is offline   Reply With Quote
Old 15th January 2020, 17:36   #26  |  Link
Penguin of Caerbannog
Registered User
 
Join Date: Jan 2020
Posts: 1
Debian How-to

Since there is no how-to for Linux, I tried to write a simple one for Debian Buster (amd64).
It may work with Debian based Distributions too (Ubuntu, Mint, etc...).
If you use an other Distribution/Architecture, you will also find pre-patched libbdplus sources to build the library by yourself.


How-to read Bluray discs (including BD+) with Debian 10 Buster and free software only !
You will be able to get most of the required files from first post. Read it carefully first.


STEP 1:
Make sure you have already installed vlc and the required libraries to read Bluray discs:
sudo apt install vlc libaacs-dev libaacs0 libbluray-bdj libbluray2 libbdplus0

STEP 2:
Download and merge "KEYDB.cfg" files from both "https://vlc-bluray.whoknowsmy.name/" and "http://fvonline-db.bplaced.net/", as explained in the first post.
Put your merged "KEYDB.cfg" file in "~/.config/aacs/".
Be sure it's named "KEYDB.cfg" and not "keydb.cfg".

Note: System wide path is: "/etc/xdg/aacs/".

Note2: Since the keydb.cfg file provided by VLC is rarely updated, you may need to add a more recent host certificate to your file.
Mick0 is providing one there: https://forum.doom9.org/showthread.p...31#post1887531

STEP 3:
Download the BD+ vm files and put the extracted "vm0" folder in "~/.config/bdplus/".

Note: System wide path is "/etc/xdg/bdplus/".

STEP 4:
Download the BD+ cached tables and put all .bin files of the extracted folder in "~/.cache/bdplus/convtab/".
You will need to create the "convtab" folder.


STEP 5:
Now you need a patched "libbdplus" library in order to load the cached BD+ tables you downloaded earlier.

You can download the one I built for Debian 10 Buster (amd64) -> Start from (6)
OR
You can use the pre-patched sources I also provided to build your own library (may be useful if you use a different architecture/distribution). -> Install requirements (1), then go straight to (5)
OR
you can download libbdplus sources from git, download the patch, then build everything by yourself (because you should not download random libraries on the Internet !). -> Start from (1)

(1) Requirements for Debian 10:
sudo apt install git build-essential pkg-config libtool automake autopoint gettext libgcrypt20-dev

(2) For your information, patch files are also included in the libaacs/libbdplus DLLs download for Windows, in the first post.
In this how-to you will only need the file named "libbdplus-0001-Use-cached-conversion-tables.patch".
Get the patch file first.

(3) Then download libbdplus sources:
git clone https://code.videolan.org/videolan/libbdplus.git

(4) Apply patch content manually, because it won't work with "git --apply" or "git am" since the source code changed.

(5) When it's done, open a terminal in the source folder and execute the usual commands:
./bootstrap
./configure
make
sudo make install

Be careful, with default settings your "libbdplus.so.0.1.0" will be installed to "/usr/local/lib/".

(6) Get your new library and overwrite the old one in "/usr/lib/x86_64-linux-gnu/".

You can download a prebuilt libbdplus library for Debian 10 (amd64) at the bottom of this post.
Patched sources are also available in case you want to build it for other OS/Distrib./Architectures.

STEP 6:
Enjoy your BD+ protected movies without artifacts !
Attached Files
File Type: zip Patched_source_repository.zip (292.8 KB, 407 views)
File Type: 7z libbdplus_debian_amd64.7z (117.7 KB, 111 views)

Last edited by Penguin of Caerbannog; 18th January 2020 at 14:08. Reason: Informations added about host certificates
Penguin of Caerbannog is offline   Reply With Quote
Old 12th May 2020, 20:58   #27  |  Link
xabaras414n
Registered User
 
xabaras414n's Avatar
 
Join Date: May 2020
Posts: 5
Quote:
Originally Posted by candela View Post
After a long hiatus, discoveries in the past few years on this forum have made Bluray playback possible again on free (libre) software such as VLC without proprietary solutions such as DVDFab, MakeMKV or AnyDVD.
Thanks candela, with all this setup I can finally play back my blu-rays on Linux

Quote:
Originally Posted by candela View Post
Included are Win32/Win64 builds and the actual source patches. It would be nice if someone actually good at C can clean these up and integrate them on the VideoLan source repository.
Upstream integration would be great... Have you already tried approaching someone on the VideoLan side or submitting issues/merge requests for those changes?
xabaras414n is offline   Reply With Quote
Old 13th May 2020, 20:35   #28  |  Link
candela
Registered User
 
Join Date: Jun 2005
Posts: 216
Quote:
Originally Posted by xabaras414n View Post
Have you already tried approaching someone on the VideoLan side or submitting issues/merge requests for those changes?
I don't think they respond to such requests. Feel free to try, I don't know how all that git stuff works.

If you can program, we need changes to libbluray regarding playlist selection in VLC interface
candela is offline   Reply With Quote
Old 16th May 2020, 16:06   #29  |  Link
xabaras414n
Registered User
 
xabaras414n's Avatar
 
Join Date: May 2020
Posts: 5
I will try to submit an issue regarding these patches integration, maybe pointing to this thread.
If they ask for attribution information, what should I tell them? As of now, all patches are anonymous (signed by John Doe).

Regarding libbluray: yes, I can program but I'm no C/C++ expert, nor I have experience with Qt libraries or bluray internals.
xabaras414n is offline   Reply With Quote
Old 24th May 2020, 21:14   #30  |  Link
amayra
Quality Checker
 
amayra's Avatar
 
Join Date: Aug 2013
Posts: 273
do i need this dll in my mpv setup to work ?
__________________
I love Doom9
amayra is offline   Reply With Quote
Old 25th June 2020, 16:18   #31  |  Link
xabaras414n
Registered User
 
xabaras414n's Avatar
 
Join Date: May 2020
Posts: 5
Good news: it seems like the libaacs patches already got merged: https://code.videolan.org/videolan/l...rge_requests/6.
The libbdplus ones are on the way: https://code.videolan.org/videolan/l...rge_requests/2
xabaras414n is offline   Reply With Quote
Old 28th June 2020, 16:12   #32  |  Link
jbkempf
j-b
 
Join Date: Jun 2020
Location: Internet
Posts: 8
Indeed, I took some of the patches I found here and rebased + created merge requests.

For libaacs, most have been merged, but one (Don't discard unit keys unless VUK is available).

For libbdplus, it is not yet done.

Don't ask me when this will be done, since I'm not the one doing the reviews/coding.
jbkempf is offline   Reply With Quote
Old 29th June 2020, 12:26   #33  |  Link
candela
Registered User
 
Join Date: Jun 2005
Posts: 216
thanks xabaras414n and jbkempf

Quote:
Originally Posted by jbkempf View Post

For libaacs, most have been merged, but one (Don't discard unit keys unless VUK is available).
is something wrong with this?
candela is offline   Reply With Quote
Old 30th June 2020, 12:28   #34  |  Link
jbkempf
j-b
 
Join Date: Jun 2020
Location: Internet
Posts: 8
Quote:
Originally Posted by candela View Post
thanks xabaras414n and jbkempf
is something wrong with this?
I think the reviewers don't understand it yet (and so do I)
jbkempf is offline   Reply With Quote
Old 30th June 2020, 13:22   #35  |  Link
mick0
Registered User
 
Join Date: Dec 2017
Posts: 18
Quote:
Originally Posted by jbkempf View Post
I think the reviewers don't understand it yet (and so do I)
Let's explain it then.

Currently upstream libaacs will discard all unit keys from config file when disc have different amount of unit keys than what we have in the config file.

E.g. say we have a disc that contains four encrypted unit keys and we have an entry for that disc which contains only one unit key - and we can't get a VUK for some reason (missing VUK, missing MK or VID, missing processing key, revoked host certificate etc.). This one unit key in config file could still work for at least one title (e.g. main feature).

Currently upstream libaacs will just check that unit key count in config file don't match the unit key count in Unit_Key_RO.inf and discard the only unit key we have for that disc - which obviously means playback will fail when VUK cannot be calculated. With this patch included it won't do that, it will instead try decrypting the disc with given unit key(s) before giving up.

There are lot of cases (see FV DB xml files for examples) when a disc has e.g. seven unit keys, but six of them are never being used - or in other words - having just one unit key would decrypt the whole disc.

In above scenario with upstream libaacs one would have to make an entry like this, which doesn't make any sense
Code:
0xDISCID = LABEL | U | 1-0xUNITKEY | 2-0x00000000... | 3-0x00000000... | 4-0x00000000...
With this patch included, having an entry like this would do
Code:
0xDISCID = LABEL | U | 1-0xUNITKEY
It will still discard incomplete entries when VUK or MK+VID are available.

I hope this helps.

Last edited by mick0; 30th June 2020 at 13:23. Reason: typos
mick0 is offline   Reply With Quote
Old 30th June 2020, 13:27   #36  |  Link
jbkempf
j-b
 
Join Date: Jun 2020
Location: Internet
Posts: 8
Quote:
Originally Posted by mick0 View Post
I hope this helps.
Let's hope so
jbkempf is offline   Reply With Quote
Old 5th July 2020, 19:43   #37  |  Link
candela
Registered User
 
Join Date: Jun 2005
Posts: 216
First post is updated with:
* extra bdplus tables (36 MB). Some tables are new, some tables have a different name, some tables are different. This is just a side effect of how the table list is generated. It is impossible to tell automatically which tables are correct without playing the disc. Different tables can both be correct
* some notes about command line tools and aacs_info and aacskeys to get keys manually
candela is offline   Reply With Quote
Old 18th July 2020, 15:12   #38  |  Link
jbkempf
j-b
 
Join Date: Jun 2020
Location: Internet
Posts: 8
And all the patches are merged in libaacs
jbkempf is offline   Reply With Quote
Old 19th July 2020, 19:19   #39  |  Link
jbkempf
j-b
 
Join Date: Jun 2020
Location: Internet
Posts: 8
Also, quite a bit new commits from 3 other people came on libaacs lately. It might be faster than before.
jbkempf is offline   Reply With Quote
Old 23rd July 2020, 10:10   #40  |  Link
jbkempf
j-b
 
Join Date: Jun 2020
Location: Internet
Posts: 8
libaacs release

And a release of libaacs: 0.11 has appeared.


https://code.videolan.org/videolan/libaacs/-/tags/0.11.0
jbkempf is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:46.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.