JOSE icon indicating copy to clipboard operation
JOSE copied to clipboard

Feature signing and verifying?

Open wellcaffeinated opened this issue 1 year ago • 8 comments

Hi I like how this library is organized, but I'm struggling to find a way to do the following:

  1. Create a JWK from system randomness
  2. Create a signature with that key
  3. Verify the signature with a JWK

Is this library capable of doing this yet? Or is it still in progress?

wellcaffeinated avatar Jun 02 '24 18:06 wellcaffeinated

You can call it "in progress" however work in this repo has largely stalled

tarcieri avatar Jun 03 '24 17:06 tarcieri

Ah thanks. Just curious... It seems like almost all JOSE libraries have stalled in their development. Is there a larger reason for this? I've heard of some security flaws in the protocol. Are there alternatives we should be considering?

wellcaffeinated avatar Jun 03 '24 17:06 wellcaffeinated

In the case of this repo I think the original contributors simply lost interest.

For signatures you can just sign data directly without involving some other protocol. X.509 SPKI provides a widely-used public key format which is supported by all of our crates.

tarcieri avatar Jun 03 '24 17:06 tarcieri

Interest, no. Resources, yes.

npmccallum avatar Jun 03 '24 17:06 npmccallum

Ok thanks. I'm storing keys in a larger data structure that can be formatted as JSON, hence my interest in JWK.

I suppose I could do away with any JWS formatting and just encode the signature directly as base64 or similar...

wellcaffeinated avatar Jun 03 '24 17:06 wellcaffeinated

@wellcaffeinated all of the signature algorithm implementations we maintain have serde support

tarcieri avatar Jun 03 '24 20:06 tarcieri

I am interested in further developing this library because RFC 8995 extensions need it. How would I go on about to contribute?

juliankrieger avatar Jun 18 '24 06:06 juliankrieger

@juliankrieger perhaps sketch out what you have in mind here, and then open a PR which implements it

tarcieri avatar Jun 18 '24 14:06 tarcieri