SM3 explained in plain terms means understanding a hash function, a tool that turns any message, no matter how long, into a short fixed fingerprint that changes completely if even one letter of the message changes. The central question is why a fingerprint matters when it cannot hide anything, and the answer is that the fingerprint is how you prove a message is genuine without reading it.
SM3 is a cryptographic hash function published by the Chinese State Cryptography Administration in 2010 and standardised as GB/T 32905 in 2016. It turns any input into a 256-bit fingerprint, works in 64 rounds over 512-bit blocks, and it is the hash function behind SM2 signatures and much of China’s official cryptography.
This article explains what SM3 is, how it works, and where it already runs.
Key takeaways
- SM3 is a hash function that produces a 256-bit fingerprint.
- It works in 64 rounds over 512-bit blocks.
- It is the Chinese national standard GB/T 32905.
- It is the hash function behind SM2 digital signatures.
- It is now defined for use in TLS alongside SM2.
What SM3 is
SM3 is a function that takes a message of any length and returns a fixed 256-bit digest, a string of bits that acts as the message’s fingerprint. The same message always produces the same fingerprint, a different message produces a different one, and the fingerprint reveals nothing about the message itself, which is what makes it useful for checking integrity rather than for hiding data.
Its signature feature is the way it mixes the message. SM3 expands each 512-bit block into a much larger set of words, then runs those words through 64 rounds of mixing, using Boolean functions, rotations, and additions, and the result is a fingerprint that depends on every bit of the input in a way that is practically impossible to reverse.
The design was a reaction to China’s need for its own cryptography. In the late 2000s, China wanted a hash function for its government systems, banks, and businesses that it could trust, audit, and control, and the State Cryptography Administration published SM3 as the answer, alongside the SM2 signature system that depends on it.
It became the hash function behind China’s commercial cryptography rules. Systems that handle sensitive data in China are expected to use SM3 where a hash function is needed, which means that every bank, government agency, and large business operating there has SM3 in its toolkit, and that gave the function a vast installed base from the start.
Its most famous property is how far it has travelled. SM3 began as a Chinese national standard, but it is now defined for use in TLS, supported by OpenSSL, and published in international standards documents, which means a function that started behind national borders is now part of the global cryptographic conversation.
Our guide to SM4 explains China’s national block cipher, and our guide to SEED explains South Korea’s older national cipher.
How SM3 works
Everything starts with padding, because SM3 processes the message in fixed 512-bit blocks. The message is extended with a one bit, enough zeroes to fill the block, and a 64-bit count of the original length, which means every message, no matter how short or how long, becomes a whole number of blocks that the function can process in turn.
Each block is expanded before it is mixed. The 16 words of the block are stretched into 132 words through a message expansion that XORs and rotates earlier words, which means every word of the expanded message depends on several words of the original block, and a change in one input bit spreads through the whole expansion.
The compression function runs 64 rounds, and each round takes eight working words, mixes them with one expanded message word and a round constant, and produces eight new working words. The rounds use different Boolean functions in the first half and the second half, which keeps the mixing from settling into a pattern that an attacker could exploit.
The round constants change from round to round, and they are derived from simple repeating values rather than from random tables. The constants are part of the design, because they make each round behave slightly differently from the last, and the combination of changing constants and changing functions is what gives SM3 its strength.
After all 64 rounds, the eight working words are combined with the previous fingerprint to produce the new fingerprint. The chaining means the fingerprint of a long message depends on every block that came before it, so changing a single letter anywhere in the message changes the final fingerprint completely, which is the avalanche effect every good hash function must produce.
The security of the design rests on the size of the fingerprint and the depth of the mixing. A 256-bit output means finding two messages with the same fingerprint would take an impossible amount of searching, and the best published attacks work only against versions with far fewer rounds than the real function uses.

