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

feat: wiring support for P-384 and P-521 #29

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

jmcabrera
Copy link
Contributor

Adding the possibility to compute MAC authentications with other NIST elliptic curves.

The curve used is chosen to be the one the private key is defined on:
When calculating the MAC, this is the device private key.
When verifying it, this is the reader private key.

const ephemeralMacKey = await calculateEphemeralMacKey(
options.ephemeralPrivateKey,
deviceKeyRaw,
options.sessionTranscriptBytes,
kty,
crv,
Copy link
Contributor

Choose a reason for hiding this comment

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

deviceKeyRaw and kty/crv are the same COSE key, right?
What if we pass deviceKeyCoseKey to the calculateEphemeralMacKey function and there is where we convert it to raw/jwk ?


const ephemeralMacKey = await calculateEphemeralMacKey(
key,
this.ephemeralPublicKey,
sessionTranscriptBytes,
kty,
crv,
Copy link
Contributor

Choose a reason for hiding this comment

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

same as previous comment

@siacomuzzi siacomuzzi merged commit 0160c1d into auth0-lab:main Nov 15, 2024
1 check passed
Copy link

🎉 This PR is included in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants