diff --git a/src/MpcVariable.cpp b/src/MpcVariable.cpp index 5356b8f..c4125ab 100644 --- a/src/MpcVariable.cpp +++ b/src/MpcVariable.cpp @@ -529,22 +529,22 @@ void getAllRandomness( //Generate randomness: We use 365*32 bit of randomness per key. //Since AES block size is 128 bit, we need to run 365*32/128 = 91.25 iterations. Let's just round up. - EVP_CIPHER_CTX ctx; - setupAES(&ctx, key); + EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new(); + setupAES(ctx, key); unsigned char *plaintext = (unsigned char *)"0000000000000000"; int out_len; uint32_t buf[4]; for(int j=0; j