newhopecrypto / newhope

Software of the NIST Post-Quantum submission NewHope
https://newhopecrypto.org
43 stars 9 forks source link

Crypto library not found #2

Closed svaidyans closed 5 years ago

svaidyans commented 5 years ago

Hi,

Getting "ld: library not found for -lcrypto" during make. Can you please let me know from where to get the crypto lib. Thanks a bunch.

Best, Vaidya.

cryptojedi commented 5 years ago

Vaidyanathan Sivasubramanian notifications@github.com wrote:

Hi,

Hi Vaidya,

Getting "ld: library not found for -lcrypto" during make. Can you please let me know from where to get the crypto lib. Thanks a bunch.

NewHope itself does not need this linker flag, but unfortunately the deterministic randomness generation provided by NIST (and included in the package for testvector generation) does. You need to install the OpenSSL library and the corresponding development headers. On a Debian-based system, for example, you can do so by running

apt install libssl-dev

All the best,

Peter

svaidyans commented 5 years ago

Hi Peter,

Thanks for the prompt response. I am on a Mac with Mojave. From StackOverflow, looks like Apple has its own libraries for openssl and libssl causing compilation problems (here). There are several suggestions to fix but none of them are working for me. If you have any advise, please share. Thanks a bunch.

Best, Vaidya.

cryptojedi commented 5 years ago

Vaidyanathan Sivasubramanian notifications@github.com wrote:

Hi Peter,

Hi Vaidyanathan,

Thanks for the prompt response. I am on a Mac with Mojave. From StackOverflow, looks like Apple has its own libraries for openssl and libssl causing compilation problems (here). There are several suggestions to fix but none of them are working for me. If you have any advise, please share. Thanks a bunch.

It took me a while, because I needed to find somebody who is familiar with libssl on OSX. What I learned is that apparently you'll have to install OpenSSL via brew (i.e., use something like "brew install openssl"). Then you'll need to pass the path of that OpenSSL installation during compilation with a suitable -L flag. Sorry that I cannot give you more details, but I cannot test this myself.

All the best,

Peter

svaidyans commented 5 years ago

Hi Peter,

Thank you very much for all your efforts; truly appreciate the time. I did try with brew and the appropriate flags. Anyhow will keep plugging at this and post if I find any solution.

Thanks a bunch.

Best, Vaidya.