MCUXpresso SDK Documentation

hashcrypt

hashcrypt#

Overview#

The Hashcrypt Example project is a demonstration program that uses the KSDK software to encrypt plain text and decrypt it back using AES and SHA algorithm. SHA-1, SHA-256, AES ECB and AES CBC modes are demonstrated.

Supported Boards#

EVK-MIMXRT595
Hardware requirements
  • Micro USB cable

  • EVK-MIMXRT595 board

  • Personal Computer

Board settings
Prepare the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J40) on the board

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the hello world demo in the terminal window:

AES ECB Test pass
AES CBC Test pass
AES CTR Test pass
SHA-1 Test pass
SHA-256 Test pass
EVK-MIMXRT685
Hardware requirements
  • Micro USB cable

  • EVK-MIMXRT685 board

  • Personal Computer

Board settings
Prepare the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J5) on the board

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the hashcrypt example in the terminal window:

AES ECB Test pass
AES CBC Test pass
AES CTR Test pass
SHA-1 Test pass
SHA-256 Test pass
FRDM-MCXW23
Hardware requirements
  • Type-C USB cable

  • FRDM-MCXW23 Board

  • Personal Computer

Board settings
Prepare the Demo
  1. Connect a USB cable between the host PC and the FRDM board J10.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal:

AES CBC Test pass
AES CTR Test pass
AES OFB Test pass
AES CFB Test pass
SHA-1 Test pass
SHA-256 Test pass
Hashcrypt reload feature pass
LPCXpresso55S06
Hardware requirements
  • Mini/micro USB cable

  • LPCXpresso55S06 board

  • Personal Computer

Board settings
Prepare the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (P6) on the board

  2. Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

After the board is flashed the Tera Term will print message on terminal.

Example output:

AES ECB Test pass
AES CBC Test pass
AES CTR Test pass
SHA-1 Test pass
SHA-256 Test pass
LPCXpresso55S16
Hardware requirements
  • Mini/micro USB cable

  • LPCXpresso55S16 board

  • Personal Computer

Board settings

The jumper setting: Default jumpers configuration does not work, you will need to add JP20 and JP21 (JP22 optional for ADC use)

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (P6) on the board

  2. Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

After the board is flashed the Tera Term will print message on terminal.

Example output:

AES ECB Test pass
AES CBC Test pass
AES CTR Test pass
SHA-1 Test pass
SHA-256 Test pass
LPCXpresso55S28
Hardware requirements
  • Mini/micro USB cable

  • LPCXpresso55S28 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo

Note: MCUXpresso IDE project default debug console is semihost

  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (P6) on the board

  2. Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

After the board is flashed the Tera Term will print message on terminal.

Example output:

AES ECB Test pass
AES CBC Test pass
AES CTR Test pass
SHA-1 Test pass
SHA-256 Test pass
LPCXpresso55S69
Hardware requirements
  • Mini/micro USB cable

  • LPCXpresso55s69 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo

Note: MCUXpresso IDE project default debug console is semihost

  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (P6) on the board

  2. Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

After the board is flashed the Tera Term will print message on terminal.

Example output:

AES ECB Test pass
AES CBC Test pass
AES CTR Test pass
SHA-1 Test pass
SHA-256 Test pass
MIMXRT685-AUD-EVK
Hardware requirements
  • Micro USB cable

  • MIMXRT685-AUD-EVK board

  • Personal Computer

Board settings
Prepare the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J5) on the board

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the hashcrypt example in the terminal window:

AES ECB Test pass
AES CBC Test pass
AES CTR Test pass
SHA-1 Test pass
SHA-256 Test pass
MCXW23-EVK
Hardware requirements
  • Mini/micro USB cable

  • MCXW23-EVK Board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a USB cable between the host PC and the EVK board J33.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

When the example runs successfully, the following message is displayed in the terminal:

AES CBC Test pass
AES CTR Test pass
AES OFB Test pass
AES CFB Test pass
SHA-1 Test pass
SHA-256 Test pass
Hashcrypt reload feature pass