diff options
author | Vesselin Bontchev <vesselin.bontchev@yandex.com> | 2000-01-01 09:00:00 +0000 |
---|---|---|
committer | Vesselin Bontchev <vesselin.bontchev@yandex.com> | 2020-11-05 21:40:20 +0530 |
commit | 03fb314acfa4f5a4af84a6fc82a425477fd352eb (patch) | |
tree | 51d799425284a10a0e497d54556472de76d2c9dd /libavfilter/vf_dnn_processing.c | |
parent | 70d8077b795766e2486e6ec8110f22a97362d6d6 (diff) | |
download | ffmpeg-03fb314acfa4f5a4af84a6fc82a425477fd352eb.tar.gz |
Add support for playing Audible AAXC (.aaxc) files [PATCH v4]
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@yandex.com>
Diffstat (limited to 'libavfilter/vf_dnn_processing.c')
0 files changed, 0 insertions, 0 deletions