• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# MD Overview and Algorithm Specifications
2
3<!--Kit: Crypto Architecture Kit-->
4<!--Subsystem: Security-->
5<!--Owner: @zxz--3-->
6<!--Designer: @lanming-->
7<!--Tester: @PAFT-->
8<!--Adviser: @zengyawen-->
9
10The message digest (MD) algorithm allows a fixed-length digest to be generated from data of arbitrary size by using the hash algorithm. The MD algorithm is also referred to as a hash algorithm or a one-way hash algorithm.
11
12When the same digest algorithm is used, the generated digest (hash value) has the following features:
13
14- The same message always results in the same hash value.
15
16- The digest generated is of the fixed length no matter the length of messages. (The digest length is determined by the algorithm used). For example, SHA-256 generates a digest of 256 bits (32 bytes).
17
18## Supported Algorithms and Specifications
19
20The **Supported Type** column in the following table lists the algorithm to be used when an **MD** instance is created.
21
22| MD Algorithm| Supported Type| Length (Bytes)|  API Version|
23| -------- | -------- | -------- | -------- |
24| HASH | SHA1 | 20 | 9+ |
25| HASH | SHA224 | 28 | 9+ |
26| HASH | SHA256 | 32 | 9+ |
27| HASH | SHA384 | 48 | 9+ |
28| HASH | SHA512 | 64 | 9+ |
29| HASH | MD5 | 16 | 9+ |
30| HASH | SM3 | 32 | 10+ |
31