|
|
||
|---|---|---|
| .. | ||
| rsapss_sign_verify | ||
| README.md | ||
README.md
wolfCrypt Examples on Renesas RH850
This repository contains the Renesas RH850 examples.
Building wolfCrypt and sample code
Before you begin, make sure you have the necessary tools and libraries installed.
Tools and Libraries
| Tool/Library | Version | Description | |
|---|---|---|---|
| Board | Renesas RH850/F1KM-S4 | ||
| Device | DR7F701649 | ||
| Toolchain | V2.06.00 [28 Nov 2023] | CC-RH RH850 Family Compiler | |
| IDE | V8.11.00 [30 Nov 2023] | CS+ for CC | |
| Software Package | Y-ASK-RH850F1KM-S4-V3 Software Package |
Prepare boot.asm, cstart.asm and iodefine.h
- Open CS+
- Menu
File->Create New Project. SelectR7F01649. InputDummy_Projectas project name. ClickCreatebutton. - Copy
boot.asm,cstart.asmandiodefine.htowolfssl-examples\Renesas\cs+\RH850\rsapss_sign_verify
Prepare modules and peripherals by Y-ASK-RH850F1KM-S4-V3 Software Package
- Download the package from https://www.renesas.com/en/document/sws/y-ask-rh850f1km-s4-v3-software-package?r=1261056
- Unzip the package
- Copy the folder
Y-ASK-RH850F1KM-S4-V3_sample_V101\source\modules and peripheralsto the folder<wolfssl-examples>\Renesas\cs+\RH850 - Copy the folder
Y-ASK-RH850F1KM-S4-V3_sample_V101\device\r_typedefs.h, r_device.h, intVecNumF1KM.h and dr7f701649.dvf.hto the folder<wolfssl-examples>\Renesas\cs+\RH850
Build RSA PSS Sign and Verify Sample
-
Open CS+ project file under
<wolfssl-examples>\Renesas\cs+\RH850\rsapss_sign_verify\rh850_rsapss_sign.mtpj -
Modify
boot.asm2-1. UncommentUSE_TABLE_REFERENCE_METHODso that the sample program is able to use table reference for interrupt 2-2. Changesection "EINTTBL", constas follows:.section "EIINTTBL", const .align 512 .offset (0x22*4) .dw #_INTRLIN30UR0 .offset (0x51*4) .dw #_INTTAUJ0I1 .offset (0x54*4) .dw #_INTCOSTM0 ;.dw #_Dummy_EI ; INT0 ;.dw #_Dummy_EI ; INT1 ;.dw #_Dummy_EI ; INT2 ;.rept 512 - 0x54 ;.dw #_Dummy_EI ; INTn ;.endm2-3. Specify RAM addresses as follows:
GLOBAL_RAM_ADDR .set 0xFEEE8000 GLOBAL_RAM_END .set 0xFEEE7FFF LOCAL_RAM_ADDR .set 0xFEBC0000 LOCAL_RAM_END .set 0xFEBFFFFF -
Modify
cstart.asm3-1. ChangeSTACKSIZEfrom0x200to0XA000 -
Build project, Menu
Build->Build Project -
Download the project to target device,
Debug->Download...
The result can be observed through UART. Please connect to the cable to the board and open terminal with the following properties.
| baud rate | 9600 |
| data | 8 |
| parity | none |
| stop bit | 1 |
| flow control | none |
Example output
System Initializetion finish.
RSA Sign and Verify Example
Hashing message: This is the string to be signed
Signing hash of message
Hashing message: This is the string to be signed
Verify hash of message
RSA PSS verify success