Skip to content

kentakayama/libcsuit

Repository files navigation

OTA Update using libcsuit

libcsuit is a C library for encoding and decoding IETF SUIT manifests. The manifest contains meta-data about the firmware image. The manifest is protected against modification and provides information about the software/firmware author.

For more information on how the IETF SUIT manifest is used to protect firmware updates of IoT devices, please look at the IETF SUIT architecture document and the IETF SUIT working group.

Supported features are:

  • Processing & Reporting: Parse and Execute a SUIT Manifest, and Generate a SUIT Report (see examples/process)
  • Parsing: Parse and Print a SUIT Manifest (see examples/parser)
  • Signing Manifest: Sign/MAC a SUIT Manifest (see examples/sign)
  • Encrypting & Decrypting a Payload: Encrypt a payload to generate a SUIT_Encryption_Info and ciphertext (see examples/encrypt)
  • Encoding: Encode a (signed) SUIT Manifest (see examples/encode)

See SUPPORTED.md for each supported fundamental functions.

For encoding and signing SUIT Manifests, try suit-manifest-generator which is much kind to human being.

Tested SUIT Manifests are found in testfiles/README.md

Overview

This implementation uses

This implementation offers the functionality defined in

Example programs are offered for testing.

Getting started

git clone --recursive https://github.com/kentakayama/libcsuit
cd ./libcsuit

or

git clone https://github.com/kentakayama/libcsuit
cd ./libcsuit
git submodule update --init --recursive

We recommend option (a) and (b), using docker not to modify your system. The process sample program is expected to be run on IoT devices and TEE environments.

(a) Use OpenSSL

docker build -t libcsuit_ossl -f ossl.Dockerfile .
docker run -t libcsuit_ossl ./examples/process/suit_manifest_process ./testfiles/suit_manifest_exp0.cbor

(b) Use Mbed TLS

docker build -t libcsuit_psa -f psa.Dockerfile .
docker run -t libcsuit_psa ./examples/process/suit_manifest_process ./testfiles/suit_manifest_exp0.cbor

(c) Build and run natively

make -C examples/process
./examples/process/suit_manifest_process ./testfiles/suit_maniefst_exp0.cbor

See SUIT Manifest Example 0 and SUIT Manifest Processor's output.

If you want to install libcsuit to your system, see INSTALL.md

License and Copyright

BSD 2-Clause License

Copyright (c) 2020-2026 SECOM CO., LTD. All Rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors