SM3 National Encryption Tool Icon

SM3 National Encryption

Online SM3 National Hash Encryption Tool, supports text hash calculation and file verification, outputs a 256-bit hash value, compliant with GM/T 0004-2012 national standard.

Tool Introduction

SM3 National Encryption is an online SM3 national cryptographic hash tool that supports text string SM3 hashing and file SM3 checksum verification. It implements the GM/T 0004-2012 "SM3 Cryptographic Hash Algorithm" standard published by the State Cryptography Administration of China, outputting a 256-bit (64 hexadecimal characters) hash value in both uppercase and lowercase formats. SM3 is the core hash algorithm in Chinas commercial cryptographic system, widely used in digital signatures, message authentication codes (HMAC-SM3), and key derivation.

How to Use

  1. Enter Text

    Enter or paste the text you want to hash in the left input box

  2. Compute Hash

    Click the "Compute SM3" button, and the right side will display the SM3 hash in both uppercase and lowercase formats

  3. Copy Result

    Click the copy icon next to each result field to copy the hash value to your clipboard

  4. File Checksum

    In the file checksum section at the bottom, click "Select File" and choose any file to automatically compute its SM3 hash for integrity verification

Use Cases

  • National crypto compliance: Meet the requirements of China's information system security level protection and cryptographic application security assessment for domestic cryptographic algorithms. SM3 is the only standard hash algorithm in the national cryptographic system.
  • Digital signatures and verification: SM3 works with the SM2 elliptic curve public key algorithm to form a complete digital signature scheme (SM2withSM3), widely used in e-government and finance.
  • Message authentication codes (HMAC-SM3): SM3 combined with HMAC verifies message integrity and source authenticity, serving as an alternative to the international standard HMAC-SHA256.
  • File integrity verification: After downloading or transferring a file, compare its SM3 hash to verify that the file has not been tampered with or corrupted, providing stronger security than MD5.

Key Advantages

  1. National Standard Algorithm

    Strictly follows the GM/T 0004-2012 standard published by the State Cryptography Administration of China, meeting national crypto compliance requirements

  2. Free Daily Usage

    Free daily usage is provided for every user, so routine text hashing and file checksum needs can be met at zero cost; frequent or professional use can unlock more quota by subscribing to membership

  3. Privacy & Security

    All calculations run entirely in your browser; text and file data are never uploaded to any server, providing 100% privacy protection

  4. Text & File Support

    Supports instant hashing of text strings as well as SM3 checksums of any file, covering both integrity and consistency verification scenarios

  5. Uppercase & Lowercase

    Outputs both uppercase and lowercase formats in one calculation, meeting different system storage and integration needs

  6. No Installation Needed

    No installation or registration required; open your browser and use it right away, compatible with PC and mobile platforms

SM3 Algorithm Principles

SM3 is a cryptographic hash algorithm published by the State Cryptography Administration of China in 2010, with standard number GM/T 0004-2012. It uses the Merkle-Damgård construction, with a message block size of 512 bits and an output digest length of 256 bits.

The core process of SM3: ① Message padding — pad the message so its length ≡ 448 mod 512, then append a 64-bit representation of the original message length; ② Message expansion — expand each 512-bit message block into 132 32-bit words (W0~W67 and W'0~W'63); ③ Iterative compression — use 8 32-bit registers through 64 rounds of compression, each round involving Boolean functions FF/GG and permutation functions P0/P1; ④ Output 256 bits — concatenate the final 8 register values to produce the 256-bit hash.

SM3's design incorporates strong security considerations, employing a more complex message expansion and compression structure than SHA-256. The 64-round compression uses two different Boolean functions (FFj and GGj) and two permutation functions (P0 and P1), effectively enhancing collision resistance and differential analysis resistance.

SM3 vs. Other Hash Algorithms

The following table compares key characteristics of SM3 with other common hash algorithms:

Algorithm Output Bits Speed Security Typical Use Case
SM3256ModerateSecure (national standard, unbroken)National crypto compliance, digital signatures, government & finance
SHA-256256ModerateSecure (international standard, unbroken)SSL/TLS, blockchain, international applications
MD5128FastBroken (collision)File checksum (non-security)

SM3's Role in the National Cryptographic System

The Chinese national cryptographic algorithm system consists of three core algorithms: SM2 (elliptic curve public key algorithm, used for digital signatures and key exchange), SM3 (cryptographic hash algorithm, used for message digests and integrity verification), and SM4 (block cipher algorithm, used for data encryption). As the hash algorithm in this system, SM3 plays a fundamental role in digital signatures (SM2withSM3), key derivation, and random number generation.

