{"id":28615519,"url":"https://github.com/siliconlabssoftware/utils-rps","last_synced_at":"2025-06-12T02:09:16.829Z","repository":{"id":297177509,"uuid":"982236621","full_name":"SiliconLabsSoftware/utils-rps","owner":"SiliconLabsSoftware","description":"RPS image creation and conversion tools","archived":false,"fork":false,"pushed_at":"2025-05-20T08:49:24.000Z","size":225,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-04T13:32:52.237Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SiliconLabsSoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-12T15:16:46.000Z","updated_at":"2025-06-03T19:58:22.000Z","dependencies_parsed_at":"2025-06-04T13:32:57.765Z","dependency_job_id":"3dd3547f-42d6-495b-ae3f-9c694d928e8a","html_url":"https://github.com/SiliconLabsSoftware/utils-rps","commit_stats":null,"previous_names":["siliconlabssoftware/utils-rps"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/SiliconLabsSoftware/utils-rps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiliconLabsSoftware%2Futils-rps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiliconLabsSoftware%2Futils-rps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiliconLabsSoftware%2Futils-rps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiliconLabsSoftware%2Futils-rps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SiliconLabsSoftware","download_url":"https://codeload.github.com/SiliconLabsSoftware/utils-rps/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiliconLabsSoftware%2Futils-rps/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259382323,"owners_count":22848842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-12T02:09:11.771Z","updated_at":"2025-06-12T02:09:16.762Z","avatar_url":"https://github.com/SiliconLabsSoftware.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RPS Image Creation and Conversion Tools\n\n[![Tests](https://github.com/SiliconLabsSoftware/utils-rps/actions/workflows/unittest.yml/badge.svg)](https://github.com/SiliconLabsSoftware/utils-rps/actions/workflows/unittest.yml)\n\n_Create and convert RPS images for Silicon Labs SiWx91x devices in a breeze!_\n\n## Introduction\n\nSiWx91x devices require application images to be converted into RPS images before they can be flashed to the device. The conversion from an application binary to an RPS image includes prepending a header to the application image. This header adds certain metadata to the application, including version numbers, control flags, size information, as well as other instructions to the device's bootloader.\n\nThe `rps-create` tool can be used to create RPS images from M4 application binaries, including adding security features like encryption and signing. By default, a CRC protects the RPS' integrity, however MIC protection can be used instead.\n\nThe `rps-convert` tool can be used to convert _existing_ unsigned/unencrypted (M4 or NWP) RPS images into signed/encrypted RPS images. Changing into MIC integrity protection is also available.\n\n## Requirements\n\nThis tool was developed using Python 3.10. Required PyPI packages are:\n\n- `intelhex`, for parsing Intel HEX-formatted (.hex) application images\n- `pycryptodome`, for encryption functionality\n\n## Installation\n\n```console\npip install silabs-rps\n```\n\n## Usage\n\nHelp text along with descriptions of each option can be shown by providing the `-h` or `--help` flags.\n\n### Create RPS Images\n\n```console\nrps-create \u003coutput filename\u003e --app \u003cfilename\u003e \n        [--map \u003cfilename\u003e] [--address \u003caddress\u003e] [--app-version \u003cversion\u003e] \n        [--fw-info \u003cfirmware info\u003e] [--sign \u003cfilename\u003e] [--sha \u003csize\u003e] \n        [--encrypt \u003cfilename\u003e] [--mic \u003cfilename\u003e] [--iv \u003cfilename\u003e] \n```\n\nAvailable options:\n\n- `\u003coutput filename\u003e` (_required_)\n  - Name of the output RPS image file\n- `--app \u003cfilename\u003e` (_required_)\n  - Name of the application filename to convert into RPS file. Must be in .bin or .hex format\n- `--map \u003cfilename\u003e` (_optional, but recommended if your application is to be placed in PSRAM_)\n  - Name of the map file (.map) from the compilation of the provided application. Used for determining flash start address\n- `--address \u003caddress\u003e` (_required if the application file provided with --app is a .bin file, optional otherwise_)\n  - Application start address. Both decimal and hexadecimal (prefixed by 0x) values are interpreted\n- `--app-version \u003cversion number\u003e` (_optional_)\n  - Application version number. Both decimal and hexadecimal (prefixed by 0x) values are interpreted\n- `--fw-info \u003cfirmware info\u003e` (_optional_)\n  - Additional version information. Both decimal and hexadecimal (prefixed by 0x) values are interpreted\n- `--sign \u003ckey filename\u003e` (_optional_)\n  - Sign the RPS image using the provided (NIST P-256) private key, and append the signature (72 bytes) to the RPS image. The key must be in .pem or .der format\n- `--sha \u003csize\u003e` (_optional_)\n  - Use SHA-\\\u003csize\\\u003e for signing the RPS image. Supported options are 256 (default), 384, and 512 bits\n- `--encrypt \u003ckey filename\u003e` (_optional_)\n  - Encrypt the application image using AES ECB encryption. Key must be 32 bytes, and must be formatted as .bin or .txt (as a string of hexadecimal characters)\n- `--mic \u003ckey filename\u003e` (_optional_)\n  - Use MIC (AES CBC-MAC) based integrity check instead of CRC to protect the RPS image. Key must be 32 bytes, and must be formatted as .bin or .txt (as a string of hexadecimal characters)\n- `--iv \u003civ filename\u003e` (_optional_)\n  - Custom initialization vector (IV) for the MIC calculation. IV must be 16 bytes, and must be formatted as .bin or .txt (as a string of hexadecimal characters). If no IV is provided, the default IV will be used.\n\n#### Usage Examples\n\nHere follows some examples on how to use `rps-create`.\n\n##### Create an RPS Image From a .bin Application Image Using CRC Integrity Protection\n\n```console\nrps-create my_rps.rps --app my_app.bin --address 0x08212000\n```\n\n##### Create an RPS Image From a .hex Application Image Using CRC Integrity Protection\n\nThe application start address is encoded in the file, so the `--address` option must be omitted.\n\n```console\nrps-create my_rps.rps --app my_app.hex\n```\n\n##### Create an RPS Image to be Placed in PSRAM\n\n```console\nrps-create my_rps.rps --app my_app.bin --address 0x0A012000 --map my_map.map\n```\n\nNote: The provided .map file must correspond to the provided application.\n\n##### Create an RPS Image With MIC Integrity Protection\n\n```console\nrps-create my_rps.rps --app my_app.hex --mic my_key.txt --iv my_iv.txt\n```\n\nNote: The provided MIC key must match the `M4_OTA_KEY` stored on the device for the device to be able to verify the MIC.\n\n##### Create an Encrypted RPS Image\n\n```console\nrps-create my_rps.rps --app my_app.hex --encrypt my_key.txt\n```\n\nNote: The provided encryption key must match the `M4_OTA_KEY` stored on the device for the device to be able decrypt the RPS image.\n\n##### Create a Signed RPS Image, Using SHA-384 Hashing\n\n```console\nrps-create my_rps.rps --app my_app.hex --sign my_private_key.pem --sha 384\n```\n\nNote: The provided private key must match the `M4_PUBLIC_KEY` stored on the device for the device to be able to verify the signature of the RPS image.\n\n### Convert RPS Images\n\n```console\nrps-convert \u003coutput filename\u003e --rps \u003cfilename\u003e \n        [--sign \u003cfilename\u003e] [--sha \u003csize\u003e]\n        [--encrypt \u003cfilename\u003e] \n        [--mic \u003cfilename\u003e] [--iv \u003cfilename\u003e]\n```\n\nAvailable options:\n\n- `\u003coutput filename\u003e` (_required_)\n  - Name of the output RPS image file\n- `--rps \u003cfilename\u003e` (_required_)\n  - Name of the application filename to convert into RPS file. Must be in .bin or .hex format\n- `--sign \u003ckey filename\u003e` (_optional_)\n  - Sign the RPS image using the provided (NIST P-256) private key, and append the signature (72 bytes) to the RPS image. The key must be in .pem or .der format\n- `--sha \u003csize\u003e` (_optional_)\n  - Use SHA-\\\u003csize\\\u003e for signing the RPS image. Supported options are 256 (default), 384, and 512 bits\n- `--encrypt \u003ckey filename\u003e` (_optional_)\n  - Encrypt the application image using AES ECB encryption. Key must be 32 bytes, and must be formatted as .bin or .txt (as a string of hexadecimal characters)\n- `--mic \u003ckey filename\u003e` (_optional_)\n  - Use MIC (AES CBC-MAC) based integrity check instead of CRC to protect the RPS image. Key must be 32 bytes, and must be formatted as .bin or .txt (as a string of hexadecimal characters)\n- `--iv \u003civ filename\u003e` (_optional_)\n  - Custom initialization vector (IV) for the MIC calculation. IV must be 16 bytes, and must be formatted as .bin or .txt (as a string of hexadecimal characters). If no IV is provided, the default IV will be used.\n\n#### Usage Examples\n\nHere follows some examples on how to use `rps-convert`.\n\n##### Sign RPS Image\n\n```console\nrps-convert my_signed_rps.rps --rps my_rps.rps --sign my_key.pem\n```\n\n##### Encrypt RPS Image\n\n```console\nrps-convert my_encrypted_rps.rps --rps my_rps.rps --encrypt my_key.bin\n```\n\n##### Enable MIC Integrity Protection in RPS Image\n\n```console\nrps-convert my_mic_rps.rps --rps my_rps.rps --mic my_key.bin --iv my_iv.bin\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiliconlabssoftware%2Futils-rps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiliconlabssoftware%2Futils-rps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiliconlabssoftware%2Futils-rps/lists"}