Technical Specification

Chipcoin Signed Login v1.

A SIWE-like wallet login flow for Chipcoin web sessions. It proves control of a wallet key without moving funds, exposing private keys, or treating address-only access as authentication.

Core Model

Login proves wallet-key control, not real-world identity.

The account model starts as user = wallet address. Optional profile metadata can be added later, but authentication must always come from a server challenge signed by the wallet.

Provider API

window.chipcoin.request({
  method: "chipcoin_signMessage",
  params: {
    message: "...",
    domain: "chipcoinprotocol.com"
  }
})

The wallet must read the real requesting origin from the browser context and compare it with the message domain.

Provider architecture

Use a page-context provider, content-script bridge, and background or service-worker signer. Privileged signing code must not run directly in the page context.

Auth endpoints

  • POST /auth/challenge
  • POST /auth/verify
  • GET /auth/session
  • POST /auth/logout

Canonical message

Chipcoin Signed Login v1
Domain: chipcoinprotocol.com
Origin: https://chipcoinprotocol.com
Network: testnet
Address: CHCC...
Scheme: 0
Nonce: ...
Issued At: ...
Expires At: ...
Statement: Sign in to chipcoinprotocol.com

The format is rigid. Free-form statements must not allow newline injection into protocol fields.

Signing domain

Message signing uses chipcoin:web-auth:v1:testnet and must be cryptographically distinct from transaction sighash. A login signature must not be reusable as a transaction signature.

Signature schemes

0 = secp256k1 / ECDSA legacy for CHC addresses.

10 = ML-DSA-44 experimental path for CHCQ addresses, specified but not accepted by the public login backend yet.

The address prefix and version must constrain the accepted signature_scheme.

Verification Contract

The backend rejects ambiguity before signature verification.

This keeps the flow close to SIWE while preserving Chipcoin-specific address formats and the signature scheme registry already used by the protocol.

Verify request

{
  "challenge_id": "abc123",
  "address": "CHCC...",
  "signature_scheme": 0,
  "public_key": "...",
  "signature": "...",
  "message": "Chipcoin Signed Login v1\n..."
}

Reject conditions

  • Challenge missing, expired, reused, or over attempt limit.
  • Origin or domain mismatch.
  • CHC address submitted with ML-DSA scheme, or CHCQ with ECDSA.
  • Public key or signature size outside exact scheme limits.
  • Nonce or statement exceeds configured length bounds.
  • Public key does not derive or commit to the submitted address.
  • Signature does not verify over the canonical login message.