Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book General > General Discussions

Notices

Reply
 
Thread Tools Search this Thread
Old 02-08-2026, 06:28 PM   #91
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 82,041
Karma: 150831497
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
I took a quick pass through the code and nothing looked suspicious to me. OTOH, I am not near fluent in Python.

Edit: installed it in Calibre running in a VM, downloaded two books and both decrypted and imported into calibre. Nothing seems to have been written into non-standard locations. It was more fun adding the _init.diff file than anything else.
Would you mind sharing (even just temporarily) the plugin with the changes? Thanks.
JSWolf is offline   Reply With Quote
Old 02-09-2026, 07:10 AM   #92
Martinoptic
Bibliophist
Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.Martinoptic ought to be getting tired of karma fortunes by now.
 
Martinoptic's Avatar
 
Posts: 8,067
Karma: 7319684
Join Date: Dec 2021
Location: England
Device: none
I imagine ep***r will be rubbing their hands in glee with this release.
Martinoptic is offline   Reply With Quote
Old 02-09-2026, 07:12 AM   #93
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 82,041
Karma: 150831497
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Martinoptic View Post
I imagine ep***r will be rubbing their hands in glee with this release.
Actually no they won't they will hate this release. They are charging a subscription for removing LCP DRM. With this, there could be less people subscribing.
JSWolf is offline   Reply With Quote
Old 02-09-2026, 08:26 AM   #94
vila
Member
vila doesn't littervila doesn't litter
 
vila's Avatar
 
Posts: 11
Karma: 110
Join Date: Feb 2021
Device: KOA3, PW2, PW, KT2
Quote:
Originally Posted by nnss View Post
It works!

Click image for larger version

Name:	voidk.png
Views:	12
Size:	320.2 KB
ID:	220870

The script first determines if the file is LCP-protected by searching for specific metadata files like META-INF/license.lcpl and META-INF/encryption.xml.

Code:
# From tryParseAsLCPType
if "id" in license and "encryption" in license and "profile" in license["encryption"]:
    return ("epub", license)
Then to verify a password, the script needs to "transform" the user's input into a cryptographic key.

Code:
# From LCPTransform.secret_transform_profile20
blk = blake(masterkey, 64)
crc = crc32bts(blk)
adlr = adler32bts(blk)
strn = blk + crc + adlr
hmac = hmac256(adlr, strn)
return binascii.hexlify(hashlib.sha256(hmac).digest()).decode("latin-1")
The script then verifies if the transformed key is correct by attempting to decrypt a small piece of data called the key_check.

Code:
# From decryptLCPbook
decrypted = dataDecryptLCP(key_check, transformed_hash)
if (decrypted is not None and decrypted.decode("ascii", errors="ignore") == license["id"]):
    correct_password_hash = transformed_hash
Finally, once the key is validated, the script uses it to decrypt the Content Key, which is then used to decrypt the actual ePub or PDF assets.

Code:
# From Decryptor.decrypt
aes = AES.new(self.book_key, AES.MODE_CBC, data[:16])
data = aes.decrypt(data[16:])
# Fix padding and decompress
data, was_decomp = self.decompress(data)
The data is decrypted using the AES Cipher Block Chaining mode, where the first 16 bytes of the data serve as the Initialization Vector. Finally, it also removes the padding and decompresses the content using zlib.

Last edited by vila; Yesterday at 07:23 AM.
vila is offline   Reply With Quote
Old 02-09-2026, 08:31 AM   #95
vila
Member
vila doesn't littervila doesn't litter
 
vila's Avatar
 
Posts: 11
Karma: 110
Join Date: Feb 2021
Device: KOA3, PW2, PW, KT2
Quote:
Originally Posted by JSWolf View Post
Actually no they won't they will hate this release. They are charging a subscription for removing LCP DRM. With this, there could be less people subscribing.
the fact that they are charging money for such a simple decryption is wild xD
vila is offline   Reply With Quote
Old 02-09-2026, 08:38 AM   #96
vila
Member
vila doesn't littervila doesn't litter
 
vila's Avatar
 
Posts: 11
Karma: 110
Join Date: Feb 2021
Device: KOA3, PW2, PW, KT2
Quote:
Originally Posted by vila View Post
It works!

Click image for larger version

Name:	voidk.png
Views:	5
Size:	320.2 KB
ID:	220869

The script first determines if the file is LCP-protected by searching for specific metadata files like META-INF/license.lcpl and META-INF/encryption.xml.

Code:
# From tryParseAsLCPType
if "id" in license and "encryption" in license and "profile" in license["encryption"]:
    return ("epub", license)
Then to verify a password, the script needs to "transform" the user's input into a cryptographic key.

Code:
# From LCPTransform.secret_transform_profile20
blk = blake(masterkey, 64)
crc = crc32bts(blk)
adlr = adler32bts(blk)
strn = blk + crc + adlr
hmac = hmac256(adlr, strn)
return binascii.hexlify(hashlib.sha256(hmac).digest()).decode("latin-1")
The script then verifies if the transformed key is correct by attempting to decrypt a small piece of data called the key_check.

Code:
# From decryptLCPbook
decrypted = dataDecryptLCP(key_check, transformed_hash)
if (decrypted is not None and decrypted.decode("ascii", errors="ignore") == license["id"]):
    correct_password_hash = transformed_hash
