Re: logarithm in OpenSSL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 p.m., Guido Vranken wrote:
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 <nniklas@xxxxxxxxxxxxxxxxxxxxx> wrote:
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 'log' is a reference to an
undefined function. The BigNum library from OpenSSL does also not seem
to offer a log function.

We suspect that the compile error comes from the fact that OpenSSL is
C90 compatible but are unsure. Does anyone know how to compute the
logarithm of a number in OpenSSL?

Thanks,
Niklas


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux