Kunpeng Acceleration Engine Developer Guide(KAE Encryption & Decryption) Issue 15 Date 2021-08-06 HUAWEI TECHNOLOGIES CO., LTD. Copyright © Huawei Technologies Co., Ltd. 2021. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of Huawei Technologies Co., Ltd. Trademarks and Permissions and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd. All other trademarks and trade names mentioned in this document are the property of their respective holders. Notice The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services and features described in this document may not be within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information, and recommendations in this document are provided "AS IS" without warranties, guarantees or representations of any kind, either express or implied. The information in this document is subject to change without notice. Every effort has been made in the preparation of this document to ensure accuracy of the contents, but all statements, information, and recommendations in this document do not constitute a warranty of any kind, express or implied. Issue 15 (2021-08-06) Copyright © Huawei Technologies Co., Ltd. i Kunpeng Acceleration Engine Developer Guide(KAE Encryption & Decryption) Contents Contents 1 Overview....................................................................................................................................1 2 Logical Architecture................................................................................................................ 2 3 Installation, Upgrade, and Uninstallation.........................................................................4 3.1 Installing the KAE Software................................................................................................................................................. 4 3.1.1 Introduction........................................................................................................................................................................... 4 3.1.2 Preparing for Installation.................................................................................................................................................. 6 3.1.3 Installing OpenSSL............................................................................................................................................................ 10 3.1.4 Installing the KAE Software Using an RPM Package............................................................................................ 12 3.1.5 Installing the KAE Software Using a DEB Package................................................................................................15 3.1.6 Installing the KAE Software Using Source Code.....................................................................................................19 3.2 Operations After Installation............................................................................................................................................ 22 3.2.1 Testing the Performance of OpenSSL and the KAE............................................................................................... 22 3.3 Upgrading the KAE Software............................................................................................................................................ 25 3.3.1 Upgrading the KAE Software Using an RPM Package..........................................................................................25 3.3.2 Upgrading the KAE Software Using a DEB Package............................................................................................. 26 3.4 Uninstalling the KAE Software......................................................................................................................................... 28 3.4.1 Uninstalling the KAE Software Installed Using an RPM Package.....................................................................28 3.4.2 Uninstalling the KAE Software Installed Using a DEB Package........................................................................ 29 3.4.3 Uninstalling the KAE Software Installed Using Source Code............................................................................. 31 4 Application Cases.................................................................................................................. 32 4.1 KAE Applications................................................................................................................................................................... 32 4.1.1 KAE Usage Description.................................................................................................................................................... 32 4.1.2 Example Code for the KAE............................................................................................................................................. 33 4.1.3 Using KAE Through the OpenSSL Configuration File openssl.cnf.................................................................... 33 4.1.4 Nginx Applications Accelerated by KAE.....................................................................................................................35 4.1.5 dm-crypt-based Transparent Partition or Drive Encryption................................................................................35 4.1.6 Using the KAE on a KVM................................................................................................................................................ 38 4.1.7 Using the KAE on Docker............................................................................................................................................... 40 4.1.8 MD5 Hardware Acceleration Tuning...........................................................................................................................41 5 Common Operations............................................................................................................ 42 5.1 Querying KAE Log Information........................................................................................................................................ 42 Issue 15 (2021-08-06) Copyright © Huawei Technologies Co., Ltd. ii Kunpeng Acceleration Engine Developer Guide(KAE Encryption & Decryption) Contents 6 Troubleshooting.....................................................................................................................44 6.1 Initialization Failure..............................................................................................................................................................44 6.2 Failed to Identify Accelerator Devices After the KAE Installed............................................................................. 45 6.3 Failed to Upgrade the Accelerator Driver.....................................................................................................................46 6.4 Failed to Identify the Related Interface Symbols After the OpenSSL of a New Version Is Installed.......46 A Appendix................................................................................................................................. 48 A.1 Terms........................................................................................................................................................................................ 48 A.2 Acronyms and Abbreviations............................................................................................................................................ 49 A.3 Change History...................................................................................................................................................................... 50 Issue 15 (2021-08-06) Copyright © Huawei Technologies Co., Ltd. iii Kunpeng Acceleration Engine Developer Guide(KAE Encryption & Decryption) 1 Overview 1 Overview Kunpeng accelerator engine (KAE) is a hardware acceleration solution based on the Kunpeng 920 processor. It includes KAE encryption and decryption as well as KAEzip, which are used to accelerate SSL/TLS applications and data compression, respectively. Therefore, it can significantly reduce processor consumption and improve the processor efficiency. In addition, the KAE shields the internal processing details from the application layer. Users can quickly migrate services through the standard OpenSSL and zlib interfaces. This document describes KAE encryption and decryption as well as its installation, test procedures, and use cases. KAE Encryption and Decryption The KAE encryption and decryption module uses the Kunpeng hardware acceleration engine to implement the RSA, SM3, SM4, DH, MD5, and AES algorithms. It provides high-performance symmetric and asymmetric encryption/ decryption algorithms based on the lossless user-mode driver framework. Compatible with OpenSSL 1.1.1a and later versions, it supports the synchronous and asynchronous mechanisms. Currently, KAE supports the following algorithms: ● Digest algorithms SM3 and MD5, supporting asynchronous models. ● Symmetric encryption algorithm SM4, supporting asynchronous models and CTR, XTS, CBC, ECB, and OFB modes. ● Symmetric encryption algorithm AES, supporting asynchronous models and ECB, CTR, XTS, and CBC modes. ● Asymmetric algorithm RSA,
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages55 Page
-
File Size-