72 questions
0 votes
0 answers
30 views
How do fread and malloc affect RAM utilization in encryption process?
I am working on an application (Linux based) that uses AES-256 encryption and observed a significant increase in RAM usage during encryption. Initially, the process consumes about 3 MB of RAM (checked ...
0 votes
1 answer
210 views
API BIOvs EPI EVP: What are the differences in functionality between OpenSSL BIO and OpenSSL EVP?
I have read the manual of the two APIs: OpenSSL BIO and EVP, but I have questions that I cannot answer. I have searched the net without finding any documents about them. We can say that the BIO API ...
0 votes
1 answer
107 views
Can OPENSSL BIO be used within a C program that uses OPENSSL EVP to encrypt/decrypt a file?
Reading the openssl documentation I realized that you can use the openssl EVP API, to replicate what you can do with the commands: $ openssl aes-256-cbc -in text.txt -out text_out.txt -e -kfile ...
0 votes
1 answer
735 views
How can I encrypte( aes-256-cbc) a file , in code (c++) and decrypt using openssl command line?
I have a small c++ code to encrypt a file using EVP_Cipher_ APIs.I have a requirement to decrypte the encrypted file using Openssl (command line). When tried to decrypt, it always ends up in Bad ...
1 vote
0 answers
186 views
is evp encrypt sequential or stateful?
I am trying to use the evp encryption and decryption libraries for encryption/ decryption of message data over tcp sockets. I first create the cipher context using EVP_CIPHER_CTX_new(), then init it ...
-2 votes
1 answer
273 views
Trying to decrypt data using tpm private key with openssl API's But ossl_ctx is not compatible with EVP_KEY_decrypt_init(ctx)
OSSL_STORE_CTX *ctx = OSSL_STORE_open(tpm_key_path, nullptr, nullptr, nullptr, nullptr); OSSL_STORE_INFO *info; while (!OSSL_STORE_eof(ctx)) { if ((info = OSSL_STORE_load(ctx)) == nullptr) { printf(&...
1 vote
0 answers
703 views
Disabling padding in OpenSSL version 3
im trying to write a program that disable padding when it encrypts a message in C language. I figured out, by reading the documentation, that the correct function to use is EVP_CIPHER_CTX_set_padding()...
0 votes
1 answer
552 views
Decryption failure using openssl EVP_CipherFinal_ex
I am trying to encrypt and decrypt a buffer using openssl. I took some example code from here (see the 2nd do_crypt function towards the end of the page) and modified it to take the message to encrypt/...
0 votes
1 answer
488 views
awscrt python module throwing 'undefined symbol: EVP_aead_aes_128_gcm_tls13' error in ARM yocto
I have a custom ARM gateway on which I am trying to run a greengrass v2 component. This requires python awsiotsdk. But when I import the awsiotsdk I am getting this error: ImportError: /usr/lib/...
1 vote
3 answers
2k views
OpenSSL EVP AES Encryption and Base64 Encoding producing unusable results
So I'm trying to reproduce an encryption and encoding operation in C, that I've managed to make work in C#, JScript, Python and Java. Now, it's mostly just for obfuscating data - not actual encryption ...
0 votes
0 answers
1k views
EVP_DecryptUpdate() returns 0
For some reason, I am getting 0 from EVP_DecryptUpdate() function when I am passing 32 as its last parameter but when I changed it to 64 it returns 1. The buffer size is 32. According to the ...
1 vote
1 answer
2k views
Openssl C API "EVP_BytesToKey()" returns wrong key and iv when used
Using the OpenSSL C API , I want to decrypt a file using a password, in order to do that I need to manually derive the key and iv from the given password using EVP_BytesToKey() , but the function ...
1 vote
0 answers
598 views
Encrypt with AES-128-CBC and Open SSL EVP (Language C)
I'm doing the following procedure to encrypt: EVP_CIPHER_CTX * ctx; if (! (ctx = EVP_CIPHER_CTX_new ())) handleErrors (); if (1! = EVP_EncryptInit_ex (ctx, EVP_aes_128_cbc (), NULL, key, ...
0 votes
0 answers
396 views
OpenSSL encryption/decryption command line in C++
can you tell me what the C++ equivalent is for the command line OpenSSL commands for encrypting a file: openssl enc -nosalt -aes-256-cbc -kfile c:\temp\key -in c:\temp\binary.png -out c:\temp\binary....
0 votes
1 answer
142 views
Is there any way to set members of opaque structs in openssl v1.1.0 or greater?
I am restructuring a legacy code to be compatiable with OpenSSL 1.1.1, During the upgrade of OpenSSL from 1.0.2 -> 1.1.1, serveral structs were made opaque and direct member access is no longer ...