Andrea,

Andrea wrote
> encryption is performed without an owner password being specified. I read
> the specs, the mailing list and looked at the code and my understanding
> from the specs is that "If there is no owner password, use the user
> password instead". As far as I can tell this doesn't happen in iText and a
> random owner password is generated, I would like to know if there's some
> reason for that or if maybe I missed something.

The only part of the specification indication anything in that direction is 

> Algorithm 3: Computing the encryption dictionary’s O (owner password)
> value
> a)Pad or truncate the owner password string as described in step (a) of
> "Algorithm 2: Computing an encryption key". If there is no owner password,
> use the user password instead.

In case of a PDF generating library this does not say *if the caller
supplies no owner password*, it says *if there is no owner password.* When
you request a null owner password and the library method you use is
documented as

    /**
     * Sets the encryption options for this document. The userPassword and
the
     *  ownerPassword can be null or have zero length. In this case the
ownerPassword
     *  is replaced by a random string.

then there is an owner password, *a random string*. Thus, this behavior of
iText does not contradict the PDF specification.

Regards,   Michael



--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Encrypt-without-owner-password-and-random-password-generation-tp4659839p4659841.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to