Comparing SM3 with other hash functions
SM3 is one of several hash functions, and each was built with a different emphasis. SHA-256 is the global standard designed through an open international process, SHA-3 is the newer standard built on a sponge construction rather than on blocks, and SM3 is China’s national answer to both, while each approach trades something for something else.
The table below sets out the main contrasts between the leading approaches.
| Aspect | SM3 | SHA-256 | SHA-3 |
|---|---|---|---|
| Output size | 256 bits | 256 bits | 256 bits |
| Rounds | 64 | 64 | 24 |
| Construction | Merkle-Damgard | Merkle-Damgard | Sponge |
| Standard | China GB/T 32905 | NIST FIPS 180 | NIST FIPS 202 |
| Best for | Chinese systems | General use | General use |
The practical result is that SM3 is the right choice for Chinese systems, SHA-256 suits general use everywhere else, and SHA-3 fits systems that want the newest design.
Where SM3 is used
Digital signatures use it to fingerprint messages before signing. SM2 signatures are made over the SM3 fingerprint of a message rather than over the message itself, which means the signature stays small even for large documents, and anyone can check the signature by recomputing the fingerprint and comparing it with the signed value.
Chinese government systems use it for official data. Government agencies in China that handle sensitive information use SM3 as part of their approved cryptography, and the national standard behind it gives their choice a clear basis in regulation and policy.
Chinese banking and finance use it for transactions. Banks and payment systems operating in China use SM3 where Chinese standards require it, which means the function protects a share of the world’s largest financial market, and every transaction that passes through those systems depends on it.
Internet standards use it for secure connections. SM3 is defined for use in TLS, the protocol that protects web traffic, which means a browser or a server that talks to Chinese systems can negotiate SM3 for its message fingerprints, and the connection is protected by a standard both sides understand.
Software libraries support it for completeness. OpenSSL includes SM3, and developers anywhere in the world can use it, which means a function that began as a national requirement is now available to anyone who needs to interoperate with Chinese systems.
Strengths and limits
The greatest strength of SM3 is that it is a complete national solution. Paired with SM2 signatures and SM4 encryption, it gives Chinese systems a full cryptographic suite from a single national source, and that completeness is worth more than any single clever feature when a whole country standardises on one set of tools.
It is also a strength that SM3 is supported globally. A function that runs in OpenSSL and is defined for TLS can be deployed anywhere, and that support means engineers outside China can use SM3 without building their own implementation, which lowers the barrier to interoperating with Chinese systems.
The limits are real, though, and the biggest is geography. Outside China and the businesses that work with it, almost nobody uses SM3, which means smaller communities of implementers, fewer independent reviews in recent years, and less tooling than global functions enjoy, and a system that must interoperate internationally will usually choose SHA-256 instead.
SM3 checklist
- Use SM3 where Chinese standards or regulations require it.
- Always hash the exact message you intend to sign or check.
- Never truncate the fingerprint unless the standard allows it.
- Remember SM3 fingerprints but does not encrypt on its own.
- Pair it with a signature scheme when authorship must be proven.
- Test against published test vectors before shipping any implementation.
- Keep the code that pads messages exactly as the standard describes.
- Plan for interoperability if your system must talk to the outside world.
- Compare with SHA-256 for systems that do not need Chinese compliance.
Frequently asked questions
What is SM3 in simple terms?
It is a hash function from China that turns any message into a fixed 256-bit fingerprint, which changes completely if even one letter of the message changes.
Why does China have its own hash function?
To have a hash function it could trust, audit, and control, rather than depending entirely on foreign designs, and to complete its national suite alongside SM2 and SM4.
How is SM3 different from SHA-256?
Both produce 256-bit fingerprints in 64 rounds, but SM3 is China’s national standard with its own message expansion and round functions, while SHA-256 is the global standard defined by NIST.
Is SM3 supported outside China?
Yes, it is supported by OpenSSL and defined for use in TLS, so anyone can use it to interoperate with Chinese systems.
What is SM3 used for?
It fingerprints messages for SM2 digital signatures, checks the integrity of data, and protects connections in TLS where Chinese standards apply.
When should I use SM3?
When you operate in China, when Chinese standards or regulations require it, or when you must interoperate with systems that already use it.
The bottom line
SM3 explained in one line is this: the fingerprint function China built for itself and then shared with the world, a simple, well-tested design that now guards the largest digital economy on the planet.
It is proof that a national hash function can become a global tool, and the reason it still matters is that anyone doing business with China will meet SM3 sooner or later, and it pays to understand it before that day comes.
This article is general information about how SM3 works, not advice about choosing cryptography for a particular system or country.







