[FFmpeg-devel] [PATCH] [v4] Add support for playing Audible AAXC (.aaxc) files
Vesselin Bontchev
vesselin.bontchev at yandex.com
Mon Nov 2 16:12:00 EET 2020
The AAXC container format is the same as the (already supported) Audible
AAX format but it uses a different encryption scheme.
Note: audible_key and audible_iv values are variable (per file) and are
externally fed.
It is possible to extend https://github.com/mkb79/Audible to derive the
audible_key and audible_key values.
Relevant code:
def decrypt_voucher(deviceSerialNumber, customerId, deviceType, asin, voucher):
buf = (deviceType + deviceSerialNumber + customerId + asin).encode("ascii")
digest = hashlib.sha256(buf).digest()
key = digest[0:16]
iv = digest[16:]
# decrypt "voucher" using AES in CBC mode with no padding
cipher = AES.new(key, AES.MODE_CBC, iv)
plaintext = cipher.decrypt(voucher).rstrip(b"\x00") # improve this!
return json.loads(plaintext)
The decrypted "voucher" has the required audible_key and audible_iv
values.
Update (Nov-2020): This patch has now been tested by multiple folks -
details at the following URL:
https://github.com/mkb79/Audible/issues/3
Signed-off-by: Vesselin Bontchev <vesselin.bontchev at yandex.com>
...
Thanks Carl for all the reviews. Hopefully we can merge this patch soon :)
Vesselin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-v4-Add-support-for-playing-Audible-AAXC-.aaxc-files.patch
Type: text/x-diff
Size: 4044 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20201102/2a48041e/attachment.patch>
More information about the ffmpeg-devel
mailing list