Re: logarithm in OpenSSL

2019-07-24 Thread Dr Paul Dale
I’m wondering why you need the log function? If you’re measuring performance, could the analysis tool perform the logarithm? A first order approximation to log_2(n) where n is a BIGNUM would be BN_num_bits(n). Pauli -- Dr Paul Dale | Cryptographer | Network Security & Encryption Phone +61 7 3

Re: logarithm in OpenSSL

2019-07-24 Thread Hal Murray
guidovran...@gmail.com said: > If you require logarithms of large numbers, you'll have to resort to a > library that supports this, like the one I linked to. Or scale the large number so it fits and add the log of the scale factor which you can compute by hand from the scale factor. For examp

Re: Openssl binary with statically linked libssl and libcrypto

2019-07-24 Thread Michael Mueller
On Wed, Jul 24, 2019, 7:00 AM K Lengauer wrote: > So if I understand you correctly you also use the > "build.info" file to specify the static libraries as dependencies for the > 'openssl' binary. > Negative. We use the following method: ./config \ no-hw \ no-zl

Re: logarithm in OpenSSL

2019-07-24 Thread Guido Vranken
log() in math.h only supports float or double type. float and double are limited in the range of numbers they can express. For example, these types cannot hold large numbers like "9". Depending on your purpose, float and double may be sufficient, and you can

Re: logarithm in OpenSSL

2019-07-24 Thread Niklas Niere
Thank you for the answer. We are using the Makefile from OpenSSL to compile our feature as it changes OpenSSL directly. As I understood it, we would have to import another number library to compile our code with the standard OpenSSL settings and using the logarithm, correct? On 2019-07-24 6:51

Re: logarithm in OpenSSL

2019-07-24 Thread Guido Vranken
If you want to use the log() from math.h, then you must compile with -lm, eg.: clang source.c -lm The log() in math.h only supports floating point numbers. If you require computing logarithms of bignums, try https://www.mpfr.org/ On Wed, Jul 24, 2019 at 6:39 PM Niklas Niere wrote: > Hello, > >

logarithm in OpenSSL

2019-07-24 Thread Niklas Niere
Hello, we are implementing a TLS 1.3 feature into OpenSSL to get an idea of how well our feature performs in a concrete server library. In the feature, we want to use the log function. When we try to use the log function from the math.h header, OpenSSL won't compile with the statement that '

Re: Openssl binary with statically linked libssl and libcrypto

2019-07-24 Thread K Lengauer
Hi Michael Mueller Thank you for answering. So if I understand you correctly you also use the "build.info" file to specify the static libraries as dependencies for the 'openssl' binary. Do you encounter any segmentation faults when running the tests provided by OpenSSL in the openssl/test/recipe

RE: Engine updating a key's ex data in sign/encrypt method?

2019-07-24 Thread Lynch, Andrew
Hi Matt, Thanks for the thumbs-up. I can confirm that it works as expected. If I cast away the const and call RSA_set_ex_data() then the session handle is updated and available the next time stunnel uses that same key. Now I just need to figure out how to document this so that a potential cod