In message <[EMAIL PROTECTED]> on Mon, 28 Jun 2004 22:46:35 +0200 (METDST), "Roman 
Pletka via RT" <[EMAIL PROTECTED]> said:

rt> | Your patch is flawed.  At that point, there has been a test to check if
rt> | ctx->buf_len is non-zero already, and an error is generated if it is.
rt> | At the point of your patch, ctx->buf_len will *always* be zero.
rt> 
rt> Not quite, the test on ctx->buf_len is only done if no-padding is
rt> set.

Incorrect, you have the test for ctx->buf_len in evp_enc.c, lines
441--445.

rt> ctx->buf_len is always zero only if the length is a multiple of
rt> ctx->the block size.

In the case padding is used, it still has to.  If it's not zero, the
error EVP_R_WRONG_FINAL_BLOCK_LENGTH will be signalled.

rt> | I think the real problem lies in apps/speed.c, which should set
rt> | the EVP_CIPH_NO_PADDING flag for the decrypt tests (at the very
rt> | least).  The speed difference will be very small.
rt> 
rt> This looks fine as long as the message is exactly a multiple of
rt> the block size, which is actually the case for speed as the values
rt> are hard-coded in speed.c.  However, handling of not-aligned
rt> message sizes still remains broken in the speed test. This is
rt> currently not used, but somebody might use it once...

Well, in the decryption case, the input has to be an exact multiple of
block size.  For encryption, it's of course a different matter, but as
you noticed, the input is a multiple of block size anyway...  If that
changes, we're definitely bound to notice :-).

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte   \ Tunnlandsv�gen 52 \ [EMAIL PROTECTED]
[EMAIL PROTECTED]  \ S-168 36  BROMMA  \ T: +46-708-26 53 44
                    \      SWEDEN       \
Procurator Odiosus Ex Infernis                -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to