Rate This Document
Findability
Accuracy
Completeness
Readability

AES and SM4 Symmetric Encryption and Decryption

Case No.

2.1.4

Test Objective

Verify the symmetric key encryption and decryption functions of the secure OS.

Test Networking

See Test Networking.

Prerequisites

  1. The TrustZone kit has been burnt into the server and the TrustZone license has been activated.
  2. The REE patch has been loaded to the server. The CA and TA can be loaded and can communicate with each other properly.

Test Procedure

  1. Log in to the REE OS and load the TrustZone REE patch tzdriver. (See Expected Result 1.)

    insmod tzdriver

    /usr/bin/teecd &

  2. Write the CA and TA and make the following requirements on the CA and TA code. (See Expected Result 2.)
    • Test the symmetric encryption and decryption functions: TEE_CipherInit, TEE_CipherUpdate, and TEE_CipherDoFinal.
    • Test the asymmetric key algorithms: AES-GCM and SM4.
    • Check whether the encryption and decryption results are consistent.

Expected Result

  1. The REE patch is loaded and no error information is displayed.
  2. The APIs are working properly, and all the encryption and decryption functions are normal.

Test Result

  

Remarks

Ask the Huawei R&D to provide the TA and CA source code and binary files for the test.