Help on mixed encrypt/decrypt data using C++/java

2021-10-05 Thread Jason Qian via openssl-users
Hi, We encrypt data using openSSL C++ API, decrypt data using java(default security package). 99.9% of the time, it works fine, but when multi-instances of apps encrypt data at same time, java fails to decrypt . We are using version 1.1.01 (AES/CBC/PKCS5Padding) mpCtx = EVP_CIPHER_CTX_new();

help on openssl api for encryption

2020-01-28 Thread Jason Qian via openssl-users
Hi, Tried the example on: https://wiki.openssl.org/index.php/EVP_Symmetric_Encryption_and_Decryption On the Linux platform, when I set plaintext to "jason", it works fine. When I set it to "Jason", it returns an empty string. It works fine on windows platform for both cases. Thanks for your

Re: Help on Diffie Hellman key exchange

2019-11-13 Thread Jason Qian via openssl-users
Thanks Rich, On Wed, Nov 13, 2019 at 12:34 PM Salz, Rich wrote: > *>*For using 1.1.0, we only need to call RAND_bytes() ? > > > > Yes. But do check the return value of RAND_bytes. >

Re: Help on Diffie Hellman key exchange

2019-11-13 Thread Jason Qian via openssl-users
Thanks Rich and Tomas, Here is the code for creating the key (openssl-0.9.8h) int AESCipher::createKey(unsigned char *buf, int keySize) { char seed[256]; ::sprintf(seed, "%ldXXX_XXX_H__x__xxx_x_xxx__INCLUDED_", MiscUtils::generateId()); RAND_seed(seed, ::strlen(seed));

Re: Help on Diffie Hellman key exchange

2019-11-13 Thread Jason Qian via openssl-users
019-11-04 at 17:34 -0500, Jason Qian via openssl-users wrote: >> > Hi >> > >> >We have an application that does the Diffie Hellman key exchange >> > (OpenSSL/1.1.0f). >> >It works fine, but under heavy loaded conditions, sometimes an >> >

Re: Help on Diffie Hellman key exchange

2019-11-12 Thread Jason Qian via openssl-users
Thanks Tomas, I will try that. On Tue, Nov 12, 2019 at 3:14 AM Tomas Mraz wrote: > On Mon, 2019-11-04 at 17:34 -0500, Jason Qian via openssl-users wrote: > > Hi > > > >We have an application that does the Diffie Hellman key exchange > > (OpenSSL/1.1.0f). >

Help on Diffie Hellman key exchange

2019-11-04 Thread Jason Qian via openssl-users
Hi We have an application that does the Diffie Hellman key exchange (OpenSSL/1.1.0f). It works fine, but under heavy loaded conditions, sometimes an invalide secret been generated and other side couldn't decrypt the data (the secret seems offset by one). The client side is c++ and the

Re: [openssl-users] DH_generate_key Hangs

2017-10-06 Thread Jason Qian via openssl-users
Hi Salz, I have built the 1.1.0f with vc10 ( have to move some header files) Is the OpenSSL 1.1.0f supported version ? Thanks Jason On Thu, Oct 5, 2017 at 3:31 PM, Salz, Rich wrote: > >- Compared code of RAND_poll(void) between 1.0.1 and 1.0.2 and it >

Re: [openssl-users] DH_generate_key Hangs

2017-10-06 Thread Jason Qian via openssl-users
, 2017 at 3:37 PM, Jeffrey Walton <noloa...@gmail.com> wrote: > On Thu, Oct 5, 2017 at 3:27 PM, Jason Qian via openssl-users > <openssl-users@openssl.org> wrote: > > Compared code of RAND_poll(void) between 1.0.1 and 1.0.2 and it seems no > > change > >

Re: [openssl-users] DH_generate_key Hangs

2017-10-06 Thread Jason Qian via openssl-users
Thanks, On Fri, Oct 6, 2017 at 9:36 AM, Salz, Rich wrote: > Okay, you seem to be looking for an answer and there isn’t one. > > > > The release you are using has problems when it decided to walk the heap. > The release you are using WILL NOT BE FIXED. > > > > Change your code,

Re: [openssl-users] DH_generate_key Hangs

2017-10-06 Thread Jason Qian via openssl-users
Thanks Jeff, The challenge is that, we are not directly calling RAND_poll(). We just call *DH_generate_key* for DH key. >From the following call stacks, you can see the RAND_poll() is triggered by ssleay_rand_bytes. libeay32d.dll!*RAND_poll*() Line 572 C

Re: [openssl-users] DH_generate_key Hangs

2017-10-05 Thread Jason Qian via openssl-users
5, 2017 at 3:33 PM, Jeffrey Walton <noloa...@gmail.com> wrote: > >> On Thu, Oct 5, 2017 at 2:55 PM, Jason Qian via openssl-users >> <openssl-users@openssl.org> wrote: >> > Thanks Michael, >> > >> > I saw a lot of discussion for this iss

Re: [openssl-users] DH_generate_key Hangs

2017-10-05 Thread Jason Qian via openssl-users
rey Walton <noloa...@gmail.com> wrote: > On Thu, Oct 5, 2017 at 2:55 PM, Jason Qian via openssl-users > <openssl-users@openssl.org> wrote: > > Thanks Michael, > > > > I saw a lot of discussion for this issue on, > > > >https://mta.openssl

Re: [openssl-users] DH_generate_key Hangs

2017-10-05 Thread Jason Qian via openssl-users
Compared code of RAND_poll(void) between 1.0.1 and 1.0.2 and it seems no change Thanks On Thu, Oct 5, 2017 at 2:59 PM, Salz, Rich wrote: > You could try to backport the win_rand file from a more recent release. > > > > Far better, as Michael first said, to move to 1.0.2 or

Re: [openssl-users] DH_generate_key Hangs

2017-10-05 Thread Jason Qian via openssl-users
; > > > > On Wed, Sep 27, 2017 at 2:02 PM, Michael Wojcik < > michael.woj...@microfocus.com> wrote: > > > From: openssl-users [mailto:openssl-users-boun...@openssl.org] On > Behalf Of Jason Qian via openssl-users > > Sent: Wednesday, September 27, 2017 07:00

Re: [openssl-users] DH_generate_key Hangs

2017-10-05 Thread Jason Qian via openssl-users
On Wed, Sep 27, 2017 at 2:02 PM, Michael Wojcik < michael.woj...@microfocus.com> wrote: > > From: openssl-users [mailto:openssl-users-boun...@openssl.org] On > Behalf Of Jason Qian via openssl-users > > Sent: Wednesday, September 27, 2017 07:00 > > To: openssl-users@openss

[openssl-users] DH_generate_key Hangs

2017-09-27 Thread Jason Qian via openssl-users
Hi, Need some help, one of our application that hangs when calling DH_generate_key (openssl-0.9.8y). This occurs randomly under loaded condition. Not sure, if anyone know this issue ? Thanks Jason -- openssl-users mailing list To unsubscribe:

Re: [openssl-users] Core dump on DSA_free -- libssl.so.1.0.0

2017-08-11 Thread Jason Qian via openssl-users
Thanks for look into this, void * pKey = LockResource(hHandle); The code works most of the time, only occasionally generates exception and Not sure why on DSA_free(pDSA); On Fri, Aug 11, 2017 at 2:57 PM, Salz, Rich wrote: > > DSA *pDSA = d2i_DSA_PUBKEY(NULL, (const

[openssl-users] Core dump on DSA_free -- libssl.so.1.0.0

2017-08-11 Thread Jason Qian via openssl-users
Thanks for the help, DSA *pDSA = d2i_DSA_PUBKEY(NULL, (const unsigned char **) , dwKeySize); bool bRet = false; if (pDSA) { bRet = DSA_verify(0, signature, 20, (BYTE *) pFile, dwSize, (DSA *) pDSA) == 1 ? true : false; DSA_free(pDSA); } Jason -- openssl-users mailing list To unsubscribe: