Skip to content

Add option for specifying RC4 40-bit key instead of password - #5

Closed
kholia wants to merge 1 commit into
qpdf:masterfrom
kholia:master
Closed

kholia wants to merge 1 commit into
qpdf:masterfrom
kholia:master

Conversation

@kholia

@kholia kholia commented Oct 20, 2012

Copy link
Copy Markdown

Hi,

After applying this patch, it is possible to use RC4 40-bit key directly instead of password.

./qpdf/build/qpdf --key=9296c944ee --decrypt test.pdf output.pdf
Get test.pdf from http://dl.dropbox.com/u/1522424/test.pdf

This patch is useful since RC4 40-bit key can be cracked in under 3 days (with 100% success rate) on processors like AMD FX-8120.

Cheers,
Dhiru

@qpdf

qpdf commented Oct 20, 2012

Copy link
Copy Markdown
Collaborator

Thanks for the patch! I think this is a good idea. I will include this functionality in 3.0.3, which I hope to release soon. I grabbed the test file.

@qpdf

qpdf commented Oct 20, 2012

Copy link
Copy Markdown
Collaborator

I will likely reimplement this in a slightly different way, but I'll leave the pull request open until the functionality is in one way or another. Thanks again.

@qpdf

qpdf commented Nov 20, 2012

Copy link
Copy Markdown
Collaborator

I finally had a chance to really look at this. Unfortunately, I don't think this functionality is actually consistent with the PDF spec. Your patch as implemented bypasses the key computation algorithm in the PDF specification. If I added this to qpdf, files created in this way would only be usable in qpdf. Another alternative would be to be able to specify the password as a hex string, but I'm not even sure that's really valid or particularly useful since it still won't help with other readers. As the PDF specification says, if you really want strong encryption, you should encrypt the PDF file itself rather than relying on what's in the PDF spec. Also, you can use 128-bit keys with qpdf already as well.

Thanks again for the patch and the suggestion. I will go ahead and close this without merging.

@qpdf qpdf closed this Nov 20, 2012
jens-maus pushed a commit to hzdr/thinstation that referenced this pull request Jan 11, 2019
…meAT.xpm

	modified:   ts/build/packages/icewm-themes/etc/icewm/themes/xp-new/frameIB.xpm
	modified:   ts/build/packages/icewm-themes/etc/icewm/themes/xp-new/titleAB.xpm
	modified:   ts/build/packages/icewm-themes/etc/icewm/themes/xp-new/titleIB.xpm
	modified:   ts/ports/binary-core/intel-microcode/.footprint
	modified:   ts/ports/binary-core/intel-microcode/.gitignore
	modified:   ts/ports/binary-core/intel-microcode/.md5sum
	modified:   ts/ports/binary-core/intel-microcode/Pkgfile
	modified:   ts/ports/components/docbook/.footprint
	modified:   ts/ports/components/docbook/.md5sum
	modified:   ts/ports/components/docbook/Pkgfile
	modified:   ts/ports/components/docbook/buildDocBookCatalog
	modified:   ts/ports/components/docbook/docbook#3-5-1.pkg.tar.gz
	modified:   ts/ports/components/docbook/post-install
	modified:   ts/ports/components/docbook5/Pkgfile
	modified:   ts/ports/components/docbook5/docbook5#5.0-1.pkg.tar.gz
	new file:   ts/ports/components/xmltoman/.footprint
	new file:   ts/ports/components/xmltoman/.md5sum
	new file:   ts/ports/components/xmltoman/Pkgfile
	new file:   ts/ports/components/xmltoman/xmltoman#0.4-1.pkg.tar.gz
	deleted:    ts/ports/gnome/polkit-gnome/.footprint
	deleted:    ts/ports/gnome/polkit-gnome/.md5sum
	deleted:    ts/ports/gnome/polkit-gnome/Pkgfile
	deleted:    ts/ports/gnome/polkit-gnome/polkit-gnome#0.102-1.pkg.tar.gz
	new file:   ts/ports/opt/cups-filters/.footprint
	new file:   ts/ports/opt/cups-filters/.md5sum
	new file:   ts/ports/opt/cups-filters/Pkgfile
	new file:   ts/ports/opt/cups-filters/cups-browsed
	new file:   ts/ports/opt/cups-filters/cups-filters#1.0.58-1.pkg.tar.gz
	renamed:    ts/ports/components/libjpeg/.footprint -> ts/ports/opt/libjpeg/.footprint
	renamed:    ts/ports/components/libjpeg/.md5sum -> ts/ports/opt/libjpeg/.md5sum
	renamed:    ts/ports/components/libjpeg/Pkgfile -> ts/ports/opt/libjpeg/Pkgfile
	renamed:    ts/ports/components/libjpeg/libjpeg#8c-1.pkg.tar.gz -> ts/ports/opt/libjpeg/libjpeg#8c-1.pkg.tar.gz
	new file:   ts/ports/opt/qpdf/.footprint
	new file:   ts/ports/opt/qpdf/.md5sum
	new file:   ts/ports/opt/qpdf/Pkgfile
	new file:   ts/ports/opt/qpdf/qpdf#5.1.1-1.pkg.tar.gz
