Migrating from Crypto++ 5.2.1 to Crypto++ 5.6.5

19 views
Skip to first unread message

woodma...@gmail.com

unread,
Aug 1, 2017, 3:17:32 AM8/1/17
to Crypto++ Users
Hi,

We are trying to migrate from Crypto++ 5.2.1 to Crypto++ 5.6.5. We are facing an issue with password based key derivation. In Crypto++ 5.2.1, for any given password, no matter how many times the asymmetric keys are generated based on the the RNG seeded with the password the keys are always the same but with 5.6.5 keys are different for each instance. Later I stumbled upon the thread https://groups.google.com/forum/#!topic/cryptopp-users/VTpTOzRnF7M where someone else also had similar issue. If i am correct the problem is because of RandomPool using the time for RNG from version 5.5.

Tried the below steps mentioned to use the old generator but not able to compile successfully. Building in windows platform and will post the compilation errors soon.

git clone
https://github.com/weidai11/cryptopp cryptopp-ancient
cryptopp
-ancient


//Checkout the RandomPool change
git checkout f41245df6fb9b85574260eca9cd32777e8ab5136
   
//Go back one more
git checkout HEAD
~1



Is there a way by which i can revert only the RandomPool changes done with 5.5 to get the pre 5.5 generator by still maintaining the rest of the changes in 5.6.5?
What i meant is i need 5.6.5 SDK with pre 5.5 generator.

Jeffrey Walton

unread,
Aug 1, 2017, 4:28:21 AM8/1/17
to Crypto++ Users

Tried the below steps mentioned to use the old generator but not able to compile successfully. Building in windows platform and will post the compilation errors soon.... Is there a way by which i can revert only the RandomPool changes done with 5.5 to get the pre 5.5 generator by still maintaining the rest of the changes in 5.6.5?

Try this: https://www.cryptopp.com/wiki/Old_RandomPool

Please let me know if there are any errors so they can be corrected for the next guy.

Jeff

woodma...@gmail.com

unread,
Aug 1, 2017, 12:55:10 PM8/1/17
to Crypto++ Users
Thanks Jeff.

I was able to build successfully with one small change and thought of sharing the same. Adding CorrectEndianess function in mdc.h like you have mentioned did not resolve the "Invalid use of non-static member function" compilation error. I had to make the function CorrectEndianess in iterhash.h as static and changes in mdc.h is not at all required.

Jeffrey Walton

unread,
Aug 1, 2017, 4:09:22 PM8/1/17
to Crypto++ Users


On Tuesday, August 1, 2017 at 12:55:10 PM UTC-4, woodma...@gmail.com wrote:
Thanks Jeff.

I was able to build successfully with one small change and thought of sharing the same. Adding CorrectEndianess function in mdc.h like you have mentioned did not resolve the "Invalid use of non-static member function" compilation error. I had to make the function CorrectEndianess in iterhash.h as static and changes in mdc.h is not at all required.

Ack, thanks.
 

Jeffrey Walton

unread,
Aug 1, 2017, 5:41:53 PM8/1/17
to Crypto++ Users


On Tuesday, August 1, 2017 at 4:09:22 PM UTC-4, Jeffrey Walton wrote:

On Tuesday, August 1, 2017 at 12:55:10 PM UTC-4, woodma...@gmail.com wrote:
Thanks Jeff.

I was able to build successfully with one small change and thought of sharing the same. Adding CorrectEndianess function in mdc.h like you have mentioned did not resolve the "Invalid use of non-static member function" compilation error. I had to make the function CorrectEndianess in iterhash.h as static and changes in mdc.h is not at all required.

Now open in the bug tracker: "Add OldRandomPool for pre-Crypto++ 5.5 compatibility", https://github.com/weidai11/cryptopp/issues/452.

Jeff

Jeffrey Walton

unread,
Aug 1, 2017, 8:02:58 PM8/1/17
to Crypto++ Users

I was able to build successfully with one small change and thought of sharing the same. Adding CorrectEndianess function in mdc.h like you have mentioned did not resolve the "Invalid use of non-static member function" compilation error. I had to make the function CorrectEndianess in iterhash.h as static and changes in mdc.h is not at all required.

Now open in the bug tracker: "Add OldRandomPool for pre-Crypto++ 5.5 compatibility", https://github.com/weidai11/cryptopp/issues/452.
Reply all
Reply to author
Forward
0 new messages