Skip to main content

Crate weirdnet_update

Crate weirdnet_update 

Source
Expand description

Weirdnet update metadata and client-side verification.

This crate holds the parts of an over-the-air update system that are not tied to an app or a UI toolkit (Salty Gull builds on it):

  • root: an org root of k-of-n Ed25519 keys, pinned into the app by its RootPin, that delegates release keys and names 0 or more timestamp keys. Org roots are independent keys, not Weirdnet user keys.
  • manifest: the signed UpdateManifest and its UpdateKind (assets, Wasm, full signed package, Dart patch placeholder, store notice).
  • freshness: optional short-lived timestamp records that block freeze attacks and carry revocations.
  • envelope: domain-separated signing over the exact CBOR bytes.
  • verify: the client acceptance rule and ClientState anti-rollback.
  • target and rollout: targeting rules and staged rollouts, evaluated on the device.
  • policy: the opt-in consent policy. Updates are never forced.
  • health: boot counting and automatic local rollback.
  • announce: signed update announcements, carried by relays to devices behind NAT.

Re-exports§

pub use announce::Announcement;
pub use bytes::Hash32;
pub use envelope::Domain;
pub use envelope::Signed;
pub use error::Error;
pub use error::Result;
pub use freshness::Freshness;
pub use keys::PublicKey;
pub use keys::Signature;
pub use keys::SigningKey;
pub use manifest::FileEntry;
pub use manifest::UpdateKind;
pub use manifest::UpdateManifest;
pub use policy::ConsentMode;
pub use policy::Decision;
pub use policy::Flavor;
pub use policy::Policy;
pub use root::Delegation;
pub use root::Root;
pub use root::RootPin;
pub use state::ClientState;
pub use time::Timestamp;
pub use verify::Client;
pub use verify::UpdateBundle;
pub use verify::VerifiedUpdate;
pub use verify::VerifyOptions;

Modules§

announce
Update announcements: small signed notices that a new manifest exists, carried by relays so devices behind NAT hear about updates.
bytes
Fixed-size byte values that travel as lowercase hex strings.
envelope
Signed envelopes.
error
Errors. None of them carry key material.
freshness
Optional timestamp records.
health
Boot health and automatic local rollback.
keys
Ed25519 keys and signatures.
manifest
Update manifests and update kinds.
policy
Opt-in consent policy. Updates are never forced.
rollout
Staged rollouts.
root
Org roots: the client’s root of trust.
state
Client anti-rollback state, persisted by the app.
target
On-device targeting rules.
time
Seconds since the Unix epoch, UTC.
verify
The client acceptance rule.