I have tried with CRYPTOPP_BOOL_ALIGN16_ENABLED 0, but encryption/
decryption stopped working completely.
Perhaps this flag can be used only on big-endians to make bytes
ordered correctly.

But thanks for info, it definitely must be some issue with allocator/
deallocator, because in deallocator function it things that
m_allocated is false.
This leads me to another possible cause and that is handling of input
data. I always cleanup input arrays and have my own ShredByteArray
function, but it looks like secblock.h has already something similar
in place - SecureWipeArray. In my code I overwrite existing arrays and
reuse them for the next round of encryption/decryption and only shred
data and 'delete []' when I'm done. It is possible that I'm just using
it wrong and I should pass input arrays and forget it and let
deallocator do it's job.
However I haven't found in the documentation what the correct usage
is. Examples usually don't include clean up steps. I worry about
memory leaks, so I do the clean up myself. It would be nice if docs
said explicitly "call delete [] Key, delete [] IV and delete []
inputArray after calling Encrypt/Decrypt" or "call delete []
inputArray, but DO NOT clean up key and iv, it's being taken care of
in deallocator function".

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscr...@googlegroups.com.
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to