--- title: "Public Key Signing and Verification" slug: "dsm-public-key-signing-and-verification" updated: 2026-08-29T08:19:42Z published: 2026-08-29T08:19:42Z canonical: "support.fortanix.com/dsm-public-key-signing-and-verification" --- > ## 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. # Public Key Signing and Verification ## 1.0 Overview The Fortanix-Data-Security-Managers (DSM) can create digital signatures and verify signatures using RSA or elliptic curve keypairs. ## 2.0 Prerequisites Performing public key cryptography requires a Fortanix DSM account, a group with an RSA or elliptic curve key, and an 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)*.* ## 3.0 Required Operations The RSA or elliptic curve key must have the Sign operation enabled for creating signatures and the Verify operation enabled for verifying signatures. In addition, the key must be enabled. ## 4.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). Signing and verification requires authenticating as an app with an API key or a client certificate. (User accounts may not create signatures or verify them.) ## 5.0 Create a SignAndVerifyApi Client Object Signatures and verification are performed using a SignAndVerifyApi object. ```bash import com.fortanix.sdkms.v1.api.SignAndVerifyApi(); SignAndVerifyApi signatureApi = new SignAndVerifyApi(); ``` ## 6.0 Creating a Signature Creating a signature requires a private key. (Verification can be performed with only a public key). ### 6.1 Create a Signature Request The signature request object encodes the request parameters. The required parameters are the hash data to be signed, and the hash algorithm used to create the hash. For example, to create a signature request using the SHA-256 hash algorithm: ```bash import com.fortanix.sdkms.v1.model.SignRequest; import com.fortanix.sdkms.v1.model.DigestAlgorithm; SignRequest signatureRequest = new SignRequest().hashAlg(DigestAlgorithm.SHA256).hash(); ``` Note that command-line programs like sha1sum and sha256sum typcially output digests in hexadecimal format. These will need to be converted into binary format before they are used. ### 6.2 Make the Signature Call The hash is signed with the sign() method of the SignAndVerifyApi object. sign() is called with the UUID of the key used to perform signature, and the signature request. The UUID of the key can be found in the key details page of the UI, or it can be retrieved by looking up keys with the API. The signature is returned as a byte arrray in the signature property of the SignResponse object returned by the sign() method. ```bash import com.fortanix.sdkms.v1.model.SignRequest; import com.fortanix.sdkms.v1.model.DigestAlgorithm; SignRequest signatureRequest = new SignRequest().hashAlg(DigestAlgorithm.SHA256).hash(); ``` ## 7.0 Verifying a Signature. You will need a public key in order to verify a signature. ### 7.1 Create a Verify Request The signature verification request object encodes the request parameters. The required parameters are the hash data that was signed, the hash algorithm used to produce that hash, and the signature. For example, to create a signature verification request using the SHA-256 hash algorithm: ```bash import com.fortanix.sdkms.v1.model.VerifyRequest; import com.fortanix.sdkms.v1.model.DigestAlgorithm; VerifyRequest verifyRequest = new VerifyRequest().hashAlg(DigestAlgorithm.SHA256).hash().signature(); ``` ### 7.2 Make the Verify Signature Call The signature is verified with the verify() method of the SignAndVerifyApi object. verify() is called with the UUID of the key used to perform verification and the verification request. The UUID of the key can be found in the key details page of the UI, or it can be retried by looking up keys with the API. The result property of the VerifyReponse object will be true if the signature was correctly verified, and false if the signature did not match. ```bash import com.fortanix.sdkms.v1.model.VerifyResponse; VerifyResponse verifyResponse = signatureApi.verify(, verifyRequest); boolean verified = verifyResponse.result; ``` 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. ## Related - [PKCS#11 Library](/fortanix-dsm-clients-pkcs11-library.md) - [Algorithm Support](/dsm-algorithm-support.md) - [Authentication - App and User](/fortanix-dsm-authentication-app-and-user.md)