[openssl-dev] [openssl.org #4362] chacha-x86.pl has stricter aliasing requirements than other files

David Benjamin via RT rt at openssl.org
Wed Jun 15 15:41:48 UTC 2016


I don't think that will work. The SSL code uses in-place buffers
extensively, so in == out definitely needs to be defined. The question is
only whether out < in is also acceptable.

Either way, for BoringSSL, I've gone ahead and tightened our aliasing
constraints to forbid out < in and require equality, so that we don't have
to keep chasing down discrepancies in the assembly code in advance of a
decision being made here.

(I think there is something to be said for being able to in-place-ish
decrypt a structure with a record header and write the output without the
header, but perhaps this use case is not worth the cost---I see the numbers
went down slightly for chacha-x86.pl. Then again, most other files manage
it naturally. It's a decision you all will need to make.)

David


On Wed, Jun 15, 2016 at 11:01 AM Rich Salz via RT <rt at openssl.org> wrote:

> I think for now, we just note this in the documentation: behavior for
> overlapping buffers, and even in-place buffers, is not defined.
>
> It's like memcpy() vs memmove().
>
> --
> Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4362
> Please log in as guest with password guest if prompted
>
>

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4362
Please log in as guest with password guest if prompted



More information about the openssl-dev mailing list