Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.67 KB

README.md

File metadata and controls

55 lines (40 loc) · 1.67 KB

libhydrogen-wasm

This repository is used for generating a LibHydrogen Web Assembly. It forms part of a wider project that utilises the digital signing of JSON models produced by the Configured Things platform to securely supply configuration updates to IoT devices running on the CHERIoT platform.

Funding for this activity was provided by the UKRI Digital Security by Design program.

Tip

Documentation imagery can be rebuilt using docker compose:

docker compose -f src/documentation/documentation.yaml up

libHydrogen wasm compilation

Tip

This repository utilises submodules, therefore when cloning use the following syntax:

git clone --recursive  [email protected]:ConfiguredThings/dsbd-sonata.git

After checking out a branch with different submodule uses:

git submodule update --init --recursive

Run the following from the top level directory to setup husky for linting

  1. npm install

Run the following commands to build and run a container in which the wasm library is built.

  1. cd src/backend/crypt
  2. npm install

To run a set of examples that call into the wasm library demonstrating its functionality, run the following:

  1. cd src/backend/crypt
  2. npm run examples

To generate a set of signing key files that can be used in JS and C, run the following:

  1. cd src/backend/crypt
  2. npm run gen_signing_keys -- config

will generate files

build/
└── keys/
    ├── config.pri
    ├── config_pri_key.h
    ├── config.pub
    └── config_pub_key.h