Repository navigation
Shrink the Secure PSA profiles with direct P-256 and one AEAD option - #93
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #93
Scan targets checked: wolftrust-src, wolftrust-bugs
Not reviewed (no scan target covers them): .github/workflows/cross-compile.yml, docs/Crypto-Engines.md, docs/Macros.md, docs/Security-Model.md, docs/Services.md, docs/TF-M-Compatibility.md, docs/Threat-Model.md, mk/common.mk, tests/host/Makefile, tests/host/keystore_ipc/Makefile, tests/host/keystore_ipc/user_settings.h, tests/host/native_wire/Makefile, tests/host/native_wire/user_settings.h, tests/host/negatives/Makefile, tests/host/negatives/user_settings.h, tests/host/nvm_boot/Makefile, tests/host/ps_service/Makefile, tests/host/ps_service/user_settings.h, tests/host/psa_secure_crypto/Makefile, tests/host/psa_secure_crypto/user_settings.h and 3 more
Coverage: 12 of 14 in-scope changed file(s) opened by the reviewer; not opened: src/services/wolfhsm/wt_hsm_aead.c, tests/host/psa_storage_client/main.c
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Max
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #93
Scan targets checked: none
Unchanged since last review (not re-run): wolftrust-src, wolftrust-bugs
Not reviewed (no scan target covers them): .github/workflows/cross-compile.yml, docs/Crypto-Engines.md, docs/Macros.md, docs/Security-Model.md, docs/Services.md, docs/TF-M-Compatibility.md, docs/Testing.md, docs/Threat-Model.md, mk/common.mk, mk/layout.mk, port/mcxn947/port.json, port/mimxrt700/port.json, port/stm32h563/port.json, port/stm32l562/port.json, tests/host/Makefile, tests/host/keystore_ipc/Makefile, tests/host/keystore_ipc/user_settings.h, tests/host/manifest_render/test_manifest_render.py, tests/host/native_wire/Makefile, tests/host/native_wire/user_settings.h and 12 more
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Lite
18ca33d to
e5dcfcd
Compare
62f6b99 to
720ee1b
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #93
Scan targets checked: wolftrust-src, wolftrust-bugs
Not reviewed (no scan target covers them): .github/workflows/README.md, .github/workflows/cross-compile.yml, AGENTS.md, Makefile, README.md, docs/Architecture.md, docs/Building.md, docs/Crypto-Engines.md, docs/Footprint.md, docs/Interface-Profiles.md, docs/MCXN947-Guide.md, docs/MIMXRT700-Guide.md, docs/Macros.md, docs/PKCS11.md, docs/Porting.md, docs/Ports.md, docs/STM32H5-Guide.md, docs/STM32L562-Guide.md, docs/Security-Model.md, docs/Services.md and 54 more
Coverage: 9 of 25 in-scope changed file(s) opened by the reviewer; not opened: include/wolftrust/services/hsm.h, include/wolftrust/services/hsm_relay.h, include/wolftrust/services/initial_attestation.h, port/common/attest_dev_key.c, src/services/attestation_service.c, src/services/hsm_relay_service.c, src/services/native/crypto_native.c, tests/firmware/interface-guest/tpm_tests.c, tests/firmware/psa-guest/main.c, tests/firmware/zephyr-stm32h5/apps/guest0_psa/src/attestation_verify.c and 6 more
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Lite
tiny,small,defaultandextendedeverywhere (wassymmetric,lean,standard,compat/full),WT_TIERissmoke|all, andWT_TEST_PROFILESreplacesWT_PROFILE=bothdefaultprofile (GCM and CCM, CTR, P-256 ECDSA and ECDH, SHA-256, HMAC, HKDF); CBC, ECB, PBKDF2, the TLS 1.2 PRF, SP 800-108, CCM* and deterministic ECDSA move toextendedextended, P-256 runs on wolfPSA's direct SP path, soecc.candsp_intleave the image;extendedkeeps them for deterministic ECDSAWT_AEAD=gcm|ccmreplacesWT_VAULT_AEADand picks both the vault AEAD and the single PSA AEAD ofsmallandtiny(CCM by default)tinylinks no ECC: attestation tokens are COSE_Mac0 HMAC 256/256 (WT_ATTEST_KEY=hmac) and the vault refuses P-256 (WT_VAULT_ECC=0). Both flags work on any profile, and ECC drops out of the image only when nothing uses itwt_port_attest_hmac_key(); reference ports link a public development key and the build warns (WT_ATTEST_DEV_KEY=0makes the port supply its own). The Instance ID follows the RFC 9783 Appendix A.2 example, which is also the known-answer testextendedand 5 KiB in the other profiles, sized from measured peaks, and the crypto data band shrinks to the wolfPSA pool plus 1,536 Bleanorsymmetricwith Secure PSA must build withWT_AEAD=gcm; a build that relied oncompatas the default must now setWT_PROFILE=extendedtinyon every port and checks that no ECC symbol links, builds each new flag on its own, rejects bad values andWT_ATTEST_DEV_KEY=0without a port key, and checks eachsmallWT_AEADvalue links only the chosen AEAD, and thatsmallandtinykeep GCM withWT_SECURE_PSA=0attestation_hmac(token layout, independent HMAC verify, RFC vector) andattest_restore(key reload after a partition restart), plus no-ECC variants ofnative_wire,attestation_serviceandpsa_secure_cryptoPSA_ERROR_NOT_SUPPORTED, so the client is not panicked as it would be for an unknown operationtinySecure PSA profile, which is what the Secure image refuses, not underWT_VAULT_ECC=0lib/wolfPSApinned to the wolfPSA Reduce TPM2 and PKCS11 size and cover both crypto engines #81 merge 58f92697tinyatteston all 4 ports buildstinywith Secure PSA, faults the attestation partition so it restarts on a reset band, then has the guest verify the COSE_Mac0 under the development key (Instance ID included), reject a tampered token and see P-256 refused, and checks no P-256 symbol is linkedSERVICE_HSMdependency (new generator--drop-dependency), so that partition can no longer connect to the crypto servicecompaton main,defaulthere)compatcrypto set /WT_SECURE_PSA_PROFILE=extendedstandard/defaultlean/smallsymmetric/tiny(no ECC)full/extendedwith add-onsWT_SECURE_PSA=0