Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
multi-vlad
Verifiable Long-Lived Address (VLAD) implementation: a combined Multisig whose message holds the WASM first-lock bytecode and whose signature is by an ephemeral key pair.
A Vlad is a newtype over a combined Multisig. The Multisig message field holds the binary WASM of a first-lock script. The signature is over that script, signed by an ephemeral key pair. The Vlad validates that the inner Multisig is combined (non-empty message) and that the message begins with the \0asm WASM magic bytes.
The goal is to avoid the anti-pattern of using public keys as identifiers. Public keys are subject to compromise and rotation, so identifiers derived from key material become invalid when keys change. A Vlad replaces the public-key identifier with a random identifier (the signature bytes) plus a cryptographic commitment to a validation function (the WASM script).
This crate contains only the Vlad half of the former bs-multicid workspace crate. The Cid half lives in the standalone multi-cid crate. The split lets a downstream crate depend on only the type it needs: multi-vlad depends on multi-key and multi-sig but not on multi-hash, which was only required by Cid.
Table of Contents
- Features
- Install
- Usage
- Feature Flags
- The Split from
bs-multicid - Testing
- Maintainers
- Contribute
- License
Features
Vladnewtype over a combinedMultisig.- Builder pattern for
Vladfrom a signing key and a WASM message. - WASM validation: rejects messages that do not begin with the
\0asmmagic bytes. - Combined-signature validation: rejects detached signatures (empty message).
verify()against the signing key viamulti-keyandmulti-sig.- Multibase encoding via
multi-baseandmulti-util.EncodedVladdetects the encoding on decode and always encodes toBase32Lower. - Serde integration under the
serdefeature. Human-readable formats give a struct with amultisigfield; binary formats give the raw bytes. - DAG-CBOR support under the
dag_cborfeature viamulti-cbor.
Install
Add this to your Cargo.toml:
[]
= "0.1"
MSRV: Rust 1.95 (required by multi-key).
Usage
use Builder;
use EncodedMultikey;
let mk = try_from.unwrap.to_inner;
let msg = vec!; // WASM magic + version
let vlad = default
.with_signing_key
.with_message
.try_build
.unwrap;
// verify the Vlad against the signing key
vlad.verify.unwrap;
// round-trip through bytes
let bytes: = vlad.clone.into;
let decoded = try_from.unwrap;
assert_eq!;
Feature Flags
| Feature | Default | Effect |
|---|---|---|
serde |
yes | Enables serde serialization for Vlad. |
dag_cbor |
yes | Enables CBOR support for Vlad via multi-cbor. |
xmss |
yes | Enables XMSS post-quantum signature support via multi-key. |
Examples
-
examples/ed25519.rs— Build and verify a Vlad with a random Ed25519 ephemeral key pair. Runnable: -
examples/xmss.rs— Build and verify a Vlad with an XMSS-SHA2_10_256 post-quantum ephemeral key pair. XMSS is a stateful hash-based scheme: a single key can sign a bounded number of messages (2^h for height h), which is necessary for a Vlad because the same ephemeral key must sign both the Vlad and the first provenance-log entry. Runnable:
The Split from bs-multicid
The former bs-multicid workspace crate contained two types: Cid and Vlad. These types do not import from each other. They have disjoint dependency sets:
Cidneedsmulti-hashfor theMultihashfield.Vladneedsmulti-keyandmulti-sigfor the innerMultisig.
Splitting the crate lets a downstream crate depend on only the type it needs. For example, wacc needs Cid but not Vlad, so wacc does not pull in multi-key or multi-sig.
The multi-vlad crate is the Vlad half. The multi-cid crate is the Cid half. Vlad does not depend on wacc or multi-hash. The WASM is opaque bytes; the code validates it only by the \0asm magic header. The Script type lives in provenance-log, not wacc.
Testing
Maintainers
- Dave Grantham dwg@linuxprogrammer.org
Contribute
Pull requests go to the cryptidtech/multi-vlad
repository. Sign commits with GPG. Use Conventional Commits messages.
License
Licensed under Apache-2.0.
See LICENSE for the full text.