Safekipedia
Block ciphersStandards of China

SM4 (cipher)

Adapted from Wikipedia · Discoverer experience

SM4, also known as ShāngMì 4 (商密4), is a special way of hiding information called a block cipher. It was created to help keep data safe in China and is used in a special security system called WAPI for wireless networks.

Although SM4 was suggested to become part of a bigger international rule called IEEE 802.11i, it was not chosen. Some people did not agree with how quickly WAPI was being added to the rules.

In 2021, SM4 became an official international standard under the name ISO/IEC 18033-3/Amd 1. The idea for SM4 came from scientists at the Chinese Academy of Sciences, and the main person who built it was Lü Shuwang. The method was made public in January 2006 and became an official Chinese rule in August 2016.

Cipher detail

The SM4 cipher uses a key size and a block size of 128 bits each. Encrypting or decrypting data happens in 32 steps, and it uses a special method to create the keys needed for these steps. The keys for decryption are the same as for encryption but used in reverse order.

SM4 has a fixed system for changing data, called an S-box, which works with 8-bit pieces of information. Like the Advanced Encryption Standard, this S-box is based on mathematical operations, but it uses different methods that can still be calculated efficiently.

History

On March 21, 2012, the Chinese government published the industrial standard "GM/T 0002-2012 SM4 Block Cipher Algorithm", officially renaming SMS4 to SM4.

SM4 is included in the ARMv8.4-A expansion to the ARM architecture, and support for the RISC-V architecture was added in 2021. It is also supported by Intel processors, starting from Arrow Lake S, Lunar Lake, Diamond Rapids and Clearwater Forest. A description of SM4 in English is available as an Internet Draft, with a reference implementation in ANSI C.

This article is a child-friendly adaptation of the Wikipedia article on SM4 (cipher), available under CC BY-SA 4.0.