Difference between revisions of "MiscCrypto"
Jump to navigation
Jump to search
m (→Misc) |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 11: | Line 11: | ||
==[[LoopCrypt]]== |
==[[LoopCrypt]]== |
||
==[[Encfs]]== |
==[[Encfs]]== |
||
+ | ==[[TrueCrypt]]== |
||
+ | ==[[LUKS]]== |
||
+ | |||
==Misc== |
==Misc== |
||
===To unlock password-protected pdfs=== |
===To unlock password-protected pdfs=== |
||
+ | * PDF documents may have up to 2 passwords: |
||
⚫ | |||
+ | ** '''User password''': protects read access to the document, and when no ''Owner password'' is specified, also protects permission settings. |
||
− | * pdftops -upw <file_password> <file>.pdf -|ps2pdf - <file>_open.pdf |
||
+ | ** '''Owner password''': protects full access to the document, and protects permission settings (printing, copying...) |
||
+ | |||
+ | * Use <tt>pdftops</tt> to convert a protected PDF to Postscript, and possibly combine it with <tt>ps2pdf</tt> to obtain an unrestricted pdf. Knowing the ''Owner password'' is the easiest since that allows removing all restrictions. If not, it also works but in that case the permission <tt>allow Printing</tt> must be set. If it is not the case, then ''Owner password'' is necessary. Also if ''User password'' is set (ie. pdf reader asks for a password at open), then it must be provided (providing ''Owner password'' is also ok of course). |
||
+ | |||
+ | |||
+ | <source lang="bash"> |
||
⚫ | |||
+ | # on Cygwin: install package xpdf |
||
+ | pdftops <encrypted>.pdf <decrypted>.ps # Owner pwd set but unknown and 'allow printing' set |
||
+ | pdftops -upw <userpwd> <encrypted>.pdf <decrypted>.ps # Same as above but user password also set |
||
+ | pdftops -opw <ownerpwd> <encrypted>.pdf <decrypted>.ps # 'allow printing' not set -> owner pwd is necessary |
||
+ | |||
+ | pdftops -upw <password> <encrypted>.pdf -|ps2pdf - <decrypted>.pdf # To generate a new PDF immediately |
||
+ | </source> |
||
+ | |||
+ | * An other solution is to use ''PDF Toolkit'' <tt>pdftk</tt> (<tt>apt-get install pdftk</tt>). However unlike ''pdftops'' this method doesn't work when only ''user password'' is known but both passwords are set. |
||
+ | |||
+ | <source lang="bash">pdftk <encrypted>.pdf input_pw <password> output <decrypted>.pdf</source> |
||
+ | |||
+ | * <tt>pdftk</tt> can also be used to generate protected documents, and specifying permissions. |
||
+ | |||
+ | <source lang="bash"> |
||
+ | pdftk <unprotected>.pdf output <protected>.pdf allow Printing owner_pw <ownerpwd> user_pw <userpwd> #Allow HQ printing |
||
+ | </source> |
||
+ | |||
===pwsafe=== |
===pwsafe=== |
||
+ | To use 'secure ram' (thereby locking the data in memory and preventing it being flushed to disk) you may like to run it setuid root: |
||
+ | $ sudo dpkg-statoverride --update --add --force root root 4755 /usr/bin/pwsafe |
Latest revision as of 09:34, 10 March 2009
Under Windows
CryptTool
- Demonstration and Reference Program for Cryptography + making AES executables
- freeware
AxCrypt
- AES-128 File Encryption, Compression and double-click Edit/View for secure document storage on Windows 95/98/ME/NT/2K/XP, locally or remote.
- GPL
Zip 2 Secure EXE
- AES-128/192/256 bits File Encryption, Create self-extracting EXE files from zip files
- freeware
LoopCrypt
Encfs
TrueCrypt
LUKS
Misc
To unlock password-protected pdfs
- PDF documents may have up to 2 passwords:
- User password: protects read access to the document, and when no Owner password is specified, also protects permission settings.
- Owner password: protects full access to the document, and protects permission settings (printing, copying...)
- Use pdftops to convert a protected PDF to Postscript, and possibly combine it with ps2pdf to obtain an unrestricted pdf. Knowing the Owner password is the easiest since that allows removing all restrictions. If not, it also works but in that case the permission allow Printing must be set. If it is not the case, then Owner password is necessary. Also if User password is set (ie. pdf reader asks for a password at open), then it must be provided (providing Owner password is also ok of course).
apt-get install gs-common xpdf-utils
# on Cygwin: install package xpdf
pdftops <encrypted>.pdf <decrypted>.ps # Owner pwd set but unknown and 'allow printing' set
pdftops -upw <userpwd> <encrypted>.pdf <decrypted>.ps # Same as above but user password also set
pdftops -opw <ownerpwd> <encrypted>.pdf <decrypted>.ps # 'allow printing' not set -> owner pwd is necessary
pdftops -upw <password> <encrypted>.pdf -|ps2pdf - <decrypted>.pdf # To generate a new PDF immediately
- An other solution is to use PDF Toolkit pdftk (apt-get install pdftk). However unlike pdftops this method doesn't work when only user password is known but both passwords are set.
pdftk <encrypted>.pdf input_pw <password> output <decrypted>.pdf
- pdftk can also be used to generate protected documents, and specifying permissions.
pdftk <unprotected>.pdf output <protected>.pdf allow Printing owner_pw <ownerpwd> user_pw <userpwd> #Allow HQ printing
pwsafe
To use 'secure ram' (thereby locking the data in memory and preventing it being flushed to disk) you may like to run it setuid root:
$ sudo dpkg-statoverride --update --add --force root root 4755 /usr/bin/pwsafe