Hi Everyone, strciphr.cpp has a couple of classes that gave us trouble in the past. The class functions were CFB_CipherTemplate<BASE>::ProcessData and AdditiveCipherTemplate<S>::ProcessData. The classes encrypt or decrypt a byte string:
ProcessData(byte* outString, const byte* inString, size_t length); The problem arose because of in-place encryption or decryption (lots of hand waiving): std::string str = "Super secret information"; ... ProcessData(&str, &str, str.size()); Clang and GCC started removing writes to outString due to alias violation. Or I think it was alias violations. Initially we cut-in a separate buffer for the classes and then performed a memcpy. That crushed performance per GH #1010 on some platforms. We recently removed the separate buffer and memcpy to restore performance. We are now testing a volatile pointer to tame the optimizer. Testing is Ok on the platforms that caused us troubles in the past. If you have some time, please test the "strciphr" branch of Crypto++ and report any troubles you encounter. Here are the steps: $ git clone https://github.com/weidai11/cryptopp cryptopp-strciphr $ cd cryptopp-strciphr $ git checkout strciphr $ make -j 4 && ./cryptest.exe v && ./cryptest.exe tv all Please report any failures. Thanks in advance. Jeff -- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/4b330dd1-1365-459d-aa67-27648db38b85n%40googlegroups.com.