jens-maus pushed a commit to hzdr/thinstation that referenced this pull request Jan 11, 2019
…nto mk

 Changes to be committed:
	modified:   ts/build/build.urls
	modified:   ts/build/packages/cups/build/install
	new file:   ts/build/packages/samsunguld/.gitignore
	new file:   ts/build/packages/samsunguld/build/install
	new file:   ts/build/packages/samsunguld/build/remove
	modified:   ts/build/packages/vmviewpcoip/build/install
	deleted:    ts/ports/binary-core/amd-microcode/.footprint
	deleted:    ts/ports/binary-core/amd-microcode/.gitignore
	deleted:    ts/ports/binary-core/amd-microcode/.md5sum
	deleted:    ts/ports/binary-core/amd-microcode/Pkgfile
	modified:   ts/ports/components/ccid/.md5sum
	modified:   ts/ports/components/ccid/Pkgfile
	deleted:    ts/ports/components/ccid/ccid#1.4.21-1.pkg.tar.gz
	new file:   ts/ports/components/ccid/ccid#1.4.23-1.pkg.tar.xz
	modified:   ts/ports/components/epsonescpr/.footprint
	modified:   ts/ports/components/epsonescpr/.md5sum
	modified:   ts/ports/components/epsonescpr/Pkgfile
	deleted:    ts/ports/components/epsonescpr/epsonescpr#1.4.2-1.pkg.tar.gz
	new file:   ts/ports/components/epsonescpr/epsonescpr#1.6.5-1.pkg.tar.xz
	modified:   ts/ports/components/hpijs/.footprint
	modified:   ts/ports/components/hpijs/.md5sum
	modified:   ts/ports/components/hpijs/Pkgfile
	deleted:    ts/ports/components/hpijs/hpijs#3.15.4-1.pkg.tar.gz
	new file:   ts/ports/components/hpijs/hpijs#3.16.5-1.pkg.tar.xz
	new file:   ts/ports/components/ijs/.footprint
	new file:   ts/ports/components/ijs/.md5sum
	new file:   ts/ports/components/ijs/Pkgfile
	new file:   ts/ports/components/ijs/ijs#0.35-1.pkg.tar.xz
	modified:   ts/ports/components/pcsc-lite/.md5sum
	modified:   ts/ports/components/pcsc-lite/Pkgfile
	deleted:    ts/ports/components/pcsc-lite/pcsc-lite#1.8.15-1.pkg.tar.gz
	new file:   ts/ports/components/pcsc-lite/pcsc-lite#1.8.16-1.pkg.tar.xz
	modified:   ts/ports/components/system-config-printer/.footprint
	modified:   ts/ports/components/system-config-printer/.md5sum
	modified:   ts/ports/components/system-config-printer/Pkgfile
	deleted:    ts/ports/components/system-config-printer/system-config-printer#1.3.11-1.pkg.tar.gz
	new file:   ts/ports/components/system-config-printer/system-config-printer#1.3.13-1.pkg.tar.xz
	modified:   ts/ports/components/usbmuxd/.md5sum
	modified:   ts/ports/components/usbmuxd/Pkgfile
	deleted:    ts/ports/components/usbmuxd/usbmuxd#1.0.9-1.pkg.tar.gz
	new file:   ts/ports/components/usbmuxd/usbmuxd#1.1.0-1.pkg.tar.xz
	modified:   ts/ports/core/libusb/.md5sum
	modified:   ts/ports/core/libusb/Pkgfile
	deleted:    ts/ports/core/libusb/libusb#1.0.19-1.pkg.tar.gz
	new file:   ts/ports/core/libusb/libusb#1.0.20-1.pkg.tar.xz
	modified:   ts/ports/opt/cups-filters/.footprint
	modified:   ts/ports/opt/cups-filters/.md5sum
	modified:   ts/ports/opt/cups-filters/Pkgfile
	modified:   ts/ports/opt/cups-filters/cups-browsed
	deleted:    ts/ports/opt/cups-filters/cups-filters#1.0.58-1.pkg.tar.gz
	new file:   ts/ports/opt/cups-filters/cups-filters#1.8.3-1.pkg.tar.xz
	modified:   ts/ports/opt/cups/.footprint
	modified:   ts/ports/opt/cups/.md5sum
	modified:   ts/ports/opt/cups/Pkgfile
	modified:   ts/ports/opt/cups/cups#2.1.4-1.pkg.tar.xz
	modified:   ts/ports/opt/cups/cups-config.patch
	modified:   ts/ports/opt/ghostscript/.footprint
	modified:   ts/ports/opt/ghostscript/.md5sum
	modified:   ts/ports/opt/ghostscript/Pkgfile
	deleted:    ts/ports/opt/ghostscript/ghostscript#9.05-1.pkg.tar.gz
	renamed:    ts/ports/opt/samba/samba#4.2.1-1.pkg.tar.gz -> ts/ports/opt/ghostscript/ghostscript#9.19-1.pkg.tar.xz
	modified:   ts/ports/opt/gnutls/.footprint
	modified:   ts/ports/opt/gnutls/.md5sum
	modified:   ts/ports/opt/gnutls/Pkgfile
	deleted:    ts/ports/opt/gnutls/gnutls#3.3.20-1.pkg.tar.gz
	new file:   ts/ports/opt/gnutls/gnutls#3.3.22-1.pkg.tar.xz
	modified:   ts/ports/opt/gutenprint/.footprint
	modified:   ts/ports/opt/gutenprint/.md5sum
	modified:   ts/ports/opt/gutenprint/Pkgfile
	deleted:    ts/ports/opt/gutenprint/gutenprint#5.2.10-1.pkg.tar.gz
	new file:   ts/ports/opt/gutenprint/gutenprint#5.2.11-1.pkg.tar.xz
	modified:   ts/ports/opt/krb5/.md5sum
	modified:   ts/ports/opt/krb5/Pkgfile
	deleted:    ts/ports/opt/krb5/krb5#1.12.1-1.pkg.tar.gz
	new file:   ts/ports/opt/krb5/krb5#1.12.5-1.pkg.tar.xz
	deleted:    ts/ports/opt/krb5/mitkrb-1.12.1-db2_fix-1.patch
	modified:   ts/ports/opt/ldb/.footprint
	modified:   ts/ports/opt/ldb/.md5sum
	modified:   ts/ports/opt/ldb/Pkgfile
	deleted:    ts/ports/opt/ldb/ldb#1.1.20-1.pkg.tar.gz
	new file:   ts/ports/opt/ldb/ldb#1.1.26-1.pkg.tar.xz
	modified:   ts/ports/opt/libtiff/.footprint
	modified:   ts/ports/opt/libtiff/.md5sum
	modified:   ts/ports/opt/libtiff/Pkgfile
	deleted:    ts/ports/opt/libtiff/libtiff#3.9.5-1.pkg.tar.gz
	new file:   ts/ports/opt/libtiff/libtiff#3.9.7-1.pkg.tar.xz
	modified:   ts/ports/opt/nspr/.md5sum
	modified:   ts/ports/opt/nspr/Pkgfile
	deleted:    ts/ports/opt/nspr/nspr#4.11-1.pkg.tar.gz
	new file:   ts/ports/opt/nspr/nspr#4.12-1.pkg.tar.xz
	modified:   ts/ports/opt/nss/.footprint
	modified:   ts/ports/opt/nss/.md5sum
	modified:   ts/ports/opt/nss/Pkgfile
	deleted:    ts/ports/opt/nss/nss#3.21-1.pkg.tar.gz
	new file:   ts/ports/opt/nss/nss#3.25-1.pkg.tar.xz
	modified:   ts/ports/opt/qpdf/.footprint
	modified:   ts/ports/opt/qpdf/.md5sum
	modified:   ts/ports/opt/qpdf/Pkgfile
	deleted:    ts/ports/opt/qpdf/qpdf#5.1.1-1.pkg.tar.gz
	new file:   ts/ports/opt/qpdf/qpdf#6.0.0-1.pkg.tar.xz
	modified:   ts/ports/opt/samba/.footprint
	modified:   ts/ports/opt/samba/.md5sum
	modified:   ts/ports/opt/samba/Pkgfile
	new file:   ts/ports/opt/samba/samba#4.2.12-1.pkg.tar.xz
	modified:   ts/ports/opt/sqlite3/.md5sum
	modified:   ts/ports/opt/sqlite3/Pkgfile
	deleted:    ts/ports/opt/sqlite3/sqlite3#3.10.0.0-1.pkg.tar.gz
	new file:   ts/ports/opt/sqlite3/sqlite3#3.13.0.0-1.pkg.tar.xz
	modified:   ts/ports/opt/talloc/.footprint
	modified:   ts/ports/opt/talloc/.md5sum
	modified:   ts/ports/opt/talloc/Pkgfile
	deleted:    ts/ports/opt/talloc/talloc#2.1.2-1.pkg.tar.gz
	new file:   ts/ports/opt/talloc/talloc#2.1.7-1.pkg.tar.xz
	modified:   ts/ports/opt/tdb/.footprint
	modified:   ts/ports/opt/tdb/.md5sum
	modified:   ts/ports/opt/tdb/Pkgfile
	deleted:    ts/ports/opt/tdb/tdb#1.3.5-1.pkg.tar.gz
	new file:   ts/ports/opt/tdb/tdb#1.3.9-1.pkg.tar.xz
	modified:   ts/ports/opt/tevent/.footprint
	modified:   ts/ports/opt/tevent/.md5sum
	modified:   ts/ports/opt/tevent/Pkgfile
	deleted:    ts/ports/opt/tevent/tevent#0.9.24-1.pkg.tar.gz
	new file:   ts/ports/opt/tevent/tevent#0.9.28-1.pkg.tar.xz
	modified:   ts/ports/proprietary/foo2zjs/.gitignore
	modified:   ts/ports/python/pycups/.footprint
	modified:   ts/ports/python/pycups/.md5sum
	modified:   ts/ports/python/pycups/Pkgfile
	deleted:    ts/ports/python/pycups/pycups#1.9.61-1.pkg.tar.gz
	new file:   ts/ports/python/pycups/pycups#1.9.73-1.pkg.tar.xz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants