EVP_EncryptUpdate and EVP_CIPHER callback do_cipher

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

 



Dear Matt,

On Mon, Apr 18, 2016 at 6:00 PM, Matt Caswell <matt at openssl.org> wrote:

>
>
> On 18/04/16 15:55, Dmitry Belyavsky wrote:
> > Hello,
> >
> > Could anybody explain how to deal with the output length in the
> > EVP_EncryptUpdate?
> >
> > The function EVP_EncryptUpdate has the outl output parameter, which is
> > designed for returning the length of the resulting ciphertext. Then
> > internally it calls the do_cipher callback which does not take such a
> > parameter.
> >
> > Is there a way to return an expected buffer length from the callback?
> > It may be necessary when we call the EVP_EncryptUpdate some times, and
> > we get the case when ctx->buf from the previous calls has enough bytes
> > to be processed together with the input buffer so the output is longer
> > then the input.
>
> The man page advises that the size of the output buffer should be:
>
> inl + cipher_block_size - 1
>
> This should cater for all eventualities.
>

Thank you!

-- 
SY, Dmitry Belyavsky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20160418/0566cb2d/attachment.html>


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

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux