github.com/veraison/psatoken (go): CCA platform Claims  Package psatoken provides an implementation of the following two PSA attestation token profiles: PSA_IOT_PROFILE_1 and http://arm.com/psa/2.0.0  The creation of a PSA Token with profile http://arm.com/psa/2.0.0 comprises the following steps (error checking omitted for brevity):  1. Create a claims-set with the desired profile:  Populate the mandatory part of the claims-set using the provided setter methods  _ = claims.SetClientID(myClientID) _ = claims.SetSecurityLifeCycle(mySecurityLifeCycle) _ = claims.SetImplID(myImplID) _ = claims.SetInstID(myInstID) _ = claims.SetNonce(myNonce) _ = claims.SetSoftwareComponents(mySwComponents)  3. Populate any remaining optional claims:  Add the claims to a psatoken.Evidence object (this will check the claims-set syntactic validity):  evidence := psatoken.Evidence{}  _ := evidence.SetClaims(claims)  4. Seal the evidence and serialize it to CBOR:  The output is a COSE Web Token that can be used as PDU in an attestation protocol.  Consuming a PSA Token comprises the following steps:  1. Decode the COSE Web Token:  Verify using the public key associated with the InstanceID claim contained in the token:  // Lookup the verification public key (crypto.PublicKey) using the // InstanceID pk := myTrustAnchorStore.Lookup(evidence.GetInstanceID()  err := evidence.Verify(pk) if err != nil { // handle error }  3. If cryptographic verification is successful, the PSA claims can be safely processed, e.g.:
Keywords: psa