We can generate our key material using OpenSSL as follows:
- Go to the OpenSSL website and download the latest version of OpenSSL. I've downloaded openssl-1.0.2t.tar.gz. The current link to the website is www.openssl.org.
- Uncompress the downloaded OpenSSL file into a folder.
- Uncompress the ImportParameters.zip file and copy the wrapping key into the OpenSSL directory.
- Go to the OpenSSL folder and run the following command:
openssl rand -out PlaintextKeyMaterial.bin 32
This will generate a file called PlaintextKeyMaterial.bin.
- Execute the following command from the same folder while providing the name of our wrapping key for the inkey parameter:
openssl rsautl -encrypt \ -in PlaintextKeyMaterial.bin ...