Rate This Document
Findability
Accuracy
Completeness
Readability

Supported Algorithms

This section describes the algorithms and models supported by the KAE encryption and decryption, KAEZlib, KAEZstd, and KAELz4 modules.

KAE Encryption and Decryption

The KAE encryption and decryption module uses the Kunpeng hardware acceleration engine to implement the RSA, SM2, SM3, SM4, DH, MD5, and AES algorithms. It provides high-performance symmetric and asymmetric encryption and decryption based on the lossless user-space driver framework. It is compatible with OpenSSL 1.1.1x, OpenSSL 3.0.x, Tongsuo 8.4.0, and BoringSSL, and supports synchronous and asynchronous mechanisms.

  • OpenSSL 1.1.1x 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, OFB, CFB, and CBC modes
    • Asymmetric algorithm RSA, supporting asynchronous models and key sizes 1024, 2048, 3072, and 4096
    • Asymmetric algorithm SM2, supporting the asynchronous mode
    • Key negotiation algorithm DH, supporting asynchronous models and key sizes 768, 1024, 1536, 2048, 3072, and 4096
  • OpenSSL 3.0.x offers encryption and decryption algorithm implementations through the engine mechanism and supports the SM3, MD5, SM4, AES, and RSA algorithms.
  • Tongsuo 8.4.0 offers encryption and decryption algorithm implementations through the engine mechanism and supports the SM3, SM4, AES, and RSA algorithms.
  • BoringSSL offers encryption and decryption algorithm implementations through the engine mechanism and supports the RSA algorithm (private key encryption and decryption).
  • Only OpenSSL 1.1.1x supports the asymmetric algorithm SM2 and key negotiation algorithm DH.
  • The provider mechanism and later OpenSSL versions are not supported.
  • Tongsuo is an encryption and decryption library derived from OpenSSL. Its interfaces and usage comply with OpenSSL.
  • BoringSSL is an open source encryption library developed and maintained by Google based on earlier OpenSSL versions. Some interfaces and usage are different from those of OpenSSL. For details about how to use BoringSSL+KAE, see Using BoringSSL to Call KAE.

KAEZlib

KAEZlib is a compression module of KAE. It uses the Kunpeng hardware acceleration module to implement the Deflate algorithm and works with the lossless user-mode driver framework to provide an interface for high-performance compression in gzip or zlib format.

  • It supports the zlib and gzip data formats, and complies with the RFC1950 and RFC1952 standards.
  • It supports the Deflate algorithm.
  • The compression level and window length can be configured.
  • It supports the synchronous mode.
  • The maximum compression bandwidth of a single processor (Kunpeng 920) is 7 GB/s, and the maximum decompression bandwidth is 8 GB/s.
  • The compression ratio is approximately equal to 2, which is the same as that of the zlib 1.2.11 interface.

KAE can be used to improve application performance in different scenarios. For example, in distributed storage scenarios, the KAEZlib library is used to accelerate data compression and decompression. In addition, the KAEGzip compression tool is provided based on the KAEZlib library, enabling you to compress and decompress files without calling APIs.

KAEZstd

KAEZstd is a compression module of KAE. It uses the Kunpeng hardware acceleration module to implement the lz77_zstd algorithm and provides the standard zstd library interface.

  • It allows general compression and decompression, but does not support the zstd dictionary mode or multi-thread mode.
  • It supports hardware-based acceleration for compression only, not decompression.
  • Both small packets (less than 64 KB) and large packets (greater than 1 GB) can be compressed.
  • The zstd compression level can be configured.

KAE can improve application performance in different scenarios and significantly enhances compression efficiency.

KAELz4

KAELz4 is a compression module of KAE. It uses the Kunpeng hardware acceleration module to implement the lz77_lz4 algorithm and provides the standard LZ4 library interface.

  • The lz4_block_format and lz4_frame_format formats are supported.
  • It supports hardware-based acceleration for compression only, not decompression.
  • Both synchronous and asynchronous modes are supported.