Import asymmetric keys or key versions, get the public wrapping key, wrap the RSA key material and then import it as a new master encryption key, or as a new key version for an existing master encryption key.
Learn how to wrap key material using RSA_OAEP_AES_SHA256 with a supported OpenSSL patch for the CLI.
The OpenSSL -id-aes256-wrap-pad cipher compatible with RSA_AES_KEY_WRAP isn't enabled by default in the OCI CLI. Patch OpenSSL to allow the envelope wrapping that's needed for the CKM_RSA_AES_KEY_WRAP mechanism.
Note
For the "Bring your own key(BYOK)" scenario, you must patch the OpenSSL for RSA_OAEP_AES_SHA256 wrapping.
Perform the following steps to download, compile, and run a new local copy of OpenSSL v1.1.1d using the CLI, without altering the
default installation of OpenSSL in the system:
Create directories to store the latest OpenSSL binaries in
/root/build.
mkdir $HOME/build
mkdir -p $HOME/local/ssl
cd $HOME/build
Run the following command and note the OpenSSL version:
Compiling might take several minutes for each command.
cd $HOME/build/openssl-1.1.1d/
./config --prefix=$HOME/local --openssldir=$HOME/local/ssl
make -j$(grep -c ^processor /proc/cpuinfo)
make install
You have successfully installed the latest version of OpenSSL. This
version is dynamically linked to libraries in the
$HOME/local/ssl/lib/ directory, and cannot be run
directly. Set the environment variable LD_LIBRARY_PATH to
ensure that the associated libraries are available to OpenSSL.
Create a script named openssl.sh that loads the
$HOME/local/ssl/lib/ path before running the binary.
This makes it easier to run OpenSSL multiple times.