1e41f4b71Sopenharmony_ci# Key Derivation Overview and Algorithm Specifications
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ciTo stretch keys into longer keys or to obtain keys in the required format, you can use the HUKS APIs to derive one or more secrete keys from a key (base key) by using a pseudorandom function.
5e41f4b71Sopenharmony_ci> **NOTE**<br>
6e41f4b71Sopenharmony_ci> The mini-system devices do not support key derivation.
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ci## Supported Algorithms
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ciThe following table lists the supported key derivation specifications.
11e41f4b71Sopenharmony_ci<!--Del-->
12e41f4b71Sopenharmony_ciThe 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.
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ci**You are advised to use mandatory specifications in your development for compatibility purposes.**
15e41f4b71Sopenharmony_ci<!--DelEnd-->
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ciA derived key is the key session result obtained using the Init-Update-Finish mechanism. It can be managed by HUKS (the key is always in a TEE) or independently managed by the service based on service requirements.
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci| Algorithm/MD| Algorithm/Length of the Base Key| Available Algorithm/Length of the Derived Key| API Version| <!--DelCol5-->Mandatory|
20e41f4b71Sopenharmony_ci| -------- | -------- | -------- | -------- | -------- |
21e41f4b71Sopenharmony_ci| HKDF/SHA256 | AES/192-256 | AES/128/192/256<br>HMAC/8-1024<br>SM4/128 | 8+ | Yes|
22e41f4b71Sopenharmony_ci| HKDF/SHA384 | AES/256 | AES/128/192/256<br>HMAC/8-1024<br>SM4/128 | 8+ | Yes|
23e41f4b71Sopenharmony_ci| HKDF/SHA512 | AES/256 | AES/128/192/256<br>HMAC/8-1024<br>SM4/128 | 8+ | Yes|
24e41f4b71Sopenharmony_ci| PBKDF2/SHA256 | AES/192-256 | AES/128/192/256<br>HMAC/8-1024<br>SM4/128 | 8+ | Yes|
25e41f4b71Sopenharmony_ci| PBKDF2/SHA384 | AES/256 | AES/128/192/256<br>HMAC/8-1024<br>SM4/128 | 8+ | Yes|
26e41f4b71Sopenharmony_ci| PBKDF2/SHA512 | AES/256 | AES/128/192/256<br>HMAC/8-1024<br>SM4/128 | 8+ | Yes|
27e41f4b71Sopenharmony_ci<!--RP1--><!--RP1End-->
28