Hash Lab

Cryptographic

SM3

A 256-bit cryptographic hash function published by China’s State Cryptography Administration (SCA), standardized as GM/T 0004-2012 and ISO/IEC 10118-3. SM3 sits structurally between SHA-256 and the Merkle-Damgård family it descends from; mandatory in many Chinese commercial crypto deployments.

At a glance

Output256 bits (32 bytes, 64 hex chars)
Block size512 bits
ConstructionMerkle-Damgård, Davies-Meyer-like compression
Rounds64
StandardGM/T 0004-2012; ISO/IEC 10118-3:2018
Collision security2128 generic
Preimage security2256
Length extensionYes
StatusNo practical break known; mandated in Chinese commercial systems

Where it is used

Internal structure

SM3 looks like a tightened SHA-256: 64 rounds operating on eight 32-bit words, with a message schedule that mixes 16 input words into 68 expanded words. The round function uses two boolean expressions (alternating across the round count) and two custom rotation patterns. The result is conservatively over-mixed compared to SHA-256, which is why no practical attack better than a few reduced-round results exists.

Security status

The best published cryptanalysis is on heavily reduced-round variants (up to about 35 of 64 rounds for collisions, 30 of 64 for preimages). Full SM3 has no known break and is widely deployed in Chinese systems under serious scrutiny.

Try it

SM3 is in the comparator catalog; the algorithm catalog links it from the cryptographic family list.

References

Visualize

SM3 on your input

11 bytes · 0-bit digest

Hex digest

Bit grid (0 bits, teal = 1, slate = 0)

Byte pixel art (0 bytes, hue = byte value mod 360°)

Avalanche , flipping the lowest bit of the first input byte changed 0 of 0 output bits

Test Your Knowledge

Quick MCQ check on this algorithm

Start Quiz →

AI Summary

Summarize this page in your favorite LLM