MasterKale / SimpleWebAuthn

WebAuthn, Simplified. A collection of TypeScript-first libraries for simpler WebAuthn integration. Supports modern browsers, Node, Deno, and more.
https://simplewebauthn.dev
MIT License
1.62k stars 137 forks source link

Investigate potential solution to a performance bottleneck during cert chain validation #309

Closed MasterKale closed 1 year ago

MasterKale commented 1 year ago

There's been a TODO in validateCertificatePath() that notes a long-time bottleneck in the execution of the library:

// TODO: updateHex() takes approximately two seconds per execution, can we improve this?

I was playing around tonight and think I've discovered a fix for this using the new signature verification logic added in #299. Preliminary testing showed a 60% reduction in unit test execution time; I need to test this out in a server (probably use the FIDO Conformance testing server in the example project) and see if similar gains can be observed in something resembling actual use.

Perhaps this will also solve the performance issues noted in #308 when using @simplewebauthn/server in lambdas.

MasterKale commented 1 year ago

Addressed in #311.