Finally, once the key is validated, the script uses it to decrypt the Content Key, which is then used to decrypt the actual ePub or PDF assets.

Code:
# From Decryptor.decrypt
aes = AES.new(self.book_key, AES.MODE_CBC, data[:16])
data = aes.decrypt(data[16:])
# Fix padding and decompress
data, was_decomp = self.decompress(data)
The data is decrypted using the AES Cipher Block Chaining (CBC) mode, where the first 16 bytes of the data serve as the Initialization Vector (IV). Finally, it also removes the padding and decompresses the content using zlib.
Also the "key" or passphrase in this case is your email (if you downloaded from the internet archive) or library card number (if you downloaded from a public library) or order number (if you got it from an online bookstore)

Last edited by pdurrant; Yesterday at 03:12 AM.
vila is offline   Reply With Quote
Old 02-09-2026, 09:03 AM   #97
maddz
Wizard
maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.
 
Posts: 1,446
Karma: 30087138
Join Date: Mar 2010
Location: UK
Device: Kobo Forma, Icarus, iPad Mini 2, Kobo Touch, Google Nexus 7
Where is the key taken from? Unlike ADE, I don't have any Thorium app set up, I just have the DeLCPL plug-in for Calibre (similar to the DeASCM plug-in).
maddz is offline   Reply With Quote
Old 02-09-2026, 03:09 PM   #98
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 50,179
Karma: 178398938
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by maddz View Post
Where is the key taken from? Unlike ADE, I don't have any Thorium app set up, I just have the DeLCPL plug-in for Calibre (similar to the DeASCM plug-in).
You need to enter the passphrase you used for the download for the decryption. Most sites allow you to enter a passphrase used for that site while others use part of your email address
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2026-02-09 110336.png
Views:	31
Size:	34.4 KB
ID:	220849   Click image for larger version

Name:	Screenshot 2026-02-09 110531.png
Views:	33
Size:	45.4 KB
ID:	220850  
DNSB is offline   Reply With Quote
Old 02-09-2026, 04:26 PM   #99
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 82,041
Karma: 150831497
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by vila View Post
the fact that they are charging money for such a simple decryption is wild xD
Now they are not the only ones to be able to remove LCP DRM.
JSWolf is offline   Reply With Quote
Old 02-09-2026, 05:20 PM   #100
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,539
Karma: 81412473
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I wonder if the person who posted on gitflic took it from epubor. if so, fair turnabout....
ownedbycats is offline   Reply With Quote
Old 02-09-2026, 05:35 PM   #101
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,818
Karma: 80512154
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Actually the python code added to the plugin is based on the original python source that was removed from DeDRM with just some additions to handle additional LCP versions. A diff shows many, many identical lines of code

Sent from my TB350FU using Tapatalk
PeterT is offline   Reply With Quote
Old 02-09-2026, 09:12 PM   #102
vila
Member
vila doesn't littervila doesn't litter
 
vila's Avatar
 
Posts: 11
Karma: 110
Join Date: Feb 2021
Device: KOA3, PW2, PW, KT2
Quote:
Originally Posted by PeterT View Post
Actually the python code added to the plugin is based on the original python source that was removed from DeDRM with just some additions to handle additional LCP versions. A diff shows many, many identical lines of code

Sent from my TB350FU using Tapatalk
I just checked and was about to say haha
also found https://gitflic.ru/project/mikudaio/dedrm-lcp-extended
vila is offline   Reply With Quote
Old Yesterday, 02:32 AM   #103
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 50,179
Karma: 178398938
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by vila View Post
I just checked and was about to say haha
also found https://gitflic.ru/project/mikudaio/dedrm-lcp-extended
That is a repackage of the original NoDRM release 10.0.3 with the lcpdedrm.py code in place.
DNSB is offline   Reply With Quote
Old Yesterday, 03:09 AM   #104
maddz
Wizard
maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.maddz ought to be getting tired of karma fortunes by now.
 
Posts: 1,446
Karma: 30087138
Join Date: Mar 2010
Location: UK
Device: Kobo Forma, Icarus, iPad Mini 2, Kobo Touch, Google Nexus 7
Quote:
Originally Posted by DNSB View Post
You need to enter the passphrase you used for the download for the decryption. Most sites allow you to enter a passphrase used for that site while others use part of your email address
Don't think I was asked for one when I downloaded the book from NetGalley...

Well, I'll have a bash at installing it later on.
maddz is offline   Reply With Quote
Old Yesterday, 03:15 AM   #105
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 74,880
Karma: 319401478
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
Extremely wide images converted to attachments.
pdurrant is offline   Reply With Quote
Reply

Tags
drm, lcp

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting a fixed layout LCP DRM protected ebook SvenSND Conversion 15 09-23-2024 02:45 PM
LCP Certification? rcentros Tolino 7 06-18-2019 10:28 PM
Extracting files from ePub on iPad/iMac AlanHK ePub 12 05-11-2016 03:24 AM
Extracting html/images from within .imp files! nrapallo IMP 12 03-10-2009 11:22 PM
Extracting pdb files from Palm Installer bpwhistler Alternative Devices 0 11-15-2008 04:07 PM


All times are GMT -4. The time now is 12:43 PM.


MobileRead.com is a privately owned, operated and funded community.