Skip to content

Update handling of MsoMdocCredential.credentialSigningAlgorithmsSupported #491

@dzarras

Description

@dzarras

When the library parses an MSO MDoc Credential Configuration and converts it to a domain object, it tries to convert the COSE Algorithm Identifiers in credential_signing_alg_values_supported to COSE Algorithm names (reference). Whenever an unknown COSE Algorithm Identifier is encountered it is simply discarded.

Currently the library supports only:

  • -7 (ES256)
  • -35 (ES384)
  • -36 (ES512)

and support for additional COSE Algorithm Identifiers must be explicitly added in the code.

For Credential Configuration of other Credential Formats, the library simply passes through the identifiers present in credential_signing_alg_values_supported as is. The same behavior should apply to MSO MDoc Credential Configurations as well.

To that end, the following is proposed:

  • Remove credentialSigningAlgorithmsSupported from CredentialConfiguration
  • Define credentialSigningAlgorithmsSupported in MsoMdocCredential as List<CoseAlgorithm>
  • Define credentialSigningAlgorithmsSupported in SdJwtVcCredential as List<JwsAlgorithm>
  • Define credentialSigningAlgorithmsSupported in W3CSignedJwtCredential as List<JwsAlgorithm>
  • Define credentialSigningAlgorithmsSupported in W3CJsonLdDataIntegrityCredential as List<LinkedDataAlgorithm>
  • Define credentialSigningAlgorithmsSupported in W3CJsonLdSignedJwtCredential as List<LinkedDataAlgorithm>

where:

data class CoseAlgorithm(val value: Int)
data class JwsAlgorithm(val name: String)
data class LinkedDataAlgorithm(val id: String)

and wrap the values as needed without performing any filtering or conversion.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions