RustCrypto / JOSE

Pure Rust implementation of Javascript Object Signing and Encryption (JOSE)
51 stars 12 forks source link

[jose-jws] Verifying a Jws object with a Jwk key #60

Closed salessandri closed 1 year ago

salessandri commented 1 year ago

I haven't found a way of verifying a Jws object given a Jwk key. I'm able to load a Jws::Flattened struct as well as a Jwkkey struct. But I haven't seen a way of using the VerifyingKey trait in any way to connect the two.

Is this something that's not implemented yet? If so, what's the plan? I am willing to contribute if possible.

tarcieri commented 1 year ago

I don't believe it's implemented, or if it is, it's news to me.

Unfortunately work has somewhat stalled on this project as the various contributors seem busy with other things. I think @tgross35 was interested in working on this at one point, though @salessandri if it's something you're interested that works as well.

tgross35 commented 1 year ago

I have some pretty in-depth changes to the crate setup in prototype but haven't worked on it recently. If you are interested then I would say go ahead and submit a PR

salessandri commented 1 year ago

I managed to work around this by just extracting the Rsa key from the Jwk and using that for verifying the appropriate stringified payload with the signature.

I have some pretty in-depth changes to the crate setup in prototype but haven't worked on it recently. If you are interested then I would say go ahead and submit a PR

Cool. I will try to take a stab at it when I have some spare time.


Thanks for the reply. Closing the "issue" for now.