Quantcast
Channel: Adobe Community : Popular Discussions - PDF Language and Specifications
Viewing all articles
Browse latest Browse all 46145

AES256

$
0
0

Hello everyone,

 

I try to implement AES256 encryption in c++ according to adobe_supplement_iso32000-1.pdf.

But I still have some problems wehen opening the encrypted document. After opening my

encrypted document and entering the password I could the message  "There was an error opening this document.

Acrobat cannot decrypt this document". I know the message is clear but finding the reason is not so obviously for me.

 

I have some questions about creating the encryption dictionary. My first question concerns the passwords (user and owner).

I use 7ascii characters in my example. Do I have to prepare my password anyway (SASLPrep, etc)? In my opinion there

no transformation neccessary.

 

The second question concerns the file encryption key. When encrypting with AES128  the file encryption key depends on

user and owner password. For AES256 I create a 32 byte file encryption key by using a random number generator and use

this key when creating the UE and OE value. Is this the correct way?

 

My last question is about the error message above, I created the data for the encryption dictionary described in  adobe_supplement_iso32000-1.pdf

and I passed all the test in " Algorithm 3.2a Computing an encryption key" and the authentication tests.I encrypted the strings and stream data of the

pdf in the same way like encrypting with AES128 but using my random 32 byte file encrypion key and the cipher EVP_aes_256_cbc()

 

So my question is does this error depends only on (incorrect) the U,UE,O and OE values or could it be also a wrong created Perms value?

 

Thanks in advance

 

Ruediger


Viewing all articles
Browse latest Browse all 46145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>