Purpose: build a reusable, standalone identity + signing + session infrastructure.
This repo is pure infrastructure. No product language. No marketplace language. No game language. No commerce framing.
This is a cryptographic identity spine other applications can consume.
- Normie-first UX
- Protocol-agnostic interfaces
- Embedded by default
- Portable by design
- Future universal-signer compatible
Model: Steam-style UX now → MetaMask-style portability later
- Create new identity
- Import existing identity
- Unlock identity with password
- Use identity across sessions
- Export identity for backup/recovery
Invisible to user:
- keys
- pubkeys / npubs
- signing
- cryptography
- protocols
Landing:
- [ Create new ID ]
- [ Use existing ID ]
Create new:
- username (optional metadata)
- password (vault encryption)
- → identity created
Use existing:
- import mnemonic
- import encrypted keyfile
- → identity loaded
Canonical rule: identity_id = public_key (x-only secp256k1 pubkey, 32 bytes)
UX wrappers:
- username = display label
- password = encryption key
No UUID identities. No abstract account IDs.
- Curve: secp256k1
- Signing: BIP340 Schnorr
- Hash: SHA-256
- Encryption: AES-GCM
- KDF: Argon2id (fallback: PBKDF2-SHA256)
- encrypted private key
- public key
- salt
- iv
- kdf parameters
- version
Vault format (canonical JSON blob):
{
"version": 1,
"pubkey": "0x… (Hex32, x-only secp256k1 pubkey)",
"kdf": { "algo": "argon2id", "params": {} },
"salt": "base64",
"iv": "base64",
"ciphertext": "base64"
}Notes:
- All hex values are
0x-prefixed. pubkeyis x-only 32 bytes (BIP340 / Nostr-style pubkey material).
- origin (protocol + host + port)
- scopes
- public key
- origin
- expiry
- refresh metadata
- Default: IndexedDB (web)
- Encrypted blobs only
- No plaintext secrets at rest
- Private key never stored in plaintext
- AES-GCM encryption
- password-derived key
- decrypted key exists only in memory
- no blind signing
Challenge-based identity proof:
- system generates nonce + timestamp
- structured challenge object created
- challenge serialized
- challenge hashed (sha256)
- identity signs hash
- signature verified
- session issued
Challenge format (canonical):
{
"v": 1,
"origin": "scheme://host:port",
"nonce": "random",
"timestamp": 1700000000
}- sessions have TTL
- auto-refresh before expiry via re-signing challenge
- no repeated unlock prompts during active use
- explicit revoke support
- origin-bound
- scope-bound
- least-privilege
- explicit user approval
- one-click export
- AES-GCM encrypted blob
- password protected
- safe for normie backup
- explicit warning
- confirmation step
- power-user recovery path
- key generation
- vault encryption
- unlock / lock
- structured challenge signing
- event signing
- permission enforcement
- session issuance
- session refresh
createIdentity()importIdentity()exportEncryptedKeyfile()exportMnemonic()unlock()lock()getPublicKey()
signChallenge()signEvent()
createSession()refreshSession()revokeSession()
requestScopes(origin, scopes)
- no plaintext secrets on disk
- deterministic identity recovery
- portable identity format
- ❌ browser extensions
- ❌ universal signer
- ❌ NIP-07 dependency
- ❌ NIP-46
- ❌ relay communication
- ❌ social layers
- ❌ messaging
- ❌ encryption DMs
- ❌ protocol-specific UX
This repo provides:
- identity
- signing
- sessions
- permissions
- recovery
- SDK
It does not provide:
- applications
- platforms
- commerce
- content
- product logic
- extraction into standalone signer
- browser extension signer
- mobile signer
- NIP-07 adapter
- NIP-46 adapter
- shared identity across apps
- identity creation works
- identity import/export works
- encrypted vault works
- session login works
- session refresh works
- permissions enforced
- signing works
- API usable by external apps
This project is identity middleware.
It is not an app, a platform, or a product.
It is the cryptographic substrate other systems build on.
Identity Layer
↓
Signer Layer
↓
Session Layer
↓
Permission Layer
↓
Application Layer (external)
If this ships, you have:
- portable identity
- real cryptographic auth
- reusable signer core
- future universal signer path
- cross-app identity foundation
This is infrastructure, not a product. This is a spine, not a surface.