Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

suggestions wrt. JWK "alg" and "use" fields #2

@panva

Description

@panva

Since Ed* keys can only be used for signatures (and have one dedicated JWS "alg" identifier) and X* can only be used for ECDH (meaning not the WebCrypto algorithm identifier here) the following operation steps should be added. The alg ones I think for sure, the use ones I'll leave to a discussion.


Ed25519 JWK importKey operation

Add a step

If the alg field of jwk is present and not "EdDSA", then throw a DataError.


Ed448 JWK importKey operation

Add a step

If the alg field of jwk is present and not "EdDSA", then throw a DataError.


Ed25519 JWK exportKey operation

Add steps

Set the alg attribute of jwk to "EdDSA".
Set the use attribute of jwk to "sig".


Ed448 JWK exportKey operation

Add steps

Set the alg attribute of jwk to "EdDSA".
Set the use attribute of jwk to "sig".


X25519 JWK exportKey operation

Add a step

Set the use attribute of jwk to "enc".


X448 JWK exportKey operation

Add a step

Set the use attribute of jwk to "enc".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions