我要评分
获取效率
正确性
完整性
易理解

No Performance Gains After KAE Is Invoked Through openssl.cnf

Symptom

The OPENSSL_CONF environment variable has been configured based on "Using KAE Through the OpenSSL/Tongsuo Configuration File" in the Kunpeng Accelerator Engine User Guide. After the openssl speed -elapsed -engine kae rsa2048 command is executed to invoke KAE after the openssl speed -elapsed rsa2048 command, there is no performance changes.

Key Process and Cause Analysis

Since OPENSSL_CONF has been configured based on "Using KAE Through the OpenSSL/Tongsuo Configuration File", both the openssl speed -elapsed rsa2048 and openssl speed -elapsed -engine kae rsa2048 commands invoke KAE. Therefore, the performance remains unchanged.

Conclusion and Solution

  1. Cancel the OPENSSL_CONF configuration.
    1
    2
    unset OPENSSL_CONF
    export OPENSSL_ENGINES="/usr/local/lib/engines-1.1"
    
  2. Test the RSA performance (KAE not invoked).
    1
    openssl speed -elapsed rsa2048
    
  3. Set the OPENSSL_CONF environment variable.
    1
    export OPENSSL_CONF=/home/app/openssl.cnf  
    

    Set the path to the actual path to the openssl.cnf file.

  4. Test the RSA performance (KAE invoked).
    1
    openssl speed -elapsed -engine kae rsa2048
    

    If the Kunpeng 920 7260 processor is used, the performance is expected to rise from about 750 signs/s to about 3,000 signs/s after KAE is invoked.