Skip to content

decoder: skip foreign-OID keys before FIPS CAST#413

Open
ColtonWilley wants to merge 1 commit into
wolfSSL:masterfrom
ColtonWilley:decoder-oid-precheck
Open

decoder: skip foreign-OID keys before FIPS CAST#413
ColtonWilley wants to merge 1 commit into
wolfSSL:masterfrom
ColtonWilley:decoder-oid-precheck

Conversation

@ColtonWilley

Copy link
Copy Markdown
Contributor

In FIPS, loading a key probes every keytype decoder and each instantiates a wolfCrypt key, firing that algorithm's lazy primitive-Z CAST (~150ms+) before any OID check. The decoder now checks the wrapped AlgorithmIdentifier OID and skips instantiation when the key is foreign and the CAST is still cold. Fixes the ~8s FIPS CMS/RSA-sign regression. Includes a FIPS regression test.

A decoder probed with a non-owned key instantiated a wolfCrypt key and fired that algorithm's lazy primitive-Z CAST before any OID check. Check the AlgorithmIdentifier OID and skip instantiation while the CAST is cold. Fixes the ~8s FIPS CMS/RSA-sign regression.
@aidangarske aidangarske self-requested a review June 24, 2026 18:05
@aidangarske aidangarske added the ci:all PR OSP toggle: run all label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:all PR OSP toggle: run all

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants