-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
src/mdoc/Verifier.ts
Outdated
const ephemeralMacKey = await calculateEphemeralMacKey( | ||
options.ephemeralPrivateKey, | ||
deviceKeyRaw, | ||
options.sessionTranscriptBytes, | ||
kty, | ||
crv, |
There was a problem hiding this comment.
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 ?
src/mdoc/model/DeviceResponse.ts
Outdated
|
||
const ephemeralMacKey = await calculateEphemeralMacKey( | ||
key, | ||
this.ephemeralPublicKey, | ||
sessionTranscriptBytes, | ||
kty, | ||
crv, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as previous comment
🎉 This PR is included in version 1.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.