Skip to content

Conversation

@abhiraj-ku
Copy link
Contributor

@abhiraj-ku abhiraj-ku commented Dec 19, 2025

The Mval struct was missing the CryptoKeys field, which corresponds to CBOR tag 13 in the CoRIM specification. This field is critical for PSA Profile compliance and without this we cannot represent the PSA endorsements.

Solution:
Updated the comid (inside measurement.go) package to support this tag as a first-class citizen:

  1. Added the CryptoKeys field to the Mval struct with the correct struct tag:

CryptoKeys *CryptoKeys cbor:"13,keyasint,omitempty" json:"cryptokeys,omitempty"
Tag 13: Ensures the field is marshaled to the correct integer key in the CBOR map.

2.Added func (o *Measurement) AddCryptoKey(key *CryptoKey) to simplify appending keys to a measurement.

Added a test TestMeasurement_CryptoKeys_RoundTrip to verify that CryptoKeys are correctly marshaled to CBOR and unmarshaled back without data loss.

Results:

  1. i run the make presubmit and all the test covered the required threshold of 84.4
  2. Also the TestMeasurement_CryptoKeys_RoundTrip passed which means it was able encode and decode the cryptokeys

@abhiraj-ku abhiraj-ku force-pushed the corim-profile-refresh-08 branch from 657e758 to f6f8454 Compare December 19, 2025 10:25
Copy link
Contributor

@setrofim setrofim left a comment

Choose a reason for hiding this comment

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

LGTM!

@setrofim
Copy link
Contributor

Also, minor nit: amend your commit so it doesn't reffer to "tag 13". It's "code point 13" or "field 13". As we discussed earlier, the term "tag" has very specific meanings in the context of CoRIM, which do not apply here.

Copy link
Contributor

@thomas-fossati thomas-fossati left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @abhiraj-ku

@yogeshbdeshpande yogeshbdeshpande merged commit 77488c5 into veraison:main Dec 19, 2025
1 check passed
@abhiraj-ku abhiraj-ku deleted the corim-profile-refresh-08 branch December 23, 2025 13:23
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