Libgourou v0.8

Sunday, 11 September 2022
|
Écrit par
Grégory Soutadé

Reminder : Libgourou is a free ADEPT protocol implementation (from Adobe) that helps download ACSM files from Linux.

Good news, libgourou v0.8 is out now !

I missed to speak about it since v0.5 (april 2022), but a lot of work has been done :

  • Bug fixes, especially in PDF part
  • Qt has been replaced by libcurl (lighter & better display when downloading ePub)
  • Option to resume (big) downloads that may have failed
  • Manage loaned (and returnable) books
  • Migrate utils to OpenSSL 3
  • Integrate Base64 code into sources
  • Support for over encrypted private key when removing DRM (192 bytes keys)

Another improvement asked by a lot of people is the build of an AppImage. I don't really like it because it's big and you do not receive (security) updates from your package manager, but it allows to run on most of Linux platforms by embedding all necessary dependencies.

#
1
De
ben
, le
17 October 2022 18:10
Hi,

Can I ask a silly question? How on earth does this work? I mean, i've got it to work - but how does this work *conceptually*? For example, how does the RemoveDRM() function work without any sort of private key that the pdf was encrypted with? Why can I just use a .acsm file to get the .pdf, then remove the DRM so easily?
Répondre
Auteur :


e-mail* :


Le commentaire :


#
4
De
Greg
, le
18 October 2022 18:10
Hello Ben,

ADEPT is really a standard DRM : the client (you) generate a pair of RSA keys (asymetric keys) and register the public key into Adobe's server.
When you buy a book, the server encrypt an AES key (symetric key) with the public part of your RSA keys.
Thanks to your private RSA key, you can retrieve the AES key and then read or decrypt the file.

you can read this post : https://jjtech.dev/reverse-engineering/adobe-adept/ for more technichal (but high level) information. Unfortunately it's not complete...
Répondre
Auteur :


e-mail* :


Le commentaire :


#
2
De
ben
, le
17 October 2022 19:10
Actually I think I did have the private key. For context i'm using an .acsm file with knock to download the .pdf file from internetarchive using ADE. I still don't understand how that creates a DRM free .pdf file, though. Any chance you could explain?
Répondre
Auteur :


e-mail* :


Le commentaire :


#
3
De
ben
, le
17 October 2022 19:10
std::cout << "downloading the file from Adobe..." << std::endl;
gourou::FulfillmentItem *item = processor->fulfill(acsm_file);
gourou::DRMProcessor::ITEM_TYPE type = processor->download(item, drm_file);

std::cout << "removing DRM from the file..." << std::endl;
std::string ext_file;
std::string file_type;
switch (type) {
case gourou::DRMProcessor::ITEM_TYPE::PDF: {
// for pdfs the function moves the pdf while removing drm
processor->removeDRM(drm_file, out_file, type, nullptr, 0);
std::filesystem::remove(drm_file);
ext_file = acsm_stem + ".pdf";
file_type = "PDF";
break;
}
Répondre
Auteur :


e-mail* :


Le commentaire :


Auteur :


e-mail* :


Le commentaire :




* Seulement pour être notifié d'une réponse à cet article
* Only for email notification