Next time apply without [PATCH v4] in main log On Mon, Nov 2, 2020 at 3:19 PM Vesselin Bontchev < vesselin.bontc...@yandex.com> wrote:
> 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.bontc...@yandex.com> > > ... > > Thanks Carl for all the reviews. Hopefully we can merge this patch soon :) > > Vesselin > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".