GainPrivateKey

<p class="shortdesc"></p> <section class="section" id="GainPrivateKey__section_zcf_mfj_mlb"><h2 class="doc-tairway">GainPrivateKey </h2> <p class="p"><strong class="ph b">Description</strong></p> <p class="p">Querying a managed asymmetric private key. The returned value is the ciphertext of the private key encrypted using AES_128 symmetric encryption. You need to decrypt the ciphertext key before using it. </p> <p class="p"><strong class="ph b">Request Parameters</strong></p> <table class="table" id="GainPrivateKey__table_ohv_mfj_mlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="GainPrivateKey__table_ohv_mfj_mlb__entry__1"> <p class="p">Name </p> </th> <th class="entry" id="GainPrivateKey__table_ohv_mfj_mlb__entry__2"> <p class="p">Type </p> </th> <th class="entry" id="GainPrivateKey__table_ohv_mfj_mlb__entry__3"> <p class="p">Necessary or Not </p> </th> <th class="entry" id="GainPrivateKey__table_ohv_mfj_mlb__entry__4"> <p class="p">Description </p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__1 "> <p class="p">requestTime </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__3 "> <p class="p">Yes </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__4 "> <p class="p">Request time in the format of yyyyMMddhhmmssSSS. </p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__1 "> <p class="p">appId </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__3 "> <p class="p">Yes </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__4 "> <p class="p">Unique identifier of the asymmetric private key, which is automatically assigned by KMS when the private key was created. </p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__1 "> <p class="p">asyKeyType </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__3 "> <p class="p">Yes </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__4 "> <p class="p">Key type of the asymmetric key. </p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__1 "> <p class="p">encryptVersion </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__3 "> <p class="p">No </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__4 "> <p class="p">Encryption version (encryption method used for the obtained password). </p> <p class="p">Optional field. You can use this parameter to distinguish between cryptographic modes. KMS is compatible with ECB mode and CBC mode AES encryption. </p> <p class="p">If you pass the parameter encryptVersion = “2.0”, it indicates CBC mode AES encryption. </p> <p class="p">If you do not pass a parameter, it is ECB mode AES encryption by default. </p> <p class="p">KMS supports only AES and ECB encryptions. Otherwise, you will receive an error report. </p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__1 "> <p class="p">sign </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__3 "> <p class="p">Yes </p> </td> <td class="entry" headers="GainPrivateKey__table_ohv_mfj_mlb__entry__4 "> <p class="p">Signature value. For more information, see Signature Algorithm (hexadecimal string). </p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">Return Parameters</strong></p> <table class="table" id="GainPrivateKey__table_phv_mfj_mlb"><caption></caption><colgroup><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="GainPrivateKey__table_phv_mfj_mlb__entry__1"> <p class="p">Name </p> </th> <th class="entry" id="GainPrivateKey__table_phv_mfj_mlb__entry__2"> <p class="p">Type </p> </th> <th class="entry" id="GainPrivateKey__table_phv_mfj_mlb__entry__3"> <p class="p">Description </p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__1 "> <p class="p">Code </p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__3 "> <p class="p">Return code. “SUCCESS” will be returned if the request is succeeded. </p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__1 "> <p class="p">AppId </p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__3 "> <p class="p">Signature value of the data after signing with the private key. </p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__1 "> <p class="p">EncryptedPrivateKey </p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__3 "> <p class="p">Ciphertext of the private key. </p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__1 "> <p class="p">ResponseTime </p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__3 "> <p class="p">Request time in the format of yyyyMMddhhmmssSSS. </p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__1 "> <p class="p">Sign </p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__3 "> <p class="p">For more information, see Signature Algorithm. </p> </td> </tr> <tr class="row"> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__1 "> <p class="p">RequestId </p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="GainPrivateKey__table_phv_mfj_mlb__entry__3 "> <p class="p">ID of the current request. </p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">Request Example</strong></p> <pre class="pre codeblock"><code>http:// kms-cn-shanghai.yun.pingan.com/?action= GainPrivateKey &appId =<app id > &sign=<sign> &requestTime=<requestTime> & encryptVersion=< encryptVersion > & asyKeyType =<type> &<公共请求参数> </code></pre> <p class="p"><strong class="ph b">Return Example</strong></p> <pre class="pre codeblock"><code>{ "Code":"SUCCESS", "AppId":"app_id", "EncryptedPrivateKey":"privateKey", "ResponseTime":"time", "Sign":"signatureValue" "RequestId":"f244ca16-c944-484f-9728-bb3e9c31643a", } </code></pre> </section>
Did the above content solve your problem? Yes No
Please complete information!

Call us

400-151-8800

Email us

cloud@pingan.com

Online customer service

Instant reply

Technical Support

cloud products