Set the key length to 128 when encrypting pdf files

Key length is sometimes used to measure the relative strength of the encryption algorithm (i.e., the longer the key length, the more difficult the key is to decode). Encryption can be describes as 128-bit & 40-bit in terms of key length. The main difference is that 128-bit encryption provides a significantly greater amount of cryptographic protection than 40-bit encryption. It is pretty easy to set key length to 128 when encrypting pdf files by using Advanced PDF Tools Command Line, the operation of which is also simple, just follow the below steps.

First, follow this link you will obtain Advanced PDF Tools

do remember to extract it, for it is a zipped package.

Second, launch the MS-DOS command prompt window

steps are as follows:

start the dialog box of “cmd.exe”: press  “start”>choose “Run”>input “cmd”>press “ok”

way to launch MS-DOS command prompt window

when the following appears, you will have the MS-DOS command prompt window

command prompt

Third, input the command line to set the key length to 128 when encrypting pdf files

it goes below

pdftools.exe -i C:\*.pdf -o D:\*.pdf  -S ownerpwd=123  -S keylen=2


  • the option -i is to specify a pdf filename or a directory for input,
  • the option -o is to specify the pdf file name for output,
  • -S ownerpwd=123 to set owner password as 123,
  • -S keylen=2 refers to 128 bit AES encryption (Acrobat 7 or higher)

when the input is done, press “enter” key, you will see

detailed operation

Fourth, open the file to check the effect

output pdf file

you will find there is a security setting appeared. If you click “Permission Details”, a window will popup  showing the document restrictions. and you click “Change Setting”, an owner password is needed, see below,

psssword inputing

and then typing owner password 123, you are allowed to see,


VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Verify Code   If you cannot see the CheckCode image,please refresh the page again!