[GH-ISSUE #8] Incomplete decryption? #7

Closed
opened 2026-03-04 14:58:32 +03:00 by kerem · 5 comments
Owner

Originally created by @cynthia2006 on GitHub (Feb 21, 2026).
Original GitHub issue: https://github.com/GladistonXD/votify-fix/issues/8

It's strange how decrypting M4A files using CENC leads to partial decryption. Maybe they banned CDRM keys or something?

Originally created by @cynthia2006 on GitHub (Feb 21, 2026). Original GitHub issue: https://github.com/GladistonXD/votify-fix/issues/8 It's strange how decrypting M4A files using CENC leads to partial decryption. Maybe they banned CDRM keys or something?
kerem closed this issue 2026-03-04 14:58:32 +03:00
Author
Owner

@GladistonXD commented on GitHub (Feb 22, 2026):

Yes, it generates a fake ID key:

CDRM
fb8bd76c3b3030f1a7822f5be4518d5c:30f556f787329c75ea2043a83bcfdeb3
Valid WVD
fb8bd76c3b3030f1a7822f5be4518d5c:9cc90edea886c2878dada9ec6a08a5de

<!-- gh-comment-id:3940034509 --> @GladistonXD commented on GitHub (Feb 22, 2026): Yes, it generates a fake ID key: CDRM `fb8bd76c3b3030f1a7822f5be4518d5c:30f556f787329c75ea2043a83bcfdeb3` Valid WVD `fb8bd76c3b3030f1a7822f5be4518d5c:9cc90edea886c2878dada9ec6a08a5de `
Author
Owner

@cynthia2006 commented on GitHub (Feb 22, 2026):

Strange is that when I use it with WidevineProxy2 it (CDRM) works.

<!-- gh-comment-id:3940185900 --> @cynthia2006 commented on GitHub (Feb 22, 2026): Strange is that when I use it with WidevineProxy2 it (CDRM) works.
Author
Owner

@cynthia2006 commented on GitHub (Feb 22, 2026):

I've found that my previous integration was rather faulty (?), and this code works.

from pywidevine import RemoteCdm, PSSH, Key

...

cdm = RemoteCdm('ANDROID',
                22590,
                3,
                'https://cdrm-project.com/remotecdm/widevine',
                'CDRM',
                'public')
...

async def get_widevine_keys(pssh: PSSH, sp: api.SpotifyApi) -> Key:
    session: bytes

    def get_challenge():
        nonlocal session
        session = cdm.open()
        return cdm.get_license_challenge(session, pssh)

    challenge = await asyncio.to_thread(get_challenge)
    license = await sp.get_widevine_license(challenge)

    def get_key():
        cdm.parse_license(session, license)
        return next(filter(lambda key: key.type == 'CONTENT', cdm.get_keys(session)), None)

    return await asyncio.to_thread(get_key)
<!-- gh-comment-id:3940250790 --> @cynthia2006 commented on GitHub (Feb 22, 2026): I've found that my previous integration was rather faulty (?), and this code works. ```py from pywidevine import RemoteCdm, PSSH, Key ... cdm = RemoteCdm('ANDROID', 22590, 3, 'https://cdrm-project.com/remotecdm/widevine', 'CDRM', 'public') ... async def get_widevine_keys(pssh: PSSH, sp: api.SpotifyApi) -> Key: session: bytes def get_challenge(): nonlocal session session = cdm.open() return cdm.get_license_challenge(session, pssh) challenge = await asyncio.to_thread(get_challenge) license = await sp.get_widevine_license(challenge) def get_key(): cdm.parse_license(session, license) return next(filter(lambda key: key.type == 'CONTENT', cdm.get_keys(session)), None) return await asyncio.to_thread(get_key) ```
Author
Owner

@GladistonXD commented on GitHub (Feb 22, 2026):

Yes, I had just tested that.

<!-- gh-comment-id:3940253813 --> @GladistonXD commented on GitHub (Feb 22, 2026): Yes, I had just tested that.
Author
Owner

@GladistonXD commented on GitHub (Feb 22, 2026):

I implemented it here: 255b98c0bc

<!-- gh-comment-id:3940324116 --> @GladistonXD commented on GitHub (Feb 22, 2026): I implemented it here: 255b98c0bc4bf8f71c1bd49d0af8416c804cf73b
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/votify-fix#7
No description provided.