1. 飺
ṩopensslӺ˼Ӳ㷨Demo.

2. ֧㷨
֧TDES/AESԳƼӽܡHASHժҪRSAǶԳơȣо£
        NID_aes_128_ecb,
        NID_aes_192_ecb,
        NID_aes_256_ecb,
        NID_aes_128_cbc,
        NID_aes_192_cbc,
        NID_aes_256_cbc,
        NID_aes_128_cfb128,
        NID_aes_192_cfb128,
        NID_aes_256_cfb128,
        NID_aes_128_ofb128,
        NID_aes_192_ofb128,
        NID_aes_256_ofb128,
        NID_aes_128_ctr,
        NID_aes_192_ctr,
        NID_aes_256_ctr,
        NID_des_ede3_ecb,
        NID_des_ede3_cbc,
        NID_des_ede3_cfb64,
        NID_des_ede3_ofb64,
        NID_sha1, 
        NID_sha256
        RSA1024/2048/3072/4096,
        TRNG

3. ߰汾: openssl-1.0.2l

4. ˵
     openssl-1.0.2l
         apps
            Makefile        // ִļopensslʱӺ˼̬hi_cipher.so
         crypto
            evp
               evp_test.c  // EVPĬΪ˼Ӳ㷨
            rand
                randtest.c  // randĬΪ˼Ӳ㷨
         demos
            engines
                hisilicon   //˼Ӳ㷨
                    hi_mmz_api.h
                    hw_hisilicon.c
                    hw_hisilicon.ec
                    hw_hisilicon_err.c
                    hw_hisilicon_err.h
                    hw_hisilicon.h
                    Makefile
         test
             Makefile        //TestʱӺ˼̬hi_cipher.so

5. 
    tar -xzvf  openssl-1.0.2l.tar.gz
    cp -r pacth-hisilicon-himpp-engine/new/openssl-1.0.2l/*  openssl-1.0.2l/

    export LOCAL_OPENSSL_DIR=$(pwd)
    export CC=arm-himix200-linux-gcc
    export AR=arm-himix200-linux-ar
    export LD=arm-himix200-linux-ld
    export SDK_OUT_DIR=~/himpp_master/himpp/board/mpp/out/hi3516cv500/smp/a7_linux  //SDKreleaseĿ¼Ҫʵ޸

    cd openssl-1.0.2l
    ./Configure  --prefix=$LOCAL_OPENSSL_DIR/install shared linux-armv4
    
    make build_crypto
    make -C demos/engines/hisilicon gnu
    make install

    cp demos/engines/hisilicon/libhisilicon.so ../install/lib/engines/

6. 
    cd XXXXX/openssl                   //opensslĴ·, иĿ¼install
    export LOCAL_OPENSSL_DIR=XXXX      //Ŀ¼·ͱʱİװ·LOCAL_OPENSSL_DIRͬ
    export BOARD_OPENSSL_DIR=$(pwd)    //opensslĴ·, installĸĿ¼
    export SDK_OUT_DIR=/mnt/himpp_master/himpp/board/mpp/out/hi3516cv500/smp/a7_linux  //SDKreleaseĿ¼Ҫʵ޸

    mkdir -p $LOCAL_OPENSSL_DIR/install
    ln -s $BOARD_OPENSSL_DIR/install  $LOCAL_OPENSSL_DIR/install
    export LD_LIBRARY_PATH=/usr/local/lib:$LOCAL_OPENSSL_DIR/install/lib:$LOCAL_OPENSSL_DIR/install/lib/engines:$SDK_OUT_DIR/lib

    ִУ
    //insert ko
     cd $BOARD_OPENSSL_DIR/openssl-1.0.2l/test
    ./evp_test evptests.txt
    ./randtest

    cd $BOARD_OPENSSL_DIR/install/bin
    ./openssl speed aes-128-cbc -engine hisilicon -evp aes-128-cbc
    ./openssl speed sha1 -engine hisilicon -evp sha1
    ./openssl speed rsa1024 -engine hisilicon
    ./openssl speed rsa2048 -engine hisilicon
