Skip to main content

knowa_patch_format 2.2.0 copy "knowa_patch_format: ^2.2.0" to clipboard
knowa_patch_format: ^2.2.0 copied to clipboard

The signed container a Knowa code-push patch travels in, and the key revocation record: one byte layout shared by the Knowa toolchain and knowa_sdk.

knowa_patch_format #

The byte layout of a signed Knowa code-push patch, and of a key revocation record.

You do not depend on this package directly. knowa_sdk reads these formats on the device, and the Knowa CLI writes them. It is its own package so that both agree, byte for byte, on what is signed.

magic "KNOWA" | format version | metadata length | metadata (JSON) | Ed25519 signature (64) | payload
  • The signature covers metadata || payload, so metadata cannot be moved to another payload or edited without invalidating it.
  • Metadata is verified exactly as stored and never re-serialised: JSON key order is not canonical, and re-encoding would change the signed bytes.
  • The metadata names the app, the build the patch was made for, the channel, a sequence number and, optionally, the one platform it may run on. knowa_sdk acts on those fields only after the signature has verified, so nobody without the key can choose the answer.
  • A revocation record, signed by a separate offline key, tells devices to stop trusting one patch-signing key.

Parsing never trusts its input: anything malformed raises PatchFormatException, which knowa_sdk treats as "no patch".

License #

BSD-3-Clause. See LICENSE.

0
likes
160
points
532
downloads

Documentation

API reference

Publisher

verified publisherknowalabs.com

Weekly Downloads

The signed container a Knowa code-push patch travels in, and the key revocation record: one byte layout shared by the Knowa toolchain and knowa_sdk.

Homepage

Topics

#code-push #ota-updates #ed25519 #signing

License

BSD-3-Clause (license)

Dependencies

crypto

More

Packages that depend on knowa_patch_format