[pdftex] pdftex-pdfcrypt update

Heiko Oberdiek oberdiek at ruf.uni-freiburg.de
Wed Mar 28 18:22:34 CEST 2001

At 10:13 27.03.2001 +0200, Ricardo Sanchez Carmenes wrote:
>I have updated the pdfcrypt version of pdftex to fix a problem
>regarding outlines. Fixed linux binaries are available at

A very good idea starting support of encryption, because
this feature is asked by many people (despite of the fact,
that the security is not very high).

But it is a hard job to do it in pdfTeX, because pdfTeX
provides low level features, where pdf code is directly
inserted. So _all_ insertions (by \pdfobj, \pdfstartlink, ...)
have to be scanned to detect strings and streams in order
to encrypt them.

For example two test files, that are currently not encrypted
in a correct way:

%%% cut %%% testurl.tex %%% cut %%%
\pdfcrypt{owner = "test" user = "test" none print}
\font\f=pcrr \f
    /Subtype /Link
    /A <<
      /Type /Action
      /S /URI
      /URI (http://www.dante.de/)
%%% cut %%% testurl.tex %%% cut %%%

The pdf code contains an unencrypted string:
  /URI (http://www.dante.de/)
(and AR will decrypt it to nonsense.)

An example with stream and string:

%%% cut %%% testobj.tex %%% cut %%%
\pdfcrypt{owner = "test" user = "test" none print}
    /Type /DummyTest^^J%
    /TestString (FOO BAR)^^J%
    /Length 11^^J%
  HELLO WORLDendstream%
%%% cut %%% testobj.tex %%% cut %%%

The object is not encrypted at all:

1 0 obj
/Type /DummyTest
/TestString (FOO BAR)
/Length 11
HELLO WORLDendstream

Perhaps it is easier and safer to write a standalone
program that adds encryption support. Also this has
the advantage that such a program can be used with
pdf files, generated with ghostscript.

Best regards
  Heiko <oberdiek at ruf.uni-freiburg.de>

More information about the pdftex mailing list