Session_RSA_Verify
This API verifies the signature of message text using RSA public key.
URL
./Session_RSA_Verify
Input Parameters
Parameters | Description |
---|---|
keyname | Name of RSA key pair containing private key. |
messagetext | Message to sign. |
transformation | Transformations to be used. Possible options are: — RSA — SHA1withRSA — SHA256withRSA — SHA384withRSA — SHA512withRSA — SHA1withRSAPSSPadding — SHA256withRSAPSSPadding — SHA384withRSAPSSPadding — SHA512withRSAPSSPadding. For complete list of supported transformations, refer to the Supported Algorithm section of the CADP for Java User Guide. |
saltlength | Length of salt to be used for sign operation. This is an optional parameter. |
format | Format to be used. This is an optional parameter. Supported signing CMS formats are: — cms/detached/der/enveloped — cms/detached/der — cms/detached/smime/enveloped — cms/detached/smime |
messageformat | Message format ot be used. This is an optional parameter. Supported message formats: — HEX —STR(default) |
Note
The saltlength parameter is supported with the following transformations:
— SHA1withRSAPSSPadding
— SHA256withRSAPSSPadding
— SHA384withRSAPSSPadding
— SHA512withRSAPSSPaddingThe saltlength and format parameters cannot be used simultaneously.
The messagetext must be in the same format as specified in the messageformat parameter.
CMS formats are not supported with the following transformations:
—SHA1withRSAPSSPadding
—SHA256withRSAPSSPadding
— SHA384withRSAPSSPadding
— SHA512withRSAPSSPadding
— RSA
—RSAPSSPaddingSHA1
— RSAPSSPaddingSHA256
— RSAPSSPaddingSHA384
—RSAPSSPaddingSHA512For KeySecure 8.12.5 onward, following transformations are added to sign the data based on pre-calculated hash: RSA, RSAPSSPaddingSHA1, RSAPSSPaddingSHA256, RSAPSSPaddingSHA384, and RSAPSSPaddingSHA512. These transformations support saltlength parameter.
Session_RSA_Verify Sample with saltlength
<prot:Session_RSA_Verify>
<keyname>certpkcs12</keyname>
<messagetext>eqwewewqeqqeqeqwe</messagetext>
<signature>3082087B06092A864886F70D010703A082086C30820868020100318201C0308201BC0201003081A330819B310B3009060355040613025553310B3009060355040813024341311530130603550407130C526564776F6F642043[… sample truncated for brevity … ] </signature>
<transformation>SHA1withRSAPSSPadding</transformation>
<!--Optional:-->
<saltlength>40</saltlength>
<!--Optional:-->
<messageformat>STR</messageformat>
</prot:Session_RSA_Verify>
Output
boolean – result of verification.
<ns2:Session_RSA_VerifyResponse xmlns:ns2="http://dsws.org/protectappws/">true</ns2:Session_RSA_VerifyResponse>
Session_RSA_Verify Sample with format
<prot:Session_RSA_Verify>
<keyname>certpkcs12</keyname>
<messagetext>eqwewewqeqqeqeqwe</messagetext>
<signature>3082087B06092A864886F70D010703A082086C30820868020100318201C0308201BC0201003081A330819B310B3009060355040613025553310B3009060355040813024341311530130603550407130C526564776F6F64204369747931143012060355040A130B536166656E657420496E6331143012060355040B130[… sample truncated for brevity … ]</signature>
<transformation>SHA1withRSA</transformation>
<!--Optional:-->
<format>cms/detached/der/enveloped</format>
<!--Optional:-->
<messageformat>STR</messageformat>
<!--Optional:-->
<caname>sample_ca</caname>
</prot:Session_RSA_Verify>
Output
boolean – result of verification.
<ns2:Session_RSA_VerifyResponse xmlns:ns2="http://dsws.org/protectappws/">true</ns2:Session_RSA_VerifyResponse>