Can the same pointer safely be used for the input and output buffers in
encrypt and decrypt operations ?
i.e. is something like AES_encrypt(out,out,key) guaranteed not to rewrite
the input before it's been processed ?

The following IMPLIES this is safe but lingering doubts remain.

...

Note: I'm interested in the general case. AES was just used as an example
of the type of operation and it's the example I found which implied this
works.

Alternatively do any test cases exist that'd fail if someone provided asm
which broke this behaviour ?.

Checking the source code only goes so far, it'd be really hard to verify
all the asm modules.

The least I can say is that I always consider inp==out as valid case.

We could write our own tests for this, but it'd be preferable that the
OpenSSL behaviour was known to preserve this feature - patching some random
asm module to 'fix' a break of this in the future wouldn't be trivial.

Failure to perform operation in place will be considered as bug and will be acted upon accordingly.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to