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.63k stars 137 forks source link

feat/faster-cert-chain-validation #311

Closed MasterKale closed 1 year ago

MasterKale commented 1 year ago

I accidentally discovered a fix for a performance bottleneck in certificate chain validation thanks to work done in #299. This should address #309. Based on some light testing via FIDO Conformance Tests, execution times seem to have gone down by around 10%. In one circumstance (unit tests) they decreased by as much as 60%.

Screenshots

Performance of groups of FIDO Metadata Conformance tests that took long enough to execute to get a "execution time flag" generally went down:

"tpm" - before

Screenshot 2022-12-18 at 7 43 59 AM

"tpm" - after

Screenshot 2022-12-18 at 7 45 50 AM

"android-safetynet" - before

Screenshot 2022-12-18 at 7 43 57 AM

"android-safetynet" - after

Screenshot 2022-12-18 at 7 45 45 AM

Metadata - before

Screenshot 2022-12-18 at 7 43 51 AM

Metadata - after

Screenshot 2022-12-18 at 7 45 38 AM