Skip to content

Commit

Permalink
README update
Browse files Browse the repository at this point in the history
  • Loading branch information
embetrix committed Dec 14, 2024
1 parent 8c1e939 commit 9eb9f23
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@


# stm32mp-sign-tool

## Overview

The `stm32mp-sign-tool` is a utility for signing and verifying firmware images for STM32MP MPUs.
It uses ECDSA (Elliptic Curve Digital Signature Algorithm) to ensure the integrity and authenticity of the firmware.
The `stm32mp-sign-tool` is a utility for signing and verifying firmware images for STM32MP MPUs. It uses ECDSA (Elliptic Curve Digital Signature Algorithm) to ensure the integrity and authenticity of the firmware.

**Disclaimer:** This tool is entirely developed based on publicly available information of the [STM32 header format](https://wiki.st.com/stm32mpu/wiki/STM32_header_for_binary_files) and does not use reverse engineering or incorporate any proprietary code.
It does not implement all the functionalities of the [official ST Tools](https://wiki.st.com/stm32mpu/wiki/Signing_tool).
Use this utility with care, as it is not affiliated with nor endorsed by STMicroelectronics.
**Disclaimer:** This tool is entirely developed based on the [public specification](https://wiki.st.com/stm32mpu/wiki/STM32_header_for_binary_files) of the STM32 header format. It does not use reverse engineering or incorporate any proprietary code. Additionally, it does not implement all the functionalities of the [official ST Tools](https://wiki.st.com/stm32mpu/wiki/Signing_tool). Use this utility with care, as it is not affiliated with nor endorsed by STMicroelectronics.

## Features

- Sign/Verify firmware images with ECDSA (NIST P-256 or brainpool 256).
- Support of HSM Token (PKCS#11).
- Support for HSM Token (PKCS#11).
- Currently supports only STM32MP15x MPU firmware image headers.

## Requirements
Expand Down Expand Up @@ -52,39 +47,38 @@ ctest -V

### Sign a Firmware Image

Generate a ECDSA key:
Generate an ECDSA key:

```sh
openssl ecparam -name prime256v1 -genkey -out <private_key.pem>
```
Sign a firmware image, use the following command:

Sign a firmware image using the following command:

```sh
./stm32mp-sign-tool -k <private_key_file> -i <image.stm32> -o <image.stm32.signed>
```

### Sign a Firmware Image using a HSM Token

Generate a ECDSA key:
Generate an ECDSA key:

```sh
pkcs11-tool --pin <pin> --module <Module Path> --keypairgen --key-type EC:prime256v1 --id <KeyID> --label <KeyLabel>
```

Sign a firmware image, use the URI of the key:
Sign a firmware image using the URI of the key:

```sh
./stm32mp-sign-tool -v -k "pkcs11:object=<KeyLabel>" -p <pin> -i <image.stm32> -o <image.stm32.signed>
./stm32mp-sign-tool -v -k "pkcs11:object=<KeyLabel>" -p <pin> -i <image.stm32> -o <image.stm32.signed>
```

## License

This project is licensed under the terms of the **GNU General Public License v3 (GPLv3)**.
You are free to use, modify, and distribute this software under the conditions outlined in the GPLv3 license.
This project is licensed under the terms of the **GNU General Public License v3 (GPLv3)**. You are free to use, modify, and distribute this software under the conditions outlined in the GPLv3 license.

For more information about the GPLv3 license, refer to the [LICENSE](LICENSE) file in this repository or visit [GNU's official page](https://www.gnu.org/licenses/gpl-3.0.html).


## Contributor License Agreement (CLA)

By submitting a pull request to this repository, you agree to the following terms:
Expand Down

0 comments on commit 9eb9f23

Please sign in to comment.