1
$\begingroup$

By encrypt in place I mean the following. Suppose I have an input plaintext of length L and I have also allocated an extra E bytes at the start and/or end of the buffer, with E << L. So the length of the input buffer is L+E and I'd like to use the same buffer for output (the encrypted data). I understand some fixed expansion may be necessary but supposing the buffer is megabytes to begin with; then that extra amount is negligible.

I'm wondering which AES-GCM implementations (preferably those that are hardware-accelerated (e.g.: AESNI, VPAES, QuickAssist)) will allow for the encryption to take place all within the original buffer without allocation of considerable additional memory (beyond the L+E total). Similarly, I'd like an encrypted buffer to be given (with additional bytes allocated, as before) and I'd like the plaintext to be decoded in-place.

Do any implementations support this? Can they be adapted to do so very easily? Specifically, what about crypto++ or OpenSSL?

$\endgroup$
1
  • 1
    $\begingroup$ This question might get closed - it's a combination of two different out-of-scope topics, namely reference requests and questions about specific crypto libraries. You'd probably have better luck on Stack Overflow or Security SE. $\endgroup$
    – pg1989
    Mar 6, 2014 at 20:45

0

Browse other questions tagged or ask your own question.