pdf-devel
[Top][All Lists]
Advanced

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

Re: [pdf-devel] Crypt module discussion


From: jemarch
Subject: Re: [pdf-devel] Crypt module discussion
Date: Mon, 04 Aug 2008 21:31:28 +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)

   >    > Does OUTSIZE not function as a guard to make it easier to avoid
   >    > overflowing the 'out' buffer?
   >
   >    Yes, it is true. But I mean, we can provide a function or macro
   >    which return the size of the encrypted output buffer. So we avoid
   >    caller need know about padding, for example.
   >
   > Do that function always fill the output buffer? Or it is possible to
   > calculate the size of the output buffer that is going to be filled?

   For AESv2 and ARC4 it is possible.

Ok, that explain the interface used by libgcrypt. The stream filter
interface is something like (I am finishing the stream implementation
and thus some minor change may arise, but the fundamentals of the API
are stable):

pdf_status_t
pdf_stm_f_null_apply (pdf_hash_t params,
                      pdf_hash_t state,
                      pdf_stm_buffer_t in,
                      pdf_stm_buffer_t out,
                      pdf_size_t *bytes_consumed,
                      pdf_size_t *bytes_produced);

The interface provided by pdf-crypt will be used in the
implementation of 'pdf_stm_f_crypt_apply'.





reply via email to

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