Developer Reference for Intel® Integrated Performance Primitives Cryptography
You can use the functions described in this section for various operational modes of SMS4 cipher systems [SM4].
Intel IPP for cryptography supports ECB, CBC, CFB, CTR, and OFB modes. You can tell which algorithm a given function supports from the function base name, for example, the SMS4EncryptECB function operates under the ECB mode.
All functions for the SMS4 block cipher use the context IppsSMS4Spec, which serves as an operational vehicle to carry the material required for various modes of operation.
Application code for conducting a typical encryption under the CBC mode using the SMS4 scheme must perform the following sequence of operations:
You can apply a similar procedure to ECB, CFB, CTR, and OFB modes of operation.
A similar scheme also holds for decryption.