The SM3 algorithm draws on the excellent features of SHA-256 while incorporating innovative improvements by Chinese cryptographers. It achieves a good balance between security and efficiency and has been adopted as an international standard by ISO/IEC (ISO/IEC 10118-3:2018), marking an important breakthrough for Chinese cryptographic algorithms in the international standards arena.

FAQ

What is SM3 encryption?

SM3 is a cryptographic hash algorithm (GM/T 0004-2012) published by the State Cryptography Administration of China and is one of the core algorithms in the national cryptographic standard system. It converts arbitrary-length input data into a fixed 256-bit (64 hexadecimal characters) output. SM3 is one-way and irreversible — the original data cannot be recovered from the hash value. Together with SM2 and SM4, it forms the three foundational algorithms of China's commercial cryptography.

What is the difference between SM3 and SHA-256? Which should I use?

Both are 256-bit output cryptographic hash algorithms: SM3 uses 64 rounds of compression, generating 132 32-bit expanded words, and is a Chinese national standard (GM/T 0004-2012); SHA-256 uses 64 rounds of iteration, generating 64 32-bit expanded words, and is an international standard (NIST FIPS 180-4). For information systems within China, especially government and financial sectors requiring national crypto compliance, SM3 should be preferred; for international scenarios, SHA-256 has broader compatibility.

Is SM3 secure?

Yes, SM3 is currently considered secure. SM3 employs a more complex message expansion than SHA-256 (132 expanded words vs. 64) and uses two different Boolean functions and permutation functions, effectively enhancing collision resistance and differential analysis resistance. No effective attacks against SM3 have been discovered. SM3 has been adopted as an international standard by ISO/IEC, with its security internationally recognized.

What is the difference between SM3 and MD5?

Key differences: ① Output length — SM3 outputs 256 bits (64 hex chars), MD5 outputs 128 bits (32 hex chars); ② Security — SM3 is currently secure and unbroken, while MD5 has been proven to have serious collision vulnerabilities; ③ Design standard — SM3 is a Chinese national standard, MD5 is an obsolete international standard; ④ Applications — SM3 is used for national crypto compliance (digital signatures, government & finance), while MD5 is only suitable for non-security file checksums.

Does this tool upload my data to a server?

No. All SM3 operations (text hashing and file checksum) run entirely in your browser using a pure JavaScript SM3 algorithm library on the client side. Your text content and file data never leave your device.

Is SM3's output length always fixed?

Yes. SM3's output length is always 256 bits (32 bytes). Regardless of the input data length (from 1 byte to several GB), SM3 always produces a 64-character hexadecimal hash value. This is a common property of all cryptographic hash functions — fixed output length independent of input length.

How do I compute the SM3 checksum of a file?

In the "File Checksum" section at the bottom, click the "Select File" button and choose any file. The tool automatically reads the file in 2MB chunks and computes its SM3 hash entirely in your browser. The result appears in the "File SM3" field and can be copied in one click for integrity comparison.

Is this tool free? Do I need to register?

This tool provides free daily usage, so routine lightweight needs can be met at zero cost. No registration or login is required — just open the page and use it. When you need higher processing volumes or more frequent use, subscribing to membership unlocks more benefits to handle various scenarios with ease.

How large a file can I verify?

File checksum uses chunked streaming, reading only a 2MB block at a time and accumulating the result locally. This means it can theoretically handle multi-gigabyte files without causing browser lag or memory issues.

Can SM3 be used for password storage?

Yes. SM3 is a one-way irreversible hash algorithm, commonly used for password digest storage and data integrity verification. However, real-world systems usually combine salting and multiple iterations (such as PBKDF) to further strengthen password storage security; storing plain hashes directly is not recommended.

What is the difference between text SM3 and file SM3?

The algorithm is identical in both cases — both compute the SM3 hash of the input data. The only difference is the input source: text SM3 instantly hashes the string in the input box (encoded as UTF-8), while file SM3 hashes a selected binary file, suitable for large files and integrity verification.

Is SM3 fast?

SM3's speed is above average, and it is essentially instant for ordinary text. Since all calculations happen locally in the browser with no network transfer, processing speed mainly depends on device performance, so everyday text and small-to-medium files produce results quickly.

Content last updated:2026-07-16

Related Tools

DES Encryption

DES Encryption

Online DES/2DES/3DES encryption and decryption tool, supporting all encryption modes and padding methods. Fully processed locally in the browser for security and efficiency.

