ArticleslgStudy

science

SM4 (cipher)

SM4 (cipher) is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand SM4 (cipher) rather than just read about it. In short: ShāngMì 4 (SM4, 商密4) (formerly SMS4) is a block cipher, standardised for commercial cryptography in China. It is used in the Chinese National Standard for Wireless LAN WAPI (WLAN Authentication and Privacy Infrastructure), and with Transport Layer Security.

SM4 (cipher) — main illustration
SM4 (cipher) — illustration

Key takeaways

  • SM4 (cipher) belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect SM4 (cipher) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of SM4 (cipher) from memory before moving on to harder problems.

Reference excerpt

ShāngMì 4 (SM4, 商密4) (formerly SMS4) is a block cipher, standardised for commercial cryptography in China. It is used in the Chinese National Standard for Wireless LAN WAPI (WLAN Authentication and Privacy Infrastructure), and with Transport Layer Security. SM4 was a cipher proposed for the IEEE 802.11i standard, but it has so far been rejected. One of the reasons for the rejection has been opposition to the WAPI fast-track proposal by the IEEE. SM4 was published as GM/T 0002 in 2012 and ISO/IEC 18033-3/Amd 1 in 2021. The SM4 algorithm was drafted by Data Assurance & Communication Security Center, Chinese Academy of Sciences (CAS), and Commercial Cryptography Testing Center, National Cryptography Administration. It is mainly developed by Lü Shuwang (Chinese: 吕述望). The algorithm was declassified in January, 2006, and it became a national standard (GB/T 32907-2016) in August 2016.

Cipher detail The SM4 cipher has a key size and a block size of 128 bits each. Encryption or decryption of one block of data is composed of 32 rounds. A non-linear key schedule is used to produce the round keys and the decryption uses the same round keys as for encryption, except that they are in reversed order.

Keys and key parameters The length of encryption keys is 128 bits, represented as M K = ( M K 0 , M K 1 , M K 2 , M K 3 ) {\displaystyle MK=(MK_{0},\ MK_{1},\ MK_{2},\ MK_{3})} , in which M K i ( i = 0 , 1 , 2 , 3 ) {\displaystyle MK_{i}\ (i=0,\ 1,\ 2,\ 3)} is a 32-bit word. The round keys are represented by ( r k 0 , r k 1 , … , r k 31 ) {\displaystyle (rk_{0},\ rk_{1},\ \ldots ,\ rk_{31})} , where each r k i ( i = 0 , … , 31 ) {\displaystyle rk_{i}(i=0,\ \ldots ,\ 31)} is a 32-bit word. It is generated by the encryption key and the following parameters:

F K = ( F K 0 , F K 1 , F K 2 , F K 3 ) {\displaystyle FK=(FK_{0},\ FK_{1},\ FK_{2},\ FK_{3})}

C K = ( C K 0 , C K 1 , … , C K 31 ) {\displaystyle CK=(CK_{0},\ CK_{1},\ \ldots ,\ CK_{31})}

F K i {\displaystyle FK_{i}} and C K i {\displaystyle CK_{i}} are 32-bit words used to generate the round keys.

Round Each round are computed from the four previous round outputs X i , X i + 1 , X i + 2 , X i + 3 {\displaystyle X_{i},X_{i+1},X_{i+2},X_{i+3}} such that:

X i + 4 = X i ⊕ F ( X i + 1 ⊕ X i + 2 ⊕ X i + 3 ⊕ r k i ) {\displaystyle X_{i+4}=X_{i}\oplus F(X_{i+1}\oplus X_{i+2}\oplus X_{i+3}\oplus rk_{i})}

Where F {\displaystyle F} is a substitution function composed of a non-linear transform, the S-box and linear transform L {\displaystyle L}

S-box

SM4's S-box is fixed for 8-bit input and 8-bit output, noted as Sbox(). As with Advanced Encryption Standard (AES), the S-box is based on the multiplicative inverse over GF(28). The affine transforms and polynomial bases are different from that of AES, but due to affine isomorphism it can be calculated efficiently given an AES S-Box.

… excerpt ends here. Continue reading the full article.

Illustrations

SM4 (cipher) illustration

Worked examples

Example 1 — a first encounter with SM4 (cipher)

Start with the simplest possible case. Write down what SM4 (cipher) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to SM4 (cipher) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about SM4 (cipher) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of SM4 (cipher)

In research
SM4 (cipher) appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses SM4 (cipher) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
SM4 (cipher) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Block ciphers, Standards of China, so understanding it makes those chapters shorter.
In everyday life
Look for SM4 (cipher) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study SM4 (cipher) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what SM4 (cipher) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain SM4 (cipher) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is SM4 (cipher) in simple terms?

ShāngMì 4 (SM4, 商密4) (formerly SMS4) is a block cipher, standardised for commercial cryptography in China. It is used in the Chinese National Standard for Wireless LAN WAPI (WLAN Authentication and Privacy Infrastructure), and with Transport Layer Security.

Why does SM4 (cipher) matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study SM4 (cipher)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on SM4 (cipher).

Tags

  • Block ciphers
  • Standards of China

Keep exploring