A question about pdf encryption details

Started by rakshithpai, April 09, 2019, 03:13:18 AM

Previous topic - Next topic

rakshithpai

What is the difference between the below encryption standards. ?

1. Standard V2.3 (128-bit)
2. Standard V4.4 (128-bit)
3. Standard V1.3 (40-bit)
4. Standard V5.5 (256-bit)
5. Standard V1.2 (40-bit)


Can someone please explain the difference between Standard V2.3 (128-bit) and Standard V4.4 (128-bit) ?

Hayo Baan

#1
Phil is probably able to answer this fully, but from the source code I learned that: V<5 uses MD5 and RC4, and V5 uses SHA and AES.
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

From the PDF reference documentation, the major version gives this:

A code specifying the algorithm to be used in en- crypting and decrypting the document:
0 An algorithm that is undocumented and no longer supported, and whose use is strongly discouraged.
1 Algorithm 3.1 on page 95, with an encryption key length of 40 bits; see below.
2 (PDF 1.4) Algorithm 3.1, but permitting encryption key lengths greater than 40 bits.
3 (PDF 1.4) An unpublished algorithm that permits encryption key lengths rang- ing from 40 to 128 bits; see implementation note 21 in Appendix H.
4 (PDF 1.5) The security handler defines the use of encryption and decryption in the document, using the rules specified by the CF, StmF, and StrF entries.
The default value if this entry is omitted is 0, but a value of 1 or greater is strongly rec- ommended. (See implementation note 22 in Appendix H.)


Hayo has perhaps given more useful information than what I just pasted, but for more details you can read the PDF reference specification.

Basically, the higher numbers are newer versions of the encryption used in more recent versions of the PDF specification.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).