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

Add feature complete Jwk #294

Merged
merged 2 commits into from
Aug 20, 2024
Merged

Add feature complete Jwk #294

merged 2 commits into from
Aug 20, 2024

Conversation

KendallWeihe
Copy link
Contributor

  • Add comprehensive unit test coverage for JWK's compute thumbprint
  • Add compute thumbprint uniffi binding
  • Add ToInner* and ToOuter* for the kt key manager and signer (disintermediates the uniffi code gen)
  • Add new Web5Error:: DataMember error variant -- signifies a semantic error for a given instances data members (ex. an empty string is a valid String type in Rust but semantically invalid)

import web5.sdk.rust.JwkData as RustCoreJwkData

/**
* Partial representation of a [JSON Web Key as per RFC7517](https://tools.ietf.org/html/rfc7517).
* Note that this is a subset of the spec.
*/
data class Jwk (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by the way, why don't we have a kid field? we have them in the key for the test vectors - https://github.com/TBD54566975/web5-spec/blob/main/test-vectors/crypto_ed25519/sign.json

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we haven't have an immediate application use case for it

Created #297 feel free to add it!

@KendallWeihe KendallWeihe mentioned this pull request Aug 20, 2024
@KendallWeihe KendallWeihe merged commit 6944830 into main Aug 20, 2024
14 checks passed
@KendallWeihe KendallWeihe deleted the kendall/jwk branch August 20, 2024 17:21
diehuxx pushed a commit that referenced this pull request Aug 21, 2024
* main:
  Use error for Verifier::verify(), Add ed25519 unit tests, Add Web5Error::Crypto (#300)
  Test Secp256k1Generator (#302)
  Generate X25519 keys (#301)
  Support X25519 in did:dht verification method (#299)
  add sign and verify test vectors (#292)
  Add feature complete Jwk (#294)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants