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 APIs for encoding and decoding key configs for wire transmission #8

Merged
merged 3 commits into from
Mar 7, 2023

Conversation

chris-wood
Copy link
Owner

Closes #7.

This lets applications transfer the key config over the wire from gateway to client.

@chris-wood chris-wood requested a review from dajiaji March 6, 2023 22:45
@chris-wood
Copy link
Owner Author

@dajiaji it's not clear to me why the Node.js test is failing -- do you happen to know?

@dajiaji
Copy link
Collaborator

dajiaji commented Mar 7, 2023

@chris-wood Could you update your dnt library in import-map.json to the latest (v0.33.1) and try again?

@chris-wood
Copy link
Owner Author

@dajiaji thanks -- that seemed to yield a different error now! Please see below when you have a moment:

found 0 vulnerabilities
[dnt] Building project...
[dnt] Type checking...
src/deps/deno.land/x/hpke@v0.18.2/src/kems/dhkemPrimitives/x25519.ts:1:33 - error TS2307: Cannot find module '@noble/curves/ed25519' or its corresponding type declarations.

1 import { ed25519, x25519 } from "@noble/curves/ed25519";
                                  ~~~~~~~~~~~~~~~~~~~~~~~
src/deps/deno.land/x/hpke@v0.18.2/src/kems/dhkemPrimitives/x448.ts:1:29 - error TS2307: Cannot find module '@noble/curves/ed448' or its corresponding type declarations.

1 import { ed448, x448 } from "@noble/curves/ed448";

@dajiaji
Copy link
Collaborator

dajiaji commented Mar 7, 2023

@chris-wood It seems to be due to the fact that dnt's npm support is not complete. Could you apply the following change to dnt.ts?

-  typeCheck: true,
+  typeCheck: false,

@chris-wood
Copy link
Owner Author

@dajiaji that did it -- thank you! 🙏

@dajiaji
Copy link
Collaborator

dajiaji commented Mar 7, 2023

No problem. Sorry to bother you with deno-specific problems.

kem: kemId,
kdf: Kdf.HkdfSha256, // Garbage (to create the suite)
aead: Aead.Aes128Gcm, // Garbage (to create the suite)
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems to me that it would be better to make hpke-js disclose the KEM classes directly.

@dajiaji dajiaji merged commit 5eff12c into main Mar 7, 2023
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.

Provide API to encode and decode public key configs
2 participants