Skip to content

Commit

Permalink
update kae version to 1.3.6 (#10)
Browse files Browse the repository at this point in the history
* update version to 1.3.6
  • Loading branch information
mystery-nobody authored Jun 24, 2020
1 parent 7db32bc commit 5d52c2f
Show file tree
Hide file tree
Showing 32 changed files with 400 additions and 143 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ scripts:
- sudo make install -j20

- cd ../
- wget https://github.com/kunpengcompute/KAEdriver/releases/download/v1.2.10/Kunpeng_KAE_driver-1.2.10.tar.gz
- tar -zxf Kunpeng_KAE_driver-1.2.10.tar.gz
- cd Kunpeng_KAE_driver/warpdrive
- git clone https://github.com/kunpengcompute/KAEdriver.git
- cd KAEdriver/warpdrive
- sudo sh autogen.sh
- sudo ./configure
- sudo make
Expand All @@ -29,4 +28,4 @@ scripts:
- sudo ./configure
- sudo make clean
- sudo make


6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ENGINE_INSTALL_PATH := $(OPENSSL_WORK_PATH)/lib/engines-1.1
CC=gcc

LIBNAME := libkae.so
VERSION = 1.2.10
VERSION = 1.3.6
TARGET = ${LIBNAME}.${VERSION}
SOFTLINK = kae.so

Expand Down Expand Up @@ -51,7 +51,7 @@ INCDIR += -I $(OPENSSL_WORK_PATH)/include

# Include Libs.
LIBDIR := -L$(OPENSSL_WORK_PATH)/lib
LIBDIR += -L$(WORK_PATH)/../drivers/warpdrive/.libs
LIBDIR += -L/usr/lib64
LIBS := -lcrypto -lwd -pthread
LIBS += -lc_nonshared

Expand Down Expand Up @@ -86,7 +86,7 @@ objs : $(OBJS)

$(TARGET): $(OBJS)
@echo Linking $@
$(SILENCE) $(CC) $(CFLAGS) $(INCDIR) $(LDFLAGS) -o ./$(TARGET) $(OBJS)
$(SILENCE) $(CC) $(CFLAGS) $(INCDIR) -o ./$(TARGET) $(OBJS) $(LDFLAGS)
-@objcopy --only-keep-debug ./$(TARGET) $(TARGET).symbol
-@strip ./$(TARGET)
rebuild: clean all
Expand Down
35 changes: 25 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Kunpeng Acceleration Engine includes symmetric encryption, asymmetric encryption
So far, the algorithms supported by Kunpeng Acceleration Engine are:

- Asymmetric encryption algorithm: RSA Support Key Sizes 1024/2048/3072/4096
- Digest algorithm: SM3
- Block cipher algorithm: SM4 Support CTR/XTS/CBC
- Digest algorithm: SM3/MD5
- Block cipher algorithm: SM4 Support CTR/XTS/CBC/ECB/OFB
- Block cipher algorithm: AES Support CTR/XTS/CBC/ECB
- Key exchange algorithm: DH Support 768bit/1024bit/1536bit/2048bit/3072bit/4096bit

Expand All @@ -48,6 +48,11 @@ It is licensed under the [APACHE LICENSE, VERSION 2.0](https://www.apache.org/l
* SuSE 15.1 4.12.14-195-default arch64 version
* NeoKylin 7.6 4.14.0-115.5.1.el7a.06.aarch64 version
* EulerOS 2.8 4.19.36-vhulk1907.1.0.h410.eulerosv2r8.aarch64 version
* BCLinux-R7-U6-Server-aarch64 version
* Kylin 4.0.2 (juniper) 4.15.0-70-generic version
* Kylin release 4.0.2 (SP2) 4.19.36-vhulk1907.1.0.h403.ky4.aarch64 version
* UniKylin Linux release 3(Core) 4.18.0-80.ky3.kb21.hw.aarch64 version
* Ubuntu 18.04.1 LTS 4.15.0-29-generic version
* OpenSSL 1.1.1a or later OpenSSL

## Installation Instructions
Expand Down Expand Up @@ -78,7 +83,7 @@ Clone the Github repository containing the Kunpeng Accelerator Engine:

Download the release version of Kunpeng Accelerator Engine Driver from:

<https://github.com/kunpengcompute/KAEdriver>
<https://github.com/kunpengcompute/KAEdriver/releases>

Firstly, build and install the accelerator driver:
Note: To build the Kunpeng Accelerator Engine Driver, install the `kernel-devel` package first.
Expand Down Expand Up @@ -151,21 +156,22 @@ Here is an example to show you how to use the Kunpeng Accelerator Engine.
/* OpenSSL headers */
#include <openssl/bio.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/engine.h>
int main(int argc, char **argv)
{
/* Initializing OpenSSL */
SSL_load_error_strings();
ERR_load_BIO_strings();
OpenSSL_add_all_algorithms();
/*You can use ENGINE_by_id Function to get the handle of the Kunpeng Accelerator Engine*/
/* You can use ENGINE_by_id Function to get the handle of the Kunpeng Accelerator Engine */
ENGINE *e = ENGINE_by_id("kae");
ENGINE_init(e);
/* Set the default RSA algorithms computed by KAE engine, more usage methods about ENGINE_set_default, please refer to OpenSSL official website */
ENGINE_set_default_RSA(e);
/*The user code To Do */
...
Expand Down Expand Up @@ -206,15 +212,24 @@ Here is an example to show you how to set up the `openssl.cnf` file to load en
engine_id = kae
dynamic_path = /usr/local/lib/engines-1.1/kae.so

Export the environment variableas `OPENSSL_CONF` as follows :

```
export OPENSSL_CONF=/home/app/openssl.cnf
```

By loading the openssl configuration file, the user application does not need to modify any code, except for loading KAE through the following API during initialization.

```
OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL);
```

## More Information

For further assistance, contact Huawei Support at:

<https://support.huawei.com>

<https://www.huaweicloud.com/kunpeng/software/accelerator.html>

## Copyright

Copyright © 2018 Huawei Corporation. All rights reserved.
Copyright © 2018 Huawei Corporation. All rights reserved.
Loading

0 comments on commit 5d52c2f

Please sign in to comment.