Regarding the use of EVP_aes_256_cbc_hmac_sha256, EVP_rc4_hmac_md5 and AES_encrypt

2019-04-17 Thread Guido Vranken
First question: How should AAD data be supplied to ciphers like EVP_aes_256_cbc_hmac_sha256() and EVP_rc4_hmac_md5()? If I understand correctly, these are AEAD ciphers (the EVP_CIPH_FLAG_AEAD_CIPHER flag is set), so it should be possible to provide AAD data? The following seems to work for AEAD

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, > >

Re: logarithm in OpenSSL

2019-07-24 Thread Guido Vranken
ndard 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 re

liblegacy.a does not work unless compiled with -static

2020-05-01 Thread Guido Vranken
When I configure using "./config enable-legacy" it creates providers/liblegacy.a, then in the program I link with it, OSSL_PROVIDER_load fails (returns NULL). When I configure using "./config enable-legacy -static" it works as expected. However, building with -static fails on OSS-Fuzz when buildi

Re: OpenSSL version 3.0.0-alpha1 published

2020-05-01 Thread Guido Vranken
Reminder that in git master and 3.0.0, CAST5 gives the wrong output: https://github.com/openssl/openssl/issues/11459 (this proof of concept was made before you moved CAST5 to liblegacy, so just put OSSL_PROVIDER_load(nullptr, "legacy"); in there to make it work) On Thu, Apr 23, 2020 at 4:30 PM Ope

Re: liblegacy.a does not work unless compiled with -static

2020-05-01 Thread Guido Vranken
l location then make sure the OPENSSL_MODULES > environment variable is pointing at its directory. > > Matt > > > On 01/05/2020 17:14, Guido Vranken wrote: > > When I configure using "./config enable-legacy" it creates > > providers/liblegacy.a, then in the p

Re: endless loop in probable_prime

2020-06-18 Thread Guido Vranken
I think this could be an issue with the system's /dev/urandom or entropy, as I've observed similar infinite loops in BN_prime when I changed OpenSSL code to always return the same sequence of bytes from its PRNG (for testing purposes). It could also be a genuine bug in OpenSSL, or both. I'll let ot

Re: cURL fails with 'elliptic curve routines:EC_POINT_set_affine_coordinates:point is not on curve' error

2022-08-02 Thread Guido Vranken
Probably this: https://github.com/openssl/openssl/issues/18225 On Tue, Aug 2, 2022 at 5:09 PM Karen Arutyunov wrote: > Hello, > > After building an optimized version of cURL 7.76.0 with OpenSSL 1.1.1n > using Clang 14.0.6, running > > curl https://www.example.com > > ends up with the following e