Skip to content

Add documentation for linux example#106

Draft
werwurm wants to merge 75 commits into
mainfrom
werwurm/linux_example_doc
Draft

Add documentation for linux example#106
werwurm wants to merge 75 commits into
mainfrom
werwurm/linux_example_doc

Conversation

@werwurm

@werwurm werwurm commented May 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

werwurm added 30 commits April 29, 2026 09:34
Add a kernel module that provides libnat20 functionality to linux kernel
modules. Also add a configuration to build a minimal linux image with
buildroot and run in on qemu and a workflow to test build nat20lib.ko
This module creates a new character device class intended to implement
the nat20 service protocol implementing DICE based device state
attestation and an embedded CA.
The nat20crypto module implements the libnat20 crypto interface
in terms of linux kernel crypto primitives.
The module implements
- deterministic ECDSA with curves P256 and P384.
- Bytewise SHA-2 224/256/384/512
- HMAC
- HKDF

ED25519 is currently not supported.
werwurm and others added 25 commits May 12, 2026 09:45
This commandline tool provides a primitive interface to communicate with
a nat20 device.
  Adds a C integration test binary (nat20_integration_test) that exercises
  the full DICE service stack via /dev/nat200. The test generates certificate
  chains across all supported key type (P-256, P-384) and format (X.509,
  COSE) permutations, verifies cryptographic signatures at each link, and
  confirms that parent_path-based issuance produces identical results to
  direct issuance after promote.

  Test structure:
  - Phase 1 (level 1): Generate CDI1, CDI2, ECA, ECA_EE certs and
    signatures using parent paths of varying depth from the UDS level.
    Verify all X.509 and COSE chains cryptographically.
  - Phase 2 (level 2): After one promote, regenerate CDI2/ECA/ECA_EE/sign
    with reduced parent path depth and assert byte-for-byte equality.
  - Phase 3 (level 3): After second promote, regenerate ECA/ECA_EE/sign
    with no parent path and assert equality.

  Also includes:
  - test_helpers.c: OpenSSL-based X.509 signature verification, public key
    extraction, COSE_Sign1 parsing and verification, CWT subject public
    key extraction, and compressed input computation.
  - nat20_qemu_init.sh: init wrapper for running tests in QEMU CI.
  - GitHub Action steps to build the rootfs and run the test suite in QEMU.
  - Buildroot package (nat20test) with OpenSSL dependency.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown

LCOV of commit d186786 during lcov-test-coverage-report #249

Summary coverage rate:
  lines......: 95.6% (3048 of 3188 lines)
  functions..: 99.1% (232 of 234 functions)
  branches...: 87.1% (1658 of 1904 branches)

Files changed coverage rate: n/a

@werwurm werwurm changed the base branch from werwurm/linux_example_nat20cli to main June 9, 2026 21:50
@werwurm werwurm requested a review from jmelby-contractor June 9, 2026 21:52
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.

1 participant