Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CredentialRepositoryV2: more ways to create COSE keys would be convenient #393

Open
iaik-jheher opened this issue Dec 19, 2024 · 0 comments

Comments

@iaik-jheher
Copy link
Contributor

Picking this back up since our prototype from last year is finally being moved towards production :)

CredentialRecord (the interface type for CredentialRepositoryV2) requires implementers to provide a getter the COSE-encoded public key. Its javadoc refers to a convenience helper cosePublicKeyFromEs256Raw for converting from ES256 raw to COSE.

Would it be possible to add an additional helper for converting from java PublicKey to COSE? (This is adjacent to #288 from last year.)


Our business case: we need to submit the credential public key to an external server on registration, and receive a certificate for that public key in return. We store the certificate indexed by the credential id, which allows us to find it again at authentication time.

At this point, we end up with a X509Certificate, which provides a java.security.PublicKey. Similar to #288, I am trying to go from there to the COSE_Key required by the library without implementing COSE encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant