--- title: "Unwrapping Security Objects" slug: "dsm-unwrapping-security-objects" updated: 2026-08-29T08:15:14Z published: 2026-08-29T08:15:14Z canonical: "support.fortanix.com/dsm-unwrapping-security-objects" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.fortanix.com/llms.txt > Use this file to discover all available pages before exploring further. # Unwrapping Security Objects ## 1.0 Overview The Fortanix-Data-Security-Manager (DSM) can import security objects (keys) by unwrapping them. ## 2.0 Prerequisites Unwrapping security objects requires a Fortanix DSM account, a group, and a user or application configured in that group. *For more information, refer to* [*Getting Started with Fortanix DSM - UI*](/v1/docs/getting-started-with-fortanix-data-security-manager-ui)*.* The key is used to unwrap must have the UnwrapKey operation enabled. ## 3.0 Authorization and Configuration You must first authenticate and optionally configure a default API client as described in [*Configure API Client and Client Authentication*](/v1/docs/dsm-configure-api-client-and-client-authentication). You may authenticate as a user or as an app. Both users and applications may unwrap security objects, but only apps can perform cryptographic operations using those security objects. ## 4.0 Create a WrappingAndUnwrappingApi Client Object Unwrapping keys is performed with a WrappingAndUnwrappingApi object. ```bash import com.fortanix.sdkms.v1.api.WrappingAndUnwrappingApi(); WrappingAndUnwrapping wrappingApi = new WrappingAndUnwrappingApi(); ``` ## 5.0 Construct an UnwrapKeyRequest Object The UnwrapKeyRequest object provides the properties for the Security-object that is being imported, the wrapped security object contents, and information necessary to unwrap the security object. The wrapped key is passed as the wrappedKey property of the UnwrapKeyRequest object. This property must be an array of bytes. The objType, name, description, enabled, keyOps and customMetadata properties of the UnwrapKeyRequest object define the properties of the key that is being unwrapped. *For more information about these fields, refer to* [*Generating Security Objects*](/v1/docs/dsm-generating-security-objects)*.* The alg, mode, iv, and tag properties of the UnwrapKeyReuqest object define how the wrapped key will be decrypted. These properties must match what was returned when the key was wrapped. *For more information about these fields, refer to* [*Public Key Cryptography*](/v1/docs/dsm-public-key-cryptography) *and and* [*Symmetric Cryptography*](/v1/docs/dsm-symmetric-cryptography)*.* For example, to unwrap an AES key that wrapped with an RSA key: ```bash import com.fortanix.sdkms.v1.model.ObjectType; import com.fortanix.sdkms.v1.model.UnwrapKeyRequest; UnwrapKeyRequest unwrapRequest = new UnwrapKeyRequest()        // These are properties of the key we are unwrapping:        .objType(ObjectType.AES)        .name("new AES key") // These are details about how the key was wrapped: .alg(ObjectType.RSA); ``` ## 6.0 Make the Unwrap Call Unwrapping is performed with the unwrapKey() method of WrappingAndUnwrappingApi. This call returns a KeyObject with the properties of the unwrapped key. ```bash import com.fortanix.sdkms.v1.model.UnwrapKeyResponse; KeyObject unwrappedKey = wrappingApi.unwrapKey(, unwrapRequest); ``` Fortanix Data Security Manager (DSM) is the world’s first cloud service secured with Intel® SGX. With Fortanix DSM, you can securely generate, store, and use cryptographic keys and certificates, as well as other secrets such as passwords, API keys, tokens, or any blob of data. Your business-critical applications and containers can integrate with Fortanix DSM using legacy cryptographic interfaces (PKCS#11, CNG, and JCE) or using the native Fortanix DSM RESTful interface. Fortanix Data Security Manager (DSM) is the world’s first cloud service secured with Intel® SGX. With Fortanix DSM, you can securely generate, store, and use cryptographic keys and certificates, as well as other secrets such as passwords, API keys, tokens, or any blob of data. Your business-critical applications and containers can integrate with Fortanix DSM using legacy cryptographic interfaces (PKCS#11, CNG, and JCE) or using the native Fortanix DSM RESTful interface. A security object is any datum stored in DSM (for example a key, a certificate, a password, or other security objects). Each security object is assigned to exactly one group. users and applications assigned to the group have permission to see the security object and to perform operations on it. ## Related - [Wrapping Security Objects](/dsm-wrapping-security-objects.md) - [Updating Security Objects](/dsm-updating-security-objects.md)