pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] Encryption filters


From: jemarch
Subject: Re: [pdf-devel] Encryption filters
Date: Tue, 29 Jul 2008 00:06:47 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

   > I dont fully understand. What is the difference between a "crypt  
   > filter dictionary" and a "filter dictionary"?

   Not to step on the OP, but my take on this:

Your opinion and experience are always quite welcome, Ralph :)

   A standard stream can have a filter chain on it, and one of the
   filters in the chain can be a 'Crypt' filter. That's what was meant
   by a "filter dictionary" I think.

So crypt filters are just regular filters..

   To actually know what algorithm to use in a particular 'Crypt' filter  
   instance, you look at the corresponding DecodeParms entry. This is a  
   dictionary, if present, with Type CryptFilterDecodeParms and a Name  
   key. The value of that Name key indexes the CF dictionary in the  
   global Encryption Dictionary. The values in the CF dictionary are  
   "crypt filter dictionaries" which define the actual cipher, key  
   length, authorization triggers and so on.

..that get some parameters from those "crypt filter dictionaries".

Ok, so I think we can implement those crypt filters as regular stm
filters.

A question that remains is that we will also need to encrypt text
strings using those algorightms. The stream interface would be quite
inefficient for that application.

David, maybe would be a good idea to create a new module 'pdf-crypt'
in the base layer containing functions to:

 - de/encrypt pdf_text_t values.
 - de/encrypt memory regions (buffers). This interface would be used in the
   implementation of the crypt stm filters.

The pdf-crypt module would centralise the use of libgcrypt and would
also contain the MD5, etc functions.

What do you think?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]