Protocol Demo NIST P-256 (secp256r1) Part 1 of 4 · Key Generation

DID Auth: key pairs

Generates the P-256 key pairs of the DID Auth demo, one for the server and one for the client. Public demo keys only.

For explaining a protocol only. Do not use this in a real service. The keys shown are public demo keys.

Open in app Download .ncw

DID Auth: key pairs

Overview & Cryptographic Context

This workflow is Part 1 of the four-part DID Auth challenge-response protocol walkthrough (Key Pairs → Client → Server → End-to-End Demo). In decentralized identifier (DID) authentication over elliptic curves, both the relying party (Server) and the holder (Client) possess long-term or ephemeral key pairs on NIST P-256 (secp256r1).

Running this graph generates two independent P-256 key pairs using the browser's CSPRNG: each party receives a 32-byte private scalar and a 65-byte uncompressed SEC 1 public key (0x04 || X || Y).

Pipeline Architecture & Wiring Flow

ECC Keypair Generator (Server, P-256) ──► Workflow Output (Server & Client Keys) ◄── ECC Keypair Generator (Client, P-256)
  1. Server Key Generation (Server Key Pair): Configured with curve = "p256". Emits Server Private Key (32 B) and Server Public Key (65 B).
  2. Client Key Generation (Client Key Pair): Configured with curve = "p256". Emits Client Private Key (32 B) and Client Public Key (65 B).
  3. Output Collection (Workflow Output): Exposes all four keys on named output ports so they can be inspected or copied into the DID Auth: client and DID Auth: server workflows.

Nodes & Configuration

NodeNode Role & Key ParametersCount
ECC Keypair GeneratorTwo instances (Server Key Pair, Client Key Pair) configured with curve = "p256"2
Workflow OutputCollects the 4 generated private and public keys1

Node reference →

Outputs & Verification

Verification Source: random key pairs: nothing deterministic to compare; the keys are checked by the did-auth-client and did-auth-server examples

Outputs

NameTypeFormat & Length
Server Private Keybytes32-byte P-256 secret scalar (random per run)
Server Public Keybytes65-byte uncompressed SEC 1 point 0x04 || X || Y
Client Private Keybytes32-byte P-256 secret scalar (random per run)
Client Public Keybytes65-byte uncompressed SEC 1 point 0x04 || X || Y