Can't compile KeyGen 64 Project

x64 version issues
Enigma
Site Admin
Posts: 2939
Joined: Wed Aug 20, 2008 2:24 pm

Re: Can't compile KeyGen 64 Project

Post by Enigma »

Hi samsonite131,

Sorry for the delay in reply. As I have checked, the compiled keygen, with the all same parameters like your one, works well and generates the key as well. See screen below.

Can you please send me the overall folder with your project and all files, I will try to check what is wrong there in your case.
screen.png
screen.png (37.96 KiB) Viewed 19035 times
Enigma
Site Admin
Posts: 2939
Joined: Wed Aug 20, 2008 2:24 pm

Re: Can't compile KeyGen 64 Project

Post by Enigma »

Yes, there are problems with the examples that are being affected x64 version (curious why x86 version does not have such problems?).

Problem happen when we assign a private and public keys to the kp structure inside switch/case block. The private and public keys are being initially assign to the local variables declared within switch/case block only, after this block compiler frees key buffers, so when the kp structure reaches the generator function, the private and public keys are empty there.

The solution would be to re-declare char *pl, *pr within function scope, like in the attached example.

Thanks for the note, hope the problem is solved.
Attachments
keygenDlg.zip
(11.85 KiB) Downloaded 1312 times
samsonite131
Posts: 30
Joined: Tue Oct 15, 2013 10:35 pm

Re: Can't compile KeyGen 64 Project

Post by samsonite131 »

Great, it's working now!
Thank you very much! :)
Enigma
Site Admin
Posts: 2939
Joined: Wed Aug 20, 2008 2:24 pm

Re: Can't compile KeyGen 64 Project

Post by Enigma »

You are welcome :)
Post Reply