Relative Content

Tag Archive for copenssl

OpenSSL server is not picking the right cipher

I’ve written an https server in C++ using cpp-httplib (https://github.com/yhirose/cpp-httplib). My requirement is that it needs to work with pre-shared key and cipher DHE-PSK-AES256-CBC-SHA or DHE-PSK-AES256-CBC-SHA384.
I understand those are TLSv1 ciphers that are considered weak, therefore they are somewhat disabled by default.
Here is the relevant part of my code:

signature generated using openssl C++ API does not match with same code in python

I have a python code which generates signature based on hash string as data. It uses cryptography library to calculate singature based on hash. It uses private key file .pem which contains private key and public key as well. It uses serialization.load_pem_private_key() API to get the private key by reading .pem file. Then using this private key it generates signature using following method of cryptography in python.

How to use OpenSSL BIOs? Combine BIO_s_socket and BIO_f_ssl

I’m writing a simple application to connect to a server, using OpenSSL. The initial idea was to write a custom BIO method to get information on the hardware socket timestamp via linux’s SO_TIMESTAMPING, but in the meantime I realized that I’m missing something in how to build a proper BIO, so I restarted my understanding process from the scratch.

Openssl losing last block of plain text when decrypting with AES-ECB

I am trying to write a set of basic encrypt and decrypt functions in C using OpenSSL and I am losing the last block of my plain text when decrypting. I think it’s probably a padding issue but I am not sure how to diagnose it since I can’t seem to get any information out of the OpenSSL call as to why it’s returning an incorrect length.

OpenSSL EVP_DecryptFinal_ex failing

I am trying to implement ecb encryption/decryption using OpenSSL. At present all the setup process seems to return success codes however when it comes to the final decryption it fails.