So here's what's going on:
With K4PC 1.25, Amazon introduced a slight variation on the KFX DRM scheme with VoucherEnvelope versions 2 and 3, which add an additional step before the book key is decrypted. The DRM vouchers seem to randomly use either one of those, and these are what the code I pushed supports.
With K4PC 1.27, they also added versions 4 all the way up to 28. Up until yesterday, books downloaded with K4PC 1.27+ still used either v2 or v3, but now they've started using v4.
None of the higher versions do anything new or interesting, they're all pretty much the same thing as v2 and v3, so I'm not sure why they even exist in the first place.
Also, can someone test if books that previously required 1.26+, e.g. textbooks, can still be downloaded and read on 1.26? The store pages say so at least, but there would be no point in them enabling the new DRM version if all books still work on 1.26...
As a bonus, here's a way to disable KFX downloads on K4PC/Mac 1.28. Since preventing it from running the renderer test now just results in KFX being enabled (and you can't simply modify that binary since there's an integrity check), the best way I've found is to patch the Kindle binary itself to make it think the test failed:
PowerShell script for Windows:
Code:
$file = [IO.File]::Open([Environment]::GetEnvironmentVariable("LocalAppData") + "\Amazon\Kindle\application\Kindle.exe", [IO.FileMode]::Open); $file.Seek(0xD5325B, [IO.SeekOrigin]::Begin); $file.WriteByte(0x6A); $file.WriteByte(0x01); $file.WriteByte(0x90); $file.Close()
Bash script for Mac:
Code:
printf '\x41\xbc\x01' | dd of=/Applications/Kindle.app/Contents/MacOS/Kindle bs=1 seek=2695614 count=3 conv=notrunc && printf '\x90\x90\x90\x90\x90\x90' | dd of=/Applications/Kindle.app/Contents/MacOS/Kindle bs=1 seek=3217385 count=6 conv=notrunc
Note that these patches require the renderer-test binary to run normally, so make sure it's untouched.