Icon

SM4 Compliance Test (GB T 32907-2016) - 1M Iterations

🛡️ SM4 Algorithm Compliance Test (GB/T 32907-2016)
======================================================

[OVERVIEW]

This workflow performs a strict compliance verification for the SM4 Block Cipher Algorithm, adhering to the Chinese National Standard GB/T 32907-2016 (Information security technology—SM4 block cipher algorithm).

It specifically implements the "Example 2" (Appendix A.2) validation scenario, which requires 1,000,000 iterations of encryption to verify the algorithm's stability and correctness.
------------------------------------------------------

⚙️ TECHNICAL SPECIFICATIONS

• Algorithm: SM4 (GM/T 0002-2012 / GB/T 32907-2016)
• Mode: ECB (Electronic Codebook)
• Padding: NoPadding
• Iterations: 1,000,000 (Feedback Mode: Output C_i becomes Input P_i+1)
• Implementation: Java Snippet (High-performance loop)
------------------------------------------------------

📚 DEPENDENCIES & CREDITS

This component is powered by the industry-standard cryptographic library bundled within KNIME:
• Library: Bouncy Castle Crypto APIs (bcprov)
• Provider: org.bouncycastle.jce.provider.BouncyCastleProvider
• Note: No external JAR installation is required. This workflow runs on any standard KNIME Analytics Platform.
------------------------------------------------------

🧪 VALIDATION VECTORS (Appendix A.2)

To pass the compliance test, the output of the 1,000,000th iteration must match the standard exactly.

[ Input Parameters ]
• Key: 01 23 45 67 89 AB CD EF FE DC BA 98 76 54 32 10
• Plaintext: 01 23 45 67 89 AB CD EF FE DC BA 98 76 54 32 10

[ Expected Output ]
✅ RESULT: 59 52 98 C7 C6 FD 27 1F 04 02 F8 04 C3 3D 3F 66

------------------------------------------------------

🚀 HOW TO USE
1. Execute the workflow.
2. The Java Snippet node will calculate 1,000,000 encryption rounds internally.
3. Open the data view of the final node.
4. Verify that the "final_result_hex" matches the Expected Output above.

------------------------------------------------------
- Synkarta -
Focusing on Financial Compliance (and) Data Security Solutions.

URL: SM4 Compliance Test (GB/T 32907-2016) - 1M Iterations http://www.synkarta.com

Java Snippet
Table Creator

Nodes

Extensions

Links