Closed apprenticeharper closed 6 years ago
Probably half-off-topic, moving my profile to a plain-ASCII username worked for me - which might not be an option for everyone ...
If anyone has further information, I'd be pleased to hear it. I tried all the combinations of utf-8 and ASCII conversion that I could think of, and nothing seemed to do the trick.
Oh. I can't remember now whether I tried specifically a conversion to the local Windows 8-bit character set for utf-8. I'll give it a go when I can.
The correct way to filter the user name is to replace non-ASCII characters with unichr(0xfffd) and encode in utf8. But since the DSN is stored in the kinf database and the purpose of the user name in K4PC decryption is to calculate the DSN it isn't really needed at all. The hashed user name is also present in the kinf database and is also not needed.
Very many thanks indeed!
Confirmed that that fixes the problem. I've found the DSN in the kinf database too, but not the hashed username. But I'll tweak the code to the the DSN if present as well.
The hashed user name kinf key is UsernameHash. It was added to the list of known keys in the 6.5.4 Tools release. That combined with SerialNumber (the key for the hashed volume serial number) and MazamaRandomNumber can be used to calculate the DSN if it is not present.
Some other kinf keys that may be present are: kindle.accounttype.info, krx.flashcardsplugin.data.encryption_key, krx.notebookexportplugin.data.encryption_key, proxy.http.password, proxy.http.username
Many thanks again.
I have just uploaded a new version of the code for the plugin. The new plugin can be downloaded here:
https://github.com/apprenticeharper/DeDRM_tools/tree/master/DeDRM_calibre_plugin
I would appreciate feedback about this new version from anyone who's encountered this problem. Thank you.
Looks like issue #311 still had a problem with this.
Closing, as I think the problem is now solved.
I have had several reports that Kindle for PC fails when a username has an accented character. I have been able to reproduce this error, but I have unable to fix it - no matter what encoding or processing I do with the username I have been unable to find the right way to generate a working key.
I would like help in two ways
(1) Reports from anyone with a username that contains non-ASCII charcaters where Kindle for PC WORKS. (2) Suggestions from anyone who's traced through the current Kindle for PC on how a non-ASCII username should be processed.