sigil (0.1.0)

Published 2026-03-08 12:47:26 +00:00 by faicel in homeiot/sigil

Installation

[registries.forgejo]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add sigil@0.1.0 --registry forgejo

About this package

sigil

no_std Rust library for secure device communication over LoRa: messaging, encryption, init flows, key derivation, and events.


What is a Sigil?

Sigil (from Latin sigillum, “seal”) traditionally denotes a symbol or mark that represents an identity, intent, or authority—like a seal on a document. In this project, sigil is the “seal” of your device stack: the layer that defines how devices identify, authenticate, and exchange encrypted messages over LoRa. The crate provides the communication primitives (init, keys, crypto, events) so that each device can act as a distinct, recognizable identity in the network—hence the name.


Features

  • com — Communication over LoRa: read/write of encrypted messages, header validation, key callbacks.
  • models — Shared message and protocol models (e.g. MessageSchema, events, init request/response).

Build with default features or enable only what you need.


Usage

Add to your Cargo.toml (adjust registry and version as needed):

[dependencies]
sigil = { version = "0.1", registry = "forgejo", default-features = false, features = ["com"] }

Example: read and decrypt a message with Sigil::read, using your own header validation and key lookup:

use sigil::Sigil;

// With a LoRa controller, delay, and callbacks for header validation and key lookup:
let msg = Sigil::read(
    &mut lora,
    &mut delay,
    |header| { /* validate header */ true },
    |msg_type, source| { /* return Some(key) or None */ None },
    timestamp,
)?;

See the public API docs and com::init, com::keys, and crypto modules for encryption, key derivation (e.g. HKDF via KeyManager), and init flows.


Project structure

sigil/
├── src/
│   ├── lib.rs
│   ├── com/           # Communication over LoRa
│   │   ├── init/      # Init flows (gateway, sensor)
│   │   ├── keys/      # Key management (e.g. KeyManager, HKDF)
│   │   ├── event/     # Event handling
│   │   └── error/
│   ├── models/        # Shared message and protocol models
│   │   └── common/
│   └── crypto/        # ChaCha20-Poly1305 encrypt/decrypt
├── scripts/
│   └── test.sh        # Runs cargo test
├── Cargo.toml
├── LICENSE
└── README.md

Status

Early development. API may change. Suitable for evaluation and integration in embedded LoRa stacks.


License

Personal Use Only — Non-Commercial. See LICENSE for full terms and disclaimers.

Dependencies

ID Version
bincode ^2.0
chacha20poly1305 ^0.10.1
embedded-hal ^1.0.0
heapless ^0.8
hkdf ^0.12
lora ^0.1
lzss ^0.9.1
sha2 ^0.10
embedded-hal-mock ^0.11.1
lora ^0.1
Details
Cargo
2026-03-08 12:47:26 +00:00
19
30 KiB
Assets (1)
Versions (2) View all
0.1.1 2026-03-12
0.1.0 2026-03-08