GB/T 32905-2016 · Chinese national standard · 256-bit

SM3 hash generator

SM3 is the Chinese national cryptographic hash standard (GB/T 32905-2016), published by the Chinese State Cryptography Administration. 256-bit output, used in Chinese cryptographic protocols including SM2 digital signatures and TLS 1.3 with GM ciphersuites.

SM3 is structurally similar to SHA-256 (Merkle-Damgård construction) with different constants and a more complex message expansion (132 words vs SHA-256's 64 words). It operates on 512-bit blocks with 64 rounds using 32-bit words. Key characteristics: • Digest size: 256 bits (32 bytes, 64 hex characters) • Block size: 512 bits (64 bytes) • Rounds: 64 • Construction: Merkle-Damgård • Standard: GB/T 32905-2016 (China) • ISO/IEC: ISO/IEC 10118-3:2018 SM3 is used in: • SM2 digital signature algorithm (ECDSA-like) • TLS 1.3 with GM cipher suites • China's Trusted Cryptography Module (TCM) In-browser SM3 is not available via Web Crypto API. Use gmssl (C library), gmssl-pyx (Python), or sm-crypto (npm) for JavaScript SM3.

How to use this tool

  1. Start with the About SM3 panel — it lists the core specs: 256-bit digest, 512-bit block size, 64 rounds, and Merkle-Damgård construction.
  2. Note the output size: a 256-bit digest is 32 bytes, written as 64 hex characters.
  3. Check the standards — GB/T 32905-2016 (China) and ISO/IEC 10118-3:2018 — to confirm what your target environment requires.
  4. Review the "used in" list to see where SM3 appears in practice: SM2 digital signatures, TLS 1.3 with GM cipher suites, and China's Trusted Cryptography Module (TCM).
  5. Since SM3 is not in the Web Crypto API, pick a library from the list — gmssl (C), gmssl-pyx (Python), or sm-crypto (npm) — to compute hashes in your own code.
  6. Read the footer to see how SM3 fits alongside SM2, SM4, and SM9 in China's cryptographic standards suite.

Why this tool is helpful

Pin down the exact output

A 256-bit digest means 32 bytes, rendered as 64 hex characters. Confirm the size before you integrate or compare test vectors.

Choose the right library

The Web Crypto API doesn't implement SM3, so the page points to gmssl, gmssl-pyx, and sm-crypto for real hashing.

Meet Chinese compliance

SM3 is the national standard (GB/T 32905-2016) and is required in SM2 signatures, GM TLS ciphersuites, and TCM — essential for China-market products.

Tell SM3 apart from lookalikes

Structurally similar to SHA-256 but with different constants and a 132-word message expansion; distinct from GOST Streebog (R 34.11-94), another 256-bit national hash.

Reference the standards fast

Standard numbers, block/round counts, and the construction are all in one place — handy for design docs and security reviews.

Plan for interoperability

Knowing the block size and construction helps you verify third-party SM3 implementations against known test vectors.

FAQ

What exactly is SM3?

SM3 is the Chinese national cryptographic hash standard, defined in GB/T 32905-2016 and published by the State Cryptography Administration. It produces a 256-bit (32-byte) digest.

How does SM3 relate to SHA-256?

Both use a Merkle-Damgård construction over 512-bit blocks, but SM3 uses different constants and a larger 132-word message expansion (SHA-256 uses 64). They are not interchangeable.

How big is the output?

256 bits — 32 bytes, conventionally written as 64 hex characters.

Can I hash with SM3 in the browser?

Not through the Web Crypto API, which doesn't include SM3. Use a library such as gmssl (C), gmssl-pyx (Python), or sm-crypto (npm).

Is SM3 the same as GOST Streebog?

No. Streebog (GOST R 34.11-94) is a Russian national standard that also produces a 256-bit digest, but it's a different algorithm.

Where is SM3 actually used?

In SM2 digital signatures, TLS 1.3 with GM cipher suites, and China's Trusted Cryptography Module (TCM), among other Chinese cryptographic protocols.

Does this page process or upload any data?

No. This is a static reference page — it only renders text and sends nothing to any server. Actual hashing happens in your own code via a library.