{
  "id": "sm4-128",
  "name": "SM4-128",
  "family_id": "sm4",
  "description": "Standardized 128-bit block cipher (GB/T 32907-2016, ISO/IEC 18033-3, RFC 8998) with a 128-bit key and 32 rounds of a four-branch 32-bit unbalanced Feistel network using an 8-bit inverse-based S-box and a 32-bit MDS-like linear diffusion layer. Full 32-round SM4 remains intact; published linear and differential attacks reach 23–24 rounds.",
  "status": "intact",
  "parameters": {
    "block_bits": 128,
    "key_bits": 128,
    "rounds": 32,
    "sbox_bits": 8,
    "branch_words": 4,
    "word_bits": 32,
    "standard": "GB/T 32907-2016 / ISO/IEC 18033-3 / RFC 8998"
  },
  "references": [
    {
      "title": "RFC 8998: ShangMi (SM) Cipher Suites for TLS 1.3",
      "url": "https://www.rfc-editor.org/rfc/rfc8998",
      "authors": [
        "Paul Yang"
      ],
      "quote_location": "Section 2 (SM4-128 parameters and TLS 1.3 cipher suite specification)"
    },
    {
      "title": "New Linear Cryptanalysis of Chinese Commercial Block Cipher Standard SM4",
      "url": "https://doi.org/10.1155/2017/1461520",
      "authors": [
        "Yu Liu",
        "Huicong Liang",
        "Wei Wang",
        "Meiqin Wang"
      ],
      "doi": "10.1155/2017/1461520",
      "quote_location": "Section 2 (SM4 round function and key schedule description)"
    }
  ],
  "kats": [],
  "attacks": [
    {
      "id": "sm4-128-lu-2007-16r-impdiff",
      "target_id": "sm4-128",
      "title": "16-round impossible differential attack on SM4 (SMS4)",
      "goal": "key_recovery",
      "attack_family": "impossible_differential",
      "setting": "Single-key chosen-plaintext impossible differential key recovery on 16 of 32 rounds",
      "claim_kind": "estimate",
      "track": "mathematical",
      "date": "2007-12-12",
      "authors": [
        "Jiqiang Lu"
      ],
      "references": [
        {
          "title": "Attacking Reduced-Round Versions of the SMS4 Block Cipher in the Chinese WAPI Standard",
          "url": "https://doi.org/10.1007/978-3-540-77048-6_24",
          "authors": [
            "Jiqiang Lu"
          ],
          "doi": "10.1007/978-3-540-77048-6_24",
          "quote_location": "ICICS 2007, LNCS 4861, pp. 306-318 (16-round impossible differential attack)"
        }
      ],
      "supersedes": [],
      "disputed_by": [
        "sm4-128-toz-dunkelman-2008-16r-impdiff"
      ],
      "evidence": {
        "source_status": "peer_reviewed",
        "citation_verified": false,
        "artifact_verified": {
          "verified": false
        },
        "peer_reproduced": {
          "reproduced": false
        },
        "formal_verified": {
          "verified": false
        }
      },
      "metrics": {
        "type": "symmetric_rounds",
        "rounds_attacked": 16,
        "total_rounds": 32,
        "log2_data": 105,
        "log2_time": 107,
        "time_unit": "16-round SM4 encryptions"
      },
      "notes": "Uses a 12-round impossible differential distinguisher extended to 16 rounds; Toz and Dunkelman (ICICS 2008) later identified filtering flaws and revised the 16-round complexity."
    },
    {
      "id": "sm4-128-toz-dunkelman-2008-16r-impdiff",
      "target_id": "sm4-128",
      "title": "Revised 16-round impossible differential attack on SM4 (SMS4)",
      "goal": "key_recovery",
      "attack_family": "impossible_differential",
      "setting": "Single-key chosen-plaintext impossible differential key recovery on 16 of 32 rounds with corrected subkey filtering",
      "claim_kind": "record",
      "track": "mathematical",
      "date": "2008-10-20",
      "authors": [
        "Deniz Toz",
        "Orr Dunkelman"
      ],
      "references": [
        {
          "title": "Analysis of Two Attacks on Reduced-Round Versions of the SMS4",
          "url": "https://doi.org/10.1007/978-3-540-88625-9_10",
          "authors": [
            "Deniz Toz",
            "Orr Dunkelman"
          ],
          "doi": "10.1007/978-3-540-88625-9_10",
          "quote_location": "ICICS 2008, LNCS 5308, pp. 141-156 (revised 16-round impossible differential complexity)"
        }
      ],
      "supersedes": [
        "sm4-128-lu-2007-16r-impdiff"
      ],
      "disputed_by": [],
      "evidence": {
        "source_status": "peer_reviewed",
        "citation_verified": false,
        "artifact_verified": {
          "verified": false
        },
        "peer_reproduced": {
          "reproduced": false
        },
        "formal_verified": {
          "verified": false
        }
      },
      "metrics": {
        "type": "symmetric_rounds",
        "rounds_attacked": 16,
        "total_rounds": 32,
        "log2_data": 117.06,
        "log2_time": 96.07,
        "time_unit": "16-round SM4 encryptions"
      },
      "notes": "Corrects Lu (ICICS 2007) data-generation and early-abort filtering analysis, raising data complexity to 2^117.06 chosen plaintexts while lowering time complexity to 2^96.07."
    },
    {
      "id": "sm4-128-kim-etal-2008-22r-linear",
      "target_id": "sm4-128",
      "title": "22-round linear key-recovery attack on SM4 (SMS4)",
      "goal": "key_recovery",
      "attack_family": "linear",
      "setting": "Single-key known-plaintext linear cryptanalysis on 22 of 32 rounds",
      "claim_kind": "estimate",
      "track": "mathematical",
      "date": "2008-06-24",
      "authors": [
        "Taehyun Kim",
        "Jongsung Kim",
        "Seokhie Hong",
        "Jaechul Sung"
      ],
      "references": [
        {
          "title": "Linear and Differential Cryptanalysis of Reduced SMS4 Block Cipher",
          "url": "https://eprint.iacr.org/2008/281",
          "authors": [
            "Taehyun Kim",
            "Jongsung Kim",
            "Seokhie Hong",
            "Jaechul Sung"
          ],
          "eprint_id": "2008/281",
          "quote_location": "ePrint 2008/281 (22-round linear attack on SMS4)"
        }
      ],
      "supersedes": [],
      "disputed_by": [],
      "evidence": {
        "source_status": "preprint",
        "citation_verified": false,
        "artifact_verified": {
          "verified": false
        },
        "peer_reproduced": {
          "reproduced": false
        },
        "formal_verified": {
          "verified": false
        }
      },
      "metrics": {
        "type": "symmetric_rounds",
        "rounds_attacked": 22,
        "total_rounds": 32,
        "log2_data": 117,
        "log2_time": 109.86,
        "log2_memory": 109,
        "time_unit": "22-round SM4 encryptions"
      },
      "notes": "Memory is reported in bytes (2^109 bytes); same paper also reports 18-round boomerang/rectangle attacks."
    },
    {
      "id": "sm4-128-kim-etal-2008-22r-diff",
      "target_id": "sm4-128",
      "title": "22-round differential key-recovery attack on SM4 (SMS4)",
      "goal": "key_recovery",
      "attack_family": "differential",
      "setting": "Single-key chosen-plaintext differential cryptanalysis on 22 of 32 rounds",
      "claim_kind": "estimate",
      "track": "mathematical",
      "date": "2008-06-24",
      "authors": [
        "Taehyun Kim",
        "Jongsung Kim",
        "Seokhie Hong",
        "Jaechul Sung"
      ],
      "references": [
        {
          "title": "Linear and Differential Cryptanalysis of Reduced SMS4 Block Cipher",
          "url": "https://eprint.iacr.org/2008/281",
          "authors": [
            "Taehyun Kim",
            "Jongsung Kim",
            "Seokhie Hong",
            "Jaechul Sung"
          ],
          "eprint_id": "2008/281",
          "quote_location": "ePrint 2008/281 (22-round differential attack on SMS4)"
        }
      ],
      "supersedes": [],
      "disputed_by": [],
      "evidence": {
        "source_status": "preprint",
        "citation_verified": false,
        "artifact_verified": {
          "verified": false
        },
        "peer_reproduced": {
          "reproduced": false
        },
        "formal_verified": {
          "verified": false
        }
      },
      "metrics": {
        "type": "symmetric_rounds",
        "rounds_attacked": 22,
        "total_rounds": 32,
        "log2_data": 118,
        "log2_time": 125.71,
        "log2_memory": 123,
        "time_unit": "22-round SM4 encryptions"
      },
      "notes": "Memory is reported in bytes (2^123 bytes)."
    },
    {
      "id": "sm4-128-su-etal-2010-23r-diff",
      "target_id": "sm4-128",
      "title": "23-round differential key-recovery attack on SM4 (SMS4)",
      "goal": "key_recovery",
      "attack_family": "differential",
      "setting": "Single-key chosen-plaintext differential cryptanalysis using a 19-round differential characteristic on 23 of 32 rounds",
      "claim_kind": "record",
      "track": "mathematical",
      "date": "2010-02-08",
      "authors": [
        "Bozhan Su",
        "Wenling Wu",
        "Wentao Zhang"
      ],
      "references": [
        {
          "title": "Differential Cryptanalysis of SMS4 Block Cipher",
          "url": "https://eprint.iacr.org/2010/062",
          "authors": [
            "Bozhan Su",
            "Wenling Wu",
            "Wentao Zhang"
          ],
          "eprint_id": "2010/062",
          "quote_location": "ePrint 2010/062 / JCST 2011 (19-round differential characteristic and 23-round key recovery)"
        }
      ],
      "supersedes": [
        "sm4-128-kim-etal-2008-22r-diff"
      ],
      "disputed_by": [],
      "evidence": {
        "source_status": "peer_reviewed",
        "citation_verified": false,
        "artifact_verified": {
          "verified": false
        },
        "peer_reproduced": {
          "reproduced": false
        },
        "formal_verified": {
          "verified": false
        }
      },
      "metrics": {
        "type": "symmetric_rounds",
        "rounds_attacked": 23,
        "total_rounds": 32,
        "log2_data": 115,
        "log2_time": 124.3,
        "time_unit": "23-round SM4 encryptions"
      },
      "notes": "Establishes structural active S-box bounds over 5- and 6-round SMS4 sub-blocks and extends a 19-round differential to 23-round key recovery."
    },
    {
      "id": "sm4-128-liu-chen-2013-23r-linear",
      "target_id": "sm4-128",
      "title": "23-round multidimensional linear attack on SM4 (SMS4)",
      "goal": "key_recovery",
      "attack_family": "multidimensional_linear",
      "setting": "Single-key known-ciphertext multidimensional linear cryptanalysis using 19-round linear approximations on 23 of 32 rounds",
      "claim_kind": "record",
      "track": "mathematical",
      "date": "2013-09-30",
      "authors": [
        "Mingjie Liu",
        "Jiazhe Chen"
      ],
      "references": [
        {
          "title": "Improved Linear Attacks on the Chinese Block Cipher Standard",
          "url": "https://doi.org/10.1007/s11390-014-1495-9",
          "authors": [
            "Mingjie Liu",
            "Jiazhe Chen"
          ],
          "eprint_id": "2013/626",
          "doi": "10.1007/s11390-014-1495-9",
          "quote_location": "JCST 2014 / ePrint 2013/626 (23-round linear attack at 2^112 time and 2^126.54 data)"
        }
      ],
      "supersedes": [
        "sm4-128-kim-etal-2008-22r-linear"
      ],
      "disputed_by": [],
      "evidence": {
        "source_status": "peer_reviewed",
        "citation_verified": false,
        "artifact_verified": {
          "verified": false
        },
        "peer_reproduced": {
          "reproduced": false
        },
        "formal_verified": {
          "verified": false
        }
      },
      "metrics": {
        "type": "symmetric_rounds",
        "rounds_attacked": 23,
        "total_rounds": 32,
        "log2_data": 126.54,
        "log2_time": 112,
        "log2_memory": 116,
        "time_unit": "23-round SM4 encryptions"
      },
      "notes": "Introduces 19-round 1D linear approximations (bias 2^-62.27) and multidimensional linear FFT key recovery on 23 rounds."
    },
    {
      "id": "sm4-128-liu-etal-2017-24r-linear",
      "target_id": "sm4-128",
      "title": "24-round linear key-recovery attack on SM4",
      "goal": "key_recovery",
      "attack_family": "linear",
      "setting": "Single-key known-plaintext linear cryptanalysis using 20-round iterative linear approximations on 24 of 32 rounds",
      "claim_kind": "record",
      "track": "mathematical",
      "date": "2017-06-30",
      "authors": [
        "Yu Liu",
        "Huicong Liang",
        "Wei Wang",
        "Meiqin Wang"
      ],
      "references": [
        {
          "title": "New Linear Cryptanalysis of Chinese Commercial Block Cipher Standard SM4",
          "url": "https://doi.org/10.1155/2017/1461520",
          "authors": [
            "Yu Liu",
            "Huicong Liang",
            "Wei Wang",
            "Meiqin Wang"
          ],
          "doi": "10.1155/2017/1461520",
          "quote_location": "Security and Communication Networks 2017 (24-round linear attack at 2^122.6 time/data and 2^85 memory)"
        }
      ],
      "supersedes": [
        "sm4-128-liu-chen-2013-23r-linear"
      ],
      "disputed_by": [],
      "evidence": {
        "source_status": "peer_reviewed",
        "citation_verified": false,
        "artifact_verified": {
          "verified": false
        },
        "peer_reproduced": {
          "reproduced": false
        },
        "formal_verified": {
          "verified": false
        }
      },
      "metrics": {
        "type": "symmetric_rounds",
        "rounds_attacked": 24,
        "total_rounds": 32,
        "log2_data": 122.6,
        "log2_time": 122.6,
        "log2_memory": 85,
        "time_unit": "24-round SM4 encryptions"
      },
      "notes": "Uses 3-round iterative partial-LAT approximations to build a 20-round linear approximation of correlation 2^-60; leaves 8 of 32 rounds untouched."
    }
  ],
  "frontiers": [
    {
      "id": "sm4-128-beyond-24-rounds",
      "target_id": "sm4-128",
      "title": "Extending single-key attacks beyond 24 of 32 rounds",
      "description": "The highest-round published single-key attacks on SM4-128 reach 24 rounds via linear cryptanalysis (2^122.6 data and time) and 23 rounds via differential cryptanalysis (2^115 data, 2^124.3 time), leaving an 8-round security margin in the full 32-round cipher. Pushing linear or differential distinguishers further is constrained by the 2^128 codebook and exhaustive-search ceilings.",
      "references": [
        {
          "title": "New Linear Cryptanalysis of Chinese Commercial Block Cipher Standard SM4",
          "url": "https://doi.org/10.1155/2017/1461520",
          "authors": [
            "Yu Liu",
            "Huicong Liang",
            "Wei Wang",
            "Meiqin Wang"
          ],
          "doi": "10.1155/2017/1461520",
          "quote_location": "Section 4 (24-round SM4 linear cryptanalysis complexity)"
        },
        {
          "title": "Differential Cryptanalysis of SMS4 Block Cipher",
          "url": "https://eprint.iacr.org/2010/062",
          "authors": [
            "Bozhan Su",
            "Wenling Wu",
            "Wentao Zhang"
          ],
          "eprint_id": "2010/062",
          "quote_location": "ePrint 2010/062 (23-round SM4 differential key recovery)"
        }
      ]
    },
    {
      "id": "sm4-128-impossible-differential-margin",
      "target_id": "sm4-128",
      "title": "Bridging impossible differential attacks past 17 of 32 rounds",
      "description": "Impossible differential attacks on SM4-128 reach 16–17 rounds (Lu ICICS 2007, Toz–Dunkelman ICICS 2008, Zhang 2008) because the unbalanced Feistel word shift coupled with the 32-bit linear diffusion layer forces rapid branch activation across 12–14 middle rounds.",
      "references": [
        {
          "title": "Analysis of Two Attacks on Reduced-Round Versions of the SMS4",
          "url": "https://doi.org/10.1007/978-3-540-88625-9_10",
          "authors": [
            "Deniz Toz",
            "Orr Dunkelman"
          ],
          "doi": "10.1007/978-3-540-88625-9_10",
          "quote_location": "ICICS 2008, LNCS 5308, pp. 141-156 (16-round impossible differential assessment)"
        }
      ]
    }
  ],
  "dead_ends": [
    {
      "id": "sm4-128-naive-impdiff-filtering",
      "target_id": "sm4-128",
      "title": "Uncorrected data and filtering assumptions in early 16-round impossible differential estimates",
      "description": "Early 16-round impossible differential estimates (Lu, ICICS 2007) undercounted data requirements (2^105 vs corrected 2^117.06) and misaccounted for early-abort key-filtering costs. Subsequent impossible differential attacks on SM4 must verify pair generation and subkey-filtering probabilities explicitly.",
      "scope": "Impossible differential key-recovery complexity estimation on SM4-128.",
      "references": [
        {
          "title": "Analysis of Two Attacks on Reduced-Round Versions of the SMS4",
          "url": "https://doi.org/10.1007/978-3-540-88625-9_10",
          "authors": [
            "Deniz Toz",
            "Orr Dunkelman"
          ],
          "doi": "10.1007/978-3-540-88625-9_10",
          "quote_location": "Section 3 (Re-assessment of 16-round SMS4 impossible differential attack)"
        }
      ],
      "evidence": {
        "source_status": "peer_reviewed",
        "citation_verified": false,
        "artifact_verified": {
          "verified": false
        },
        "peer_reproduced": {
          "reproduced": false
        },
        "formal_verified": {
          "verified": false
        }
      }
    }
  ]
}
