Skip to content

feat(iso-webauthn-varsig): align wire format with non-recursive spec#2

Merged
NiKrause merged 1 commit into
mainfrom
feat/varsig-nonrecursive
Feb 24, 2026
Merged

feat(iso-webauthn-varsig): align wire format with non-recursive spec#2
NiKrause merged 1 commit into
mainfrom
feat/varsig-nonrecursive

Conversation

@NiKrause
Copy link
Copy Markdown
Owner

@NiKrause NiKrause commented Feb 24, 2026

Description

Add iso-webauthn-varsig package implementing the non-recursive WebAuthn varsig wire format per Gozala's suggestion on the ChainAgnostic varsig spec.

The wire format aligns with the dialog-db Go/Rust reference implementation:

  • Header: prefix version innerAlgorithm curve webauthnMarker
  • Body: clientDataLen clientDataJSON authDataLen authenticatorData signatureHashAlgorithm encodingInfo signatureBytes

Encoder accepts optional EncodeOptions for custom signatureHashAlgorithm/encodingInfo (defaults to SHA-256 / raw). Includes full test suite (node + browser) and ABNF wire format documentation in readme.

Link to issue

Closes #1

Cross-references:

Type of change

  • New feature (non-breaking change that adds functionality)
  • This change requires a documentation update
  • Comments have been added/updated

Restructure the WebAuthn varsig wire format per Gozala's suggestion
(ChainAgnostic/varsig#11) to avoid recursion:

- Header: prefix version innerAlgorithm curve webauthnMarker (removed
  multihashCode, multihashLength, payloadEncoding from header)
- Body: clientData before authData (swapped order)
- Body: signatureHashAlgorithm + encodingInfo moved to body before
  raw signature bytes
- Encoder accepts optional EncodeOptions for custom hash/encoding
- Decoder returns signatureHashAlgorithm/encodingInfo instead of
  multihashCode/multihashLength
- Added wire-format, custom options, and backwards-compat tests
- Documented ABNF wire format in readme
- Bumped version to 0.2.0 (breaking change)

Closes #1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align WebAuthn varsig with non-recursive spec (Gozala suggestion)

1 participant