1 (edited by Iyaps 2021-03-21 22:15:49)

Topic: Hardware Crypto Acceleration in Xilinx board with wolfSSL

Hi,

I want to use the hardware crypto acceleration encryption in xilinx board.
I have prepared user_settings.h with below macros.

#define HAVE_TLS_EXTENSIONS
#define HAVE_SUPPORTED_CURVES
#define HAVE_ECC
#define HAVE_HKDF
#define WC_RSA_PSS
#define WC_RSA_BLINDING
#define NO_MULTIBYTE_PRINT
#define WOLFSSL_RIPEMD
#define NO_PSK
#define HAVE_EXTENDED_MASTER
#define WOLFSSL_SNIFFER
#define HAVE_SECURE_RENEGOTIATION
#define HAVE_AESGCM
#define WOLFSSL_SHA384
#define WOLFSSL_SHA512
#define HAVE_SUPPORTED_CURVES
#define HAVE_TLS_EXTENSIONS
#define HAVE_ECC
#define ECC_SHAMIR
#define ECC_TIMING_RESISTANT

#define WOLFSSL_XILINX
#define NO_FILESYSTEM
#define USE_FAST_MATH
#define FREERTOS
#define WOLFSSL_LWIP
#define WOLFSSL_XILINX_CRYPT
#define WOLFSSL_AES_DIRECT

While running the Application, the code execution halts in XSecure_AesEncryptData function in the xil-aesgcm.c file. This file is available in wolfssl library. This file internally calls xil_secure library functions. XSecure_AesEncryptData calls XSecure_AesEncryptInit, XSecure_AesEncryptUpdate functions.

Here are the other details,
1. Board : ZCU102.
2. OS : FreeRTOS.
3. TCP/IP stack : LwIP.
4. WolfSSL version : 4.7.0.

Could you please tell me the reason for execution halts in the XSecure_AesEncryptData function?

Best regards,
Iyaps.

Share

Re: Hardware Crypto Acceleration in Xilinx board with wolfSSL

Hi Iyaps,

Have you called wolfSSL_Init() or wolfCrypt_Init() in your application code?
In your Xilinx BSP / Hardware Platform have you enable the xilsecure library?
Have you seen our Xilinx FreeRTOS/LWIP example here:
https://github.com/wolfSSL/wolfssl-examples/pull/155
https://github.com/JacobBarthelmeh/wolf … x/FreeRTOS

We also have some Xilinx tips here:
https://github.com/wolfSSL/wolfssl/tree … /XilinxSDK

Thanks,
David Garske, wolfSSL

Share

Re: Hardware Crypto Acceleration in Xilinx board with wolfSSL

Hi David,

Thank you for your reply.

>> Have you called wolfSSL_Init() or wolfCrypt_Init() in your application code?
    I called wolfSSL_Init in my application code.
>> In your Xilinx BSP / Hardware Platform have you enable the xilsecure library?
      Yes. xilsecure library enabled in the BSP settings.

I will try the examples you have mentioned and i will let you know the results.

Regards,
Iyaps.

Share