1# Signing and Signature Verification Overview and Algorithm Specifications 2 3 4To ensure data integrity and non-repudiation, you can use the generated or imported key to perform signing and signature verification. 5 6 7## Supported Algorithms 8 9The following table lists the supported specifications for signing and signature verification. 10<!--Del--> 11The key management service specifications include mandatory specifications and optional specifications. Mandatory specifications are algorithm specifications that must be supported. Optional specifications can be used based on actual situation. Before using the optional specifications, refer to the documents provided by the vendor to ensure that the specifications are supported. 12 13**You are advised to use mandatory specifications in your development for compatibility purposes.** 14<!--DelEnd--> 15**Specifications for Standard-System Devices** 16| Algorithm/MD Algorithm/Padding Mode| Description| API Version| <!--DelCol4-->Mandatory| 17| -------- | -------- | -------- | -------- | 18| <!--DelRow-->RSA/MD5/PKCS1_V1_5<br>RSA/SHA1/PKCS1_V1_5<br>RSA/SHA224/PKCS1_V1_5<br>RSA/SHA224/PSS | In PSS mode, the salt length can be set to the digest length or maximum length (Maximum length = Key length - Digest length - 2). For details, see [HuksRsaPssSaltLenType](../../reference/apis-universal-keystore-kit/js-apis-huks.md#huksrsapsssaltlentype10).| 8+ | No| 19| RSA/SHA256/PKCS1_V1_5<br>RSA/SHA384/PKCS1_V1_5<br>RSA/SHA512/PKCS1_V1_5<br>RSA/SHA256/PSS<br>RSA/SHA384/PSS<br>RSA/SHA512/PSS | In PSS mode, the salt length can be set to the digest length or maximum length (Maximum length = Key length - Digest length - 2). For details, see [HuksRsaPssSaltLenType](../../reference/apis-universal-keystore-kit/js-apis-huks.md#huksrsapsssaltlentype10).| 8+ | Yes| 20| RSA/NoDigest/PKCS1_V1_5 | **TAG HuksKeyDigest.HUKS_DIGEST_NONE** must be specified with **NoDigest**. The service side hashes the plaintext and passes in the hashed data. The length of the hashed data must meet the MD algorithm specifications supported by RSA signing and signature verification.| 9+ | Yes| 21| <!--DelRow-->DSA/SHA1<br>DSA/SHA224<br>DSA/SHA256<br>DSA/SHA384<br>DSA/SHA512 | - | 8+ | No| 22| <!--DelRow-->DSA/NoDigest | **TAG HuksKeyDigest.HUKS_DIGEST_NONE** must be specified with **NoDigest**.| 9+ | No| 23| <!--DelRow-->ECC/SHA1<br>ECC/SHA224 | - | 8+ | No| 24| ECC/SHA256<br>ECC/SHA384<br>ECC/SHA512 | The ECC algorithm supports elliptic curve functions P-256, P-384, and P-521.| 8+ | Yes| 25| <!--DelRow-->ECC/NoDigest | **TAG HuksKeyDigest.HUKS_DIGEST_NONE** must be specified with **NoDigest**.| 9+ | No| 26| ED25519/NoDigest | **TAG HuksKeyDigest.HUKS_DIGEST_NONE** must be specified with **NoDigest**.| 8+ | Yes| 27| SM2/SM3 | - | 9+ | Yes| 28 29**Specifications for Mini-System Devices** 30 31<!--Del--> 32Before implementing the specifications for mini-system devices, determine whether your device supports the related specifications. 33<!--DelEnd--> 34 35| Algorithm/MD Algorithm/Padding Mode| Description| API Version| 36| -------- | -------- | -------- | 37| RSA/SHA256/PKCS1_V1_5 | - | 12+ | 38| RSA/SHA256/PSS | - | 12+ | 39| RSA/SHA1/ISO_IEC_9796_2 | Minimum data length = Key length - 21 bytes| 12+ | 40