[pdftex] pdftex-pdfcrypt update

Ricardo Sanchez Carmenes carmenes at bioquimica.uniovi.es
Tue Mar 27 16:27:49 CEST 2001


On Tue, 27 Mar 2001, Hans Hagen wrote:

> At 01:17 PM 3/27/01 +0200, Ricardo Sanchez Carmenes wrote:
> > 
> >Its usage is explained in the pdfcrypt.readme file, but in short, you set
> >at the top of your TeX file something like
> >
> >\pdfcrypt{ owner "the owner pw" user "the user pw" noprint noedit }
> >
> >(see the readme file for the full list of options and their meaning).
> 
> I think that looking at the other pdftex primitives 
>   
>   \pdfcrypt 
>      owner {...} 
>      user {...} 
>      noprint 
>      noedit 

Maybe you are right. I'll study the case.
However, pdftex has also some primitives with the form
\pdfprimitive{ this and that }

Could you or anybody else provide pros and cons for each syntax ?
 
> would be better, or maybe the latter keywords should be replaced by access
> to the pdf dicts involved (i will look into that when i can test it).

No. The PDF encryption dictionary is not suitable for direct use.
It has the form:

<<
/Filter /Standard
/V 1
/R 2
/O <owner pw as a 32-byte key represented in hexadecimal>
/U < user pw as a 32-byte key represented in hexadecimal>
/P two-byte integer that controls permits
   with bits 1-2=0, 7-32=1, 3=print, 4=edit, 5=copy, 6=annotations
>>

/Filter /Standard /V 1 /R 2 are fixed, unless you use a custom-made
encryption filter. The /O and /U 32-byte keys are calculated from the
provided passwords and the "unique" file ID stored added to the trailer:
/ID [<16-byte id1><1-6byte id2>], therefore unsuitable for direct human
consum.

> Things between { } are never interpreted and i can even imagine problems
> with catcode trickery. 

Regards, Ricardo.




More information about the pdftex mailing list