[pdftex] pdftex-pdfcrypt update

Ricardo Sanchez Carmenes carmenes at bioquimica.uniovi.es
Tue Mar 27 14:17:44 CEST 2001

On Tue, 27 Mar 2001, Hans Hagen wrote:

> >I have not yet discussed with Han if he would like to incorporate the
> >changes into the regular version, but as he has welcomed the enhancement, 
> >I may assume that he would, and I would be happy to see it there.
> I may be wise to discuss the new primitives neede to set the options,
> before it will move into the core of pdftex. 

Only one primitive is necessary. I have named it \pdfcrypt, but I could
suggest \donquijote as a suitable alternative (the second most translated
book after the bible :-). Han should have the last word on its name.

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).

It allows to set conveniently all existing security variants with one
single primitive. I don't think it would be useful to incorporate more

> >I am not making use of OS-specific code (well, rand() and srand() are
> >probably implementation-specific, but they do not realy matter), so
> >it should compile in Windows and others. However, I only can compile
> >under linux myself.
> I'm pretty sure that fabrice can cover the random functions -) 

He is welcome, although this is not a concern to me: I will explain.

I'm using the "random" functions to generate a (pseudo-unique) file ID.
The PDFref manual suggests (but not enforces) to generate a "unique" file
ID based on the filename and creation date, but for the purpose, I believe 
that a (pseudo)ramdom string is enough, using a seed based on creation
date. A more complicated algorythm would not add any security, as the
real weakness (for those who worry) of the encryption system is elsewhere.

Regards, Ricardo.

More information about the pdftex mailing list