feat(se050-ed25519-jcs-receipt): NXP SE050 reference Ed25519 signed-receipt example#2
Open
feat(se050-ed25519-jcs-receipt): NXP SE050 reference Ed25519 signed-receipt example#2
Conversation
…xample Companion to the ATECC608B example (PR #1). SE050 supports Ed25519 natively in hardware, which is the IETF draft's mandatory-to-implement algorithm. Receipts emitted from this signer verify directly against @veritasacta/verify without needing ES256 adapter support. Same host/device decomposition as the ATECC608B example: - Device signs pre-hashed 32-byte digests, nothing else - Host (Python) handles JCS canonicalization + envelope assembly - 64-byte Ed25519 R||S signature crosses I2C Files: - src/receipt_signer.{c,h}: thin nxp-plugandtrust wrapper (init, sign 32-byte digest via sss_asymmetric_sign_digest, read pubkey) - src/example_main.c: CLI that signs a hex digest from argv - host/build_receipt.py: canonicalizer + reference fixture generator (deterministic seed -> byte-reproducible sample_receipt.json) - sample_receipt.json: 598-byte canonical envelope, signature cross-verified against cryptography.hazmat Ed25519 verify - Makefile: Linux host build against installed nxp-plugandtrust Decision when to use SE050 vs ATECC608B: - Ed25519 native required (IETF spec conformance, pharma, regulatory) -> SE050 - Cost dominates at volume, ECDSA P-256 + ES256 adapter acceptable -> ATECC608B - Documented tradeoff table in README. Tested: - host/build_receipt.py reference produces reproducible 598-byte envelope - SHA-256 digest: 8310e6166a5851c8f0ab21739a4fdf32d6f94180cad891d53770c9b692a469d1 - Signature independently verified via cryptography.hazmat Ed25519 - C code compiled-checked against nxp-plugandtrust SSS API surface; real-hardware verification pending first SE050 dev-board acquisition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to #1 (ATECC608B / ECDSA P-256 example). SE050 supports Ed25519 natively in hardware, which is the IETF draft's mandatory-to-implement algorithm. Receipts from this signer verify directly against
@veritasacta/verifywithout needing ES256 adapter support.Same decomposition as #1
What's in the box
src/receipt_signer.{c,h}— thin nxp-plugandtrust wrapper (init, sign 32-byte digest viasss_asymmetric_sign_digest, read pubkey, release)src/example_main.c— CLI that signs a hex digest from argv given a persistent object IDhost/build_receipt.py— three modes:reference— byte-reproducible sample using software Ed25519 with deterministic seedbuild— given a device pubkey, prints canonical envelope + SHA-256 digest to feed the deviceassemble— given device's signature + pubkey, emits the final receipt JSONsample_receipt.json— pre-generated reference output (598-byte canonical, Ed25519-verified)Makefile— Linux host build against installed nxp-plugandtrustWhen SE050 vs ATECC608B
Tradeoff documented in README. Both examples coexist as parallel references — pick the chip that matches your cost / algorithm / SDK constraints.
Tested
python3 host/build_receipt.py referenceproduces a 598-byte canonical envelope with SHA-256 digest8310e6166a5851c8f0ab21739a4fdf32d6f94180cad891d53770c9b692a469d1cryptography.hazmatEd25519 verifyRelated