Thanks for the clarification.  I'll take a look at PDFBOX-907 when I get 
time if someone else doesn't get to it first.

I can not yet comment on whether we can keep using the SecurityHandler or 
if we'll have to switch to a new object.  Once I read through 907 and read 
the manual on how AES encryption is done, I should understand enough to 
comment.

---- 
Thanks,
Adam



From:
"martijn.list" <martijn.l...@gmail.com>
To:
dev@pdfbox.apache.org
Date:
11/29/2010 11:55
Subject:
Some thoughts about PDF encryption



Hi,

New encryption algorithms like AES encryption require interaction with
the encryption dictionary of a PDF document. For example the AES
decryption support in PDFBOX-872 requires that the crypt filter method
(CFM) denotes that the encryption method used was AES. I recently added
another patch (PDFBOX-907) to the encryption code to support PDFs that
do not encrypt the meta data (this is a relatively new feature). If the
meta data is not encrypted, the calculation of the encryption key is
different then when the meta data is encrypted. Whether or not the meta
data is encrypted is stored in the encryption dictionary. The patch for
 PDFBOX-907 therefore adds support for the EncryptMetadata property and
modifies the encryption key calculation when needed.
The patch for  PDFBOX-872 only adds AES decryption but not AES
encryption. AES encryption requires a couple of changes . The main
change is that the meta data should be updated to indicate that the PDF
is AES encrypted. Although it's possible to add this to the existing
SecurityHandler it might be better imho to refactor some parts. I think
it would be better to create something like an encryption Builder which
can be used to create a password and modify the encryption dictionary.
The Builder should have methods like setEncryptionMethod,
setEncryptMetaData, setPassword, setRevision etc. and when all required
settings are available, you can create the encryption key and let the
builder change the  encryption dictionary.

Might this be something for an upcoming version?
 
Kind regards,

Martijn Brinkers





- FHA 203b; 203k; HECM; VA; USDA; Conventional 
- Warehouse Lines; FHA-Authorized Originators 
- Lending and Servicing in over 45 States 
www.swmc.com   -  www.simplehecmcalculator.com   
Visit  www.swmc.com/resources   for helpful links on Training, Webinars, Lender 
Alerts and Submitting Conditions  

This email and any content within or attached hereto from Sun West Mortgage 
Company, Inc. is confidential and/or legally privileged. The information is 
intended only for the use of the individual or entity named on this email. If 
you are not the intended recipient, you are hereby notified that any 
disclosure, copying, distribution or taking any action in reliance on the 
contents of this email information is strictly prohibited, and that the 
documents should be returned to this office immediately by email. Receipt by 
anyone other than the intended recipient is not a waiver of any privilege. 
Please do not include your social security number, account number, or any other 
personal or financial information in the content of the email. Should you have 
any questions, please call (800) 453 7884.  

Reply via email to