Expand description
aethel-sdk: a Rust surface over aethel-core’s post-quantum identity primitives.
use aethel_sdk::{verify, Identity};
// The signing key is derived inside the embedded component from OS entropy
// and never enters this process.
let mut identity = Identity::generate()?;
let message = b"the message that was actually signed";
let signature = identity.sign(message)?;
// Ok(false) is "this signature does not verify". An Err means the input
// could not be processed at all. They are different answers: treating an
// error as "invalid" is what makes malformed input look like a failed check.
assert!(verify(identity.public_key(), message, &signature)?);
assert!(!verify(identity.public_key(), b"something else", &signature)?);
// The interoperable form of the public key, for a DID document.
println!("{}", identity.public_key_multibase());§Read this before the feature list
This crate is identity-only by default: post-quantum signing, sealed persistence, threshold recovery, and context-bound projections that are unlinkable across contexts.
Credentials are off by default, behind the experimental-credentials
feature, and should not be relied on. aethel-core’s SECURITY.md
records that the credential commitment does not hide what it commits to: a
presentation reveals every attribute it carries, disclosed or not, and two
presentations of one credential are linkable. Disclosed attributes are also
self-asserted, and a presentation cannot leave the process that made it.
Fixing that is a separate line of work, and until it lands the feature
exists so the work can continue in public, not for production use.
Fuller worked examples are in examples/ in the published package:
quickstart.rs (generate, sign, verify, persist, project) and
projection.rs. Run them with cargo run --example quickstart from a
checkout of the repository.
§Before you add this crate
This crate embeds a WebAssembly runtime. cargo add aethel-sdk pulls
wasmtime and Cranelift, roughly 120 crates, and a cold debug build takes
several minutes and produces a target directory over a gigabyte. That is
a one-time cost and it is not a hung build. Separately, the first
verification in a process pays a ~230 ms component compile; Verifier
exists so you can pay that at startup rather than on a caller’s request.
Host platforms only. wasmtime needs mmap and cannot itself be compiled to
wasm32-unknown-unknown, so this crate is scoped away from that target: it
will not build for a browser. The identity operations still all happen inside
WebAssembly; it is the runtime executing them that has to be native.
§What you are responsible for
Each of these can be got wrong while every call returns Ok:
- The sealing key is a single point of failure. Lose it and the identity is gone, including from a full set of recovery shares. It must be high-entropy key material, never a password.
- Keep the HTSS Merkle root apart from the shares. A store that holds both can substitute an entire recovery set.
- Projection randomness must be fresh and secret, and never derived from
the context.
Identity::project_atdoes this for you. - Entropy quality is yours. Generation is deterministic in its entropy, so weak entropy means a predictable identity, and the component cannot tell the difference.
Out of scope, stated plainly: there has been no third-party audit; side
channels above L1 (wasmtime, your allocator, your application) are not
covered; physical and hardware attacks are not covered; and the security of
the constructions rests on aethel-core’s stated assumptions rather than on
anything this crate’s tests can prove.
SECURITY-MODEL.md
is the long form of this section, with how each claim is checked. It ships
in this package, so it is in the crate you installed even when you are
reading these docs online.
§What runs today
The compiled aethel:core component is embedded in this crate, its integrity
is checked against a hash the package declares (artifact), and it loads
and executes in an embedded runtime (component).
It is the L1 boundary from the initiative charter: one WebAssembly artifact, embedded by every language, carrying every cryptographic operation. Nothing in this crate implements crypto, and nothing in this crate is allowed to.
On top of that, the following work end to end, and every one of them is
exercised by the test suite and by examples/quickstart.rs, which runs in
CI:
Identity::generateandIdentity::from_entropy, keys derived inside the component and never present in this processIdentity::sign, and the free functionidentity::verify(there is noIdentity::verify: verification needs only public material). ML-DSA-65Identity::export_sealedandIdentity::open_sealed, so an identity survives the processIdentity::split_for_recoveryandIdentity::recover_from_shares, authenticated 3-of-5 recovery over the canonical sealed identityIdentity::public_key_multibaseandpublic_key_from_multibase, W3C Multikey transport and decoding for ML-DSA-65 verification materialIdentity::sign_typedandverify_typed, typed signatures and verification usingpqc-sigtransport representationsIdentity::project_at, fresh, context-bound PLP projections
With the experimental-credentials feature, Identity::issue_credential,
Identity::present and verify_presentation are compiled in as well. They
run, and their tests pass in CI, but they are not safe to rely on: see the
top of this page.
§What is not on this surface
Callable through the component but not wrapped here: standalone PLP proof
(prove, plp-verify).
ROADMAP.md has the sequence.
§What is not built anywhere
- Key rotation. There is no way to bind an identity to a successor.
- Everything credential-shaped beyond the experimental feature: a
commitment that hides, issuer-authenticated issuance, two-party issuance,
revocation and expiry, and a way to prove a threshold over a hidden value.
That is the credential line of work, and the expected
1.0is identity plus credentials once it lands.
§A correction
Earlier versions of this comment said the ergonomic surface was “designed and
none of them is callable from this crate yet”, and that “SAAP selective
disclosure does not work in the embedded component” because saap-verify
denied unconditionally. Both were true once and neither is true now. The
credential tests, run in CI with --features experimental-credentials,
exercise those paths and pass. Passing is not the same as sound, which is why
the feature is off by default.
§The 0x307 crate family
aethel-sdk is one of six open-source crates from 0x307, held to one
audit and stability standard.
| Crate | Tier | What it does |
|---|---|---|
| pqc-sig | Production | ML-DSA, SLH-DSA and FN-DSA signatures (FIPS 204/205/206) |
| pqc-kem | Production | ML-KEM (FIPS 203), the X25519 + ML-KEM-768 hybrid, X-Wing, and sealed boxes |
| aethel-core | Production | Post-quantum anonymous identity: a separate identifier per context, context-bound ML-DSA signing |
| aethel-sdk (this crate) | Preview | The SDK over aethel-core, and the place to start |
| aethel-vault | Preview | Agent-held wallet: policy-gated x402 / EIP-3009 signing with ML-DSA-65 spend records |
| pqc-privacy | Lab | Research bundle, kept off every identity and payment path |
Production crates are thin, standards-bound libraries meant to be depended on today. Preview crates work and are published, with APIs still settling. Lab crates are research, never on an identity or payment path.
Runnable examples: 0x307/examples, one program per crate, pinned to the published versions.
Audit status: None of these crates has been independently audited, and none holds a CMVP / FIPS 140-3 validation. “FIPS 203/204/205/206” means the algorithms follow those standards, not that the code is certified. Known issues for this crate are in SECURITY.md. Versioning and yanks: STABILITY.md.
Re-exports§
pub use identity::public_key_from_multibase;pub use identity::verify;pub use identity::verify_typed;pub use identity::verify_typed_with_purpose;pub use identity::verify_with_purpose;pub use identity::Identity;pub use identity::Projection;pub use purpose::Purpose;pub use verifier::Verifier;
Modules§
- artifact
- The embedded
aethel:corecomponent, and the claim the package makes about it. - component
- Loading the embedded
aethel:corecomponent. - identity
- Generating an identity, signing with it, and verifying signatures.
- purpose
- Registered signing purposes.
- verifier
- Owning the compiled component for the lifetime of a verifier.
Structs§
- SigPublic
Key - Canonical algorithm-labelled signature transport types supplied by
pqc-sig. They are representations and encoders only; this SDK continues to perform signing and verification through its embedded aethel-core component. A post-quantum public key with its algorithm tag. - Signature
- Canonical algorithm-labelled signature transport types supplied by
pqc-sig. They are representations and encoders only; this SDK continues to perform signing and verification through its embedded aethel-core component. A post-quantum signature with its algorithm tag.
Enums§
- SigAlgorithm
- Canonical algorithm-labelled signature transport types supplied by
pqc-sig. They are representations and encoders only; this SDK continues to perform signing and verification through its embedded aethel-core component. Identifies the post-quantum signature algorithm used. - SigError
- Canonical algorithm-labelled signature transport types supplied by
pqc-sig. They are representations and encoders only; this SDK continues to perform signing and verification through its embedded aethel-core component. Errors that can occur during signature operations.