AES Encryption

AES Encryption

Online AES encryption and decryption tool, supporting AES-128/192/256, covering all encryption modes and padding methods, secure, efficient, and easy to operate.

3DES Encryption

3DES Encryption

Online 3DES encryption/decryption tool, supporting all encryption modes and padding methods, fully processed locally in the browser to ensure data security.

RC4 Encryption

RC4 Encryption

Online RC4 stream cipher encryption/decryption tool, supports multiple key lengths, one-click encryption and decryption, all operations are completed locally in the browser to ensure data security.

Rabbit Encryption

Rabbit Encryption

Online Rabbit stream cipher encryption/decryption tool, using a high-speed symmetric encryption algorithm, supporting multiple key lengths. All operations are performed locally in the browser to ensure data security.

RC2 Encryption

RC2 Encryption

Online RC2 encryption and decryption tool, supporting ECB/CBC modes, variable key length and effective key bits, all processed locally in the browser to ensure data security.

IDEA Encryption

IDEA Encryption

Online IDEA International Data Encryption Algorithm Tool, supporting multiple encryption modes including ECB/CBC/CFB/OFB/CTR. All operations are performed locally in the browser to ensure data security.

Blowfish Encryption

Blowfish Encryption

Online Blowfish encryption/decryption tool supporting 128/192/256/448-bit variable keys, ECB/CBC/CFB/OFB modes, and multiple padding methods. All operations are performed locally in the browser to ensure data security.

CAST Encryption

CAST Encryption

CAST-128 (CAST5) online encryption and decryption tool, supporting multiple encryption modes such as ECB/CBC/CFB/OFB, flexible padding methods, and output encoding. All operations are performed locally in the browser, ensuring security and efficiency.

SM4 National Encryption

SM4 National Encryption

Online SM4 National Symmetric Encryption and Decryption Tool, supporting five working modes: ECB/CBC/CFB/OFB/CTR, and multiple padding methods. All operations are performed locally in the browser to ensure data security.

RSA Encryption and Decryption

RSA Encryption and Decryption

Online RSA asymmetric encryption and decryption tool, supporting key pair generation, public key encryption and private key decryption, private key signing and public key verification. All operations are performed locally in the browser to ensure data security.

MD5 Encryption

MD5 Encryption

Online MD5 hash encryption tool, supporting 16-bit/32-bit output, case switching, and file MD5 verification. All operations are completed locally in the browser, ensuring security and efficiency.

MD2 Encryption

MD2 Encryption

MD2 Encryption Tool: Generate 32-bit MD2 hash values online, supporting uppercase/lowercase output and file verification.

SHA-1 Encryption

SHA-1 Encryption

Online SHA-1 hash calculation tool for efficient text encryption and file integrity verification.

SHA-256 Encryption

SHA-256 Encryption

Online SHA-256 hash calculation tool for quick text encryption and file integrity verification.

SHA-384 Encryption

SHA-384 Encryption

Online SHA-384 hash calculation tool for fast text encryption and file integrity verification.

SHA-512 Encryption

SHA-512 Encryption

Online SHA-512 hash calculation tool, supporting text encryption and file integrity verification, quickly generating secure hash values.

Base64 Encode/Decode

Base64 Encode/Decode

Online Base64 encode/decode tool, supporting text Base64 encoding and decoding, all done locally in the browser, safe and efficient.

URL Encode/Decode

URL Encode/Decode

Online URL encoding and decoding tool, supports intelligent encoding and decoding of URL parameters, automatically identifies URL structure, processes only the parameter part, completes entirely in the browser locally, safe and efficient.

UTF-8 Encode/Decode

UTF-8 Encode/Decode

Online UTF-8 encoding/decoding tool, supporting conversion between text and UTF-8 hexadecimal bytes. All processing is done locally in the browser, ensuring data security.

General Membership

Enjoy membership benefits

Exclusive Benefits

  • Unlimited use of 290+ web tools
  • Cross-platform benefits
  • New tools included
  • Free updates

Basic Benefits

  • Larger file size
  • More files
  • Full features on web
  • Full features on desktop

Monthly Member Plan

¥ 8.9
Original: ¥19.9
Valid for 30 days

Quarterly Member Plan

¥ 19.9
Original: ¥59.9
As low as 6.6 yuan/month
Hot

Yearly Member Plan

¥ 69.9
Original: ¥229.9
As low as 5.8 yuan/month
Pay: ¥ 9

Please scan with WeChat to pay

Payment indicates your agreement to the relevant terms

*No 7-day unconditional refund