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

Test Vectors - Cryptographic Capabilities #166

Open
13 tasks
decentralgabe opened this issue Aug 16, 2024 · 4 comments
Open
13 tasks

Test Vectors - Cryptographic Capabilities #166

decentralgabe opened this issue Aug 16, 2024 · 4 comments
Labels
crypto cryptographic primitives testing related to new or existing tests

Comments

@decentralgabe
Copy link
Member

This issue outlines gaps in testing of various cryptographic capabilities. Tasks may have partial test coverage today (linked if true). If sufficient test coverage already exists, please close the task and link the relevant test.

Tasks may need discussion on the best way to approach them. The goal is to create a set of language agnostic test vectors that give us sufficient confidence in maintaining interoperability of features between implementations.

https://tbd54566975.github.io/web5-spec/#cryptographic-primitives

secp256k1

  • secp256k1 generate new keys (from a known seed)
  • secp256k1 import/export keys in common formats (bytes, JWK) today's coverage
  • secp256k1 sign and verify (bytes, JWS using ES256K) today's coverage

ed25519

  • ed25519 generate new keys (from a known seed)
  • ed25519 import/export keys in common formats (bytes, JWK) today's coverage
  • ed25519 sign and verify (bytes, JWS using EdDSA) today's coverage

secp256r1 / P-256

  • secp256r1 generate new keys (from a known seed)
  • secp256r1 import/export keys in common formats (bytes, JWK)
  • secp256r1 sign and verify (bytes, JWS using ECDSA)

x25519

I believe we can keep ecdh-es+a256kw operations out of scope for now

  • x25519 generate new keys (from a known seed)
  • x25519 import/export keys in common formats (bytes, JWK)

JWS / JWT

For all key types and algorithms we support...

@decentralgabe decentralgabe added testing related to new or existing tests crypto cryptographic primitives labels Aug 16, 2024
@nitro-neal
Copy link
Contributor

Why no sign and verify for this x25519?

@nitro-neal
Copy link
Contributor

nitro-neal commented Aug 21, 2024

so for this to get a checkmark for each section:

import/export keys in common formats (bytes, JWK)

it saysa jwk/bytes but I guess that means one or the other right?

We have at least one success import success sign and verify and then a lot of error cases, so if this covers it these could potentially get a check mark

@nitro-neal
Copy link
Contributor

nitro-neal commented Aug 21, 2024

I think we can be more grainular here actually for each of these. :

  • generate new keys (from a known seed)
  • round trip import/export keys in common formats (JWK)
  • sign bytes (convert from hex string format in vector) today's coverage
  • verify bytes (convert from hex string format in vector) today's coverage

And I'll check the sign and verify bits because I think we have significant enough coverage (but will need some agreement on this) for the algs we have

@decentralgabe
Copy link
Member Author

@nitro-neal see my comment on x25519 here decentralized-identity/web5-rs#299 (comment)

import/export keys in common formats (bytes, JWK)
it saysa jwk/bytes but I guess that means one or the other right?

I mean both. We should be able to serialize to/from bytes and to/from a JWK.

agree with your check list above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto cryptographic primitives testing related to new or existing tests
Projects
None yet
Development

No branches or pull requests

2 participants