Armour
Derives age-compatible recipients and decryptors from the same identity model for explicit encryption flows.
identity
@ternent/identity defines the capability root used across the Ternent stack. The identity itself is Ed25519 and seed-backed. From that same portable model, the package derives public keys, stable key IDs, X25519 keys, and age-compatible helpers when encryption surfaces need them.
One portable identity root. Signing keys first. Encryption helpers derived explicitly.
Identity is not a wallet, auth server, hosted keystore, or encryption protocol by itself.
Identity Model
@ternent/identity keeps the core model small. The portable object stores seed material plus derived public metadata. The package then exposes the key surfaces you need for signing, verification, recovery, and encryption interoperability.
The serialized identity stores seed material as the durable root capability. Mnemonics are a human recovery format for regenerating that same root.
The main cryptographic identity is Ed25519. Use it for signing actions, proofs, and payloads where authenticity matters.
The package derives a public key and a keyId so the identity can be referenced, shared, and verified without exposing seed material.
When encryption is needed, the same identity can derive X25519 keys and age-compatible recipient or secret key helpers without changing the root model.
Serialized Form
The core artifact is plain JSON. It stores the signing identity root, public metadata, and enough information to move the identity between runtimes without redefining the contract.
{
"format": "ternent-identity",
"version": "2",
"algorithm": "Ed25519",
"createdAt": "2026-03-13T00:00:00.000Z",
"publicKey": "BASE64URL-RAW-ED25519-PUBLIC-KEY",
"keyId": "identity_...",
"material": {
"kind": "seed",
"seed": "BASE64URL-RAW-32-BYTE-SEED"
}
}X25519 keys and age-compatible strings are derived from this identity when needed. They are helper surfaces, not a second identity format.
Key Types
@ternent/identity is primarily an Ed25519 identity package, but it derives a few adjacent key forms so the same identity can cross signing and encryption boundaries cleanly.
The primary key type. This is the signing identity used for signatures, verification, and proof-oriented flows.
The public key is the verification surface. The keyId is a stable derived identifier for references, indexes, manifests, and user-facing handles.
Derived from the identity for encryption use cases that need an X25519 public or private key instead of Ed25519 signing material.
Recipient and secret key helpers expose the derived encryption capability in formats that fit age-compatible tooling and Armour.
The Suite
Other Ternent packages build on this identity model instead of redefining their own. That keeps signing, encryption, and replayable application history aligned around one portable root.
Identity defines the capability root. Other packages define what that capability is used for.
Derives age-compatible recipients and decryptors from the same identity model for explicit encryption flows.
Uses the signing identity for portable proofs and signed artifacts without changing the core identity contract.
Builds replayable application history on the same identity root for authored, signed, and optionally encrypted workflows.
How it works
Start from seed material or a 12/24-word mnemonic, derive the signing identity, and only then derive the adjacent key surfaces a flow actually needs.
Generate a fresh identity from random seed material, or restore the same root from a mnemonic phrase.
Use the root to derive the signing keypair and the public key that other systems can verify against.
Derive a stable identifier from the public key so references stay portable without inventing a separate registry.
Only derive X25519 or age-compatible recipient and secret key helpers when the consuming surface actually needs encryption capability.
The root identity remains Ed25519. Encryption-oriented keys are derived surfaces, not a change in identity type.
For Developers
The package keeps creation, recovery, signing, verification, and key derivation on top of one serialized contract. It does not mix in storage, auth sessions, or encryption envelopes.
Create and restore
Sign and verify
Derive encryption helpers
SerializedIdentity
type SerializedIdentity = {
format: "ternent-identity";
version: "2";
algorithm: "Ed25519";
createdAt: string;
publicKey: string;
keyId: string;
material: {
kind: "seed";
seed: string;
};
};Portable JSON stores the seed-backed identity root plus public metadata. That is the contract other surfaces build on.
View package sourceBoundaries
Ready
Use @ternent/identity when you want seed-backed Ed25519 identities, mnemonic recovery, stable key IDs, and explicit derivation into encryption-friendly key surfaces.