Skip to content

feat: add simulated CCA attester #4

Open
shefali-kamal wants to merge 2 commits into
veraison:mainfrom
MonakaResearch:main
Open

feat: add simulated CCA attester #4
shefali-kamal wants to merge 2 commits into
veraison:mainfrom
MonakaResearch:main

Conversation

@shefali-kamal

Copy link
Copy Markdown
Collaborator

Replaces the old static-blob FakeTsmBuilder with a real SimulatedTokenBuilder that builds spec-compliant CCA tokens (CBOR tag 399) from JSON claims and JWK keys signed with ES384. No hardware or RATSD daemon needed.

  • Added CcaSimulatedAttester in src/attesters/cca/simulated.rs
  • Added token construction pipeline: utils/encode.rs, utils/crypto.rs, utils/decode.rs
  • Added utils/constants.rs for CBOR integer key definitions
  • Added test data: cca-claims.json, iak.jwk, rak.jwk
  • Added dependencies: coset, p384, ecdsa, sha2, rand_core, ciborium
  • Switched cmw dependency from git to crates.io v0.1.1
  • Updated examples/attester.rs with CcaSim attester support and --print flag
  • Updated README with usage examples for all attestersReplaces the old static-blob FakeTsmBuilder with a real
  • SimulatedTokenBuilder that builds spec-compliant CCA tokens
  • (CBOR tag 399) from JSON claims and JWK keys signed with ES384.
  • No hardware or RATSD daemon needed

@thomas-fossati thomas-fossati left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent contribution, thanks!

I have left a few comments inline for your consideration -- none of which are blocking.

Comment thread deny.toml Outdated
Comment thread src/attesters/cca/utils/encode.rs Outdated
use ciborium::Value as CborValue;

impl From<PlatformClaims> for CborValue {
#[allow(clippy::vec_init_then_push)]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a curiosity: why is this needed here and not in the (very similar) RealmClaims (around L199)?

@sb-fuji sb-fuji Jul 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clippy only flags PlatformClaims because it has five consecutive pushes before any conditional field. RealmClaims branches early with an if let Some(profile) after the first push, so clippy doesn't trigger there. No functional difference - just clippy heuristics.

Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md
sb-fuji and others added 2 commits July 21, 2026 12:40
- Replace the old FakeTsmBuilder with SimulatedTokenBuilder that
  constructs real CBOR tag 399 tokens from JSON claims and JWK keys
- Add encode_cca_token() for building CCA tokens with two COSE_Sign1
  signatures (platform + realm) using ES384 on P-384
- Add CcaSimulatedAttester implementing the Attester trait
- Add CcaRatsdAttester that posts to RATSD and parses the CMW envelope
- Add crypto helpers: load_p384_jwk, build_rak_cose_key,
  sign_cose_sign1, is_supported_hash_alg, compute_hash
- Add serde-enabled CCA token types with CBOR conversions
- Add decode_cca_token() and pretty_print_token() utilities
- Add CBOR key constants per the Arm CCA attestation token spec
- Switch cmw dependency from git to crates.io v0.1.1

Signed-off-by: BISWAS, SREYAN <SREYAN.BISWAS@fujitsu.com>
Signed-off-by: Dhanus M Lal <Dhanus.MLal@fujitsu.com>
@thomas-fossati

Copy link
Copy Markdown
Contributor

Thanks for addressing all my comments. This looks ready to ship.

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.

4 participants