How to encode a CMS or S/MIME PEM file with OpenSSL not encrypted or digitally signed?

We developed an application that reads a CMS encoded PEM file with this command:

$ openssl cms -verify -in filepath -inform PEM -noverify

The file is digitally signed, but we don’t care about it, as we only want to extract … Continue reading How to encode a CMS or S/MIME PEM file with OpenSSL not encrypted or digitally signed?

Can a DH param .pem file force the usage of only a single type of diffie-hellman exchange

Is it possible to create a diffie-hellman param .pem file to force the openssl ctx to use only a certain type of dh exchange. For example, I know that it can be used to set the length of the dh key, but what about the type?

Continue reading Can a DH param .pem file force the usage of only a single type of diffie-hellman exchange

Loading a passphrase-protected private SSH key from a file with the cryptography Python module

I am trying to load a passphrase-protected private SSH key from a file using the cryptography Python module. However, I’m not exactly sure how to proceed. The following yields a Crypto.Util.Padding.PaddingError: Padding is incorrect. error… Continue reading Loading a passphrase-protected private SSH key from a file with the cryptography Python module