TaleTN / libtomcrypt-rsa-howto

LibTomCrypt RSA digital signatures how-to
Other
9 stars 4 forks source link

Update rsa_make_key.cpp #2

Closed OsgoodSchlatter closed 1 year ago

OsgoodSchlatter commented 1 year ago

This fix was found on this stack overflow: https://stackoverflow.com/questions/37955209/runtime-error-segmentation-fault-with-libtommath-and-libtomcrypt

otherwise at compilation time an error happens: error: 'ltm_desc' undeclared (first use in this function) 33 | ltc_mp = ltm_desc;

TaleTN commented 1 year ago

Thanks for the pull equest, but I'm not seeing this (tested on VS2022, Xcode 13.4.1, and GCC 7.4.0).

Also, ltm_desc is already declared in src/headers/tomcrypt_math.h, so maybe you have removed -DLTM_DESC from the makefile? Or maybe you're using a LibTomMath/Crypt system-wide version rather than the locally built version?

Note that LibTomCrypt tends to use #include instead of #include "tomcrypt.h", which might favor the system version over the local version. I guess I could change this in my how-to, but unfortunately LibTomCrypt also uses this #include style internally.