DID Auth demo
Client and server workflows registered as custom nodes and wired together with fresh key pairs and nonce on every run. A learning example.
For explaining a protocol only. Do not use this in a real service. The keys shown are public demo keys.

Overview & Cryptographic Context
This workflow is the fourth and final installment of the DID Auth learning suite (Key Pairs → Client → Server → End-to-End Demo). It demonstrates one of NodeCrypto's most powerful architectural features: packaging multi-node sub-workflows as content-addressed Custom Nodes (sha256:) embedded directly inside the .ncw file's definitions map.
Instead of cluttering a single canvas with 17 low-level nodes, DID Auth - Client and DID Auth - Server appear as high-level protocol blocks wired to two ECC Keypair Generator nodes and a 32-byte Random Value challenge Nonce.
Pipeline Architecture & Wiring Flow
- Ephemeral Setup (
Server Keypair,Client Keypair,Nonce): Generates fresh P-256 key pairs for both sides and a fresh 32-byte CSPRNG challenge nonce on every execution. - Client Challenge Response (
DID Auth - Client): ReceivesClient Keypair(private + public),Server Keypair.publicKey, andNonce, outputting the client's public key and 8-byte responseMAC. - Server Verification (
DID Auth - Server): ReceivesServer Keypair.privateKey,Nonce, and the client'spubandmacoutputs, recomputes the ECDH-CBC tag, and emitsVerified = truetoWorkflow Output.
Nodes & Configuration
| Node | Node Role & Key Parameters | Count |
|---|---|---|
| ECC Keypair Generator | Two instances (Server Keypair, Client Keypair) with curve = "p256" | 2 |
| Random Value | Labeled Nonce; configured with type = "bytes", length = 32 | 1 |
| DID Auth - Client (Custom node embedded in the file) | Content-addressed custom node encapsulating the 8-node client workflow | 1 |
| DID Auth - Server (Custom node embedded in the file) | Content-addressed custom node encapsulating the 9-node server workflow | 1 |
| Workflow Output | Emits boolean verdict Verified | 1 |
Inputs, Outputs & Test Vector Verification
Verification Source: independent implementation: Node crypto (reference/did-auth/did-auth.mjs); keys and nonce are random on every run, only the verdict is compared
Expected Outputs
| Name | Type | Value |
|---|---|---|
Verified | bool | true |