-
Notifications
You must be signed in to change notification settings - Fork 56
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
Update Ed25519 and ES256K Test Vectors and Ensure Low-S ECDSA Signatures #375
Conversation
… verify Signed-off-by: Frank Hinek <[email protected]>
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
TBDocs Report ✅ No errors or warnings @web5/api
TBDocs Report Updated at 2024-01-13T18:41:16Z |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #375 +/- ##
==========================================
+ Coverage 91.85% 91.90% +0.05%
==========================================
Files 67 67
Lines 18163 18241 +78
Branches 1543 1550 +7
==========================================
+ Hits 16683 16764 +81
+ Misses 1457 1454 -3
Partials 23 23
|
Signed-off-by: Frank Hinek <[email protected]>
f4e8194
to
6994521
Compare
|
||
const signatureHex = Convert.uint8Array(signature).toHex(); | ||
expect(signatureHex).to.deep.equal(vector.output); | ||
describe('Web5TestVectorsCryptoEd25519', () => { |
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.
all the other examples are 1 level deep:
describe('PresentationExchange', () -> describe('Web5TestVectorsPresentationExchange', ()
describe('Verifiable Credential Tests', () -> describe('Web5TestVectorsCredentials', ()
yours are 2 levels deep
describe('Ed25519', () -> describe('verify()', () -> describe('Web5TestVectorsCryptoEd25519', ()
I -think- it should work and get to the checkmark screen, but if it doesn't then this will probably be the reason.
I think we should put all vector test in one file eventually for better ease of use, but we can discuss that offline
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.
junit xml doesnt have a way to do more than one class deep as far as i know, so the mocha junit reporter thing will just smush it down, which may or may not pass the regex. Probably best to just keep doing it the way we've established works.
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.
Let's give it a shot and see how it does.
I had the same thought but the reason I ended up nesting them is that, otherwise, it isn't clear by looking at the tests that those methods are being rigorously tested.
…res (#375) * Migrate to using Web5 Test Vectors for Ed25519 and Secp256k1 sign and verify * Ensure ES256K signatures are low-S form in crypto and crypto-aws-kms
…res (#375) * Migrate to using Web5 Test Vectors for Ed25519 and Secp256k1 sign and verify * Ensure ES256K signatures are low-S form in crypto and crypto-aws-kms
…res (#375) * Migrate to using Web5 Test Vectors for Ed25519 and Secp256k1 sign and verify * Ensure ES256K signatures are low-S form in crypto and crypto-aws-kms
This PR will:
Ed25519
andSecp256k1
sign()
andverify()
methods.@web5/crypto
and@web5/crypto-aws-kms
.Note
A future PR will switch to using git submodules for Web5 SDK Test Vectors.