Skip to content

update rsa2048 and ecc_nist_p256 to policy_b#3471

Closed
arianvp wants to merge 2 commits intotpm2-software:masterfrom
arianvp:patch-1
Closed

update rsa2048 and ecc_nist_p256 to policy_b#3471
arianvp wants to merge 2 commits intotpm2-software:masterfrom
arianvp:patch-1

Conversation

@arianvp
Copy link

@arianvp arianvp commented Apr 15, 2025

Pretty sure this was incorrect. All the EK templates in the High Range should use Policy B; not Policy A

See B.4.5 Template H-2: ECC NIST P256 (Storage)

for source https://trustedcomputinggroup.org/wp-content/uploads/EK-Credential-Profile-For-TPM-Family-2.0-Level-0-V2.5-R1.0_28March2022.pdf

Maybe we should come up with better names for these

e.g. ecc-low and ecc-high ?

arianvp added 2 commits April 16, 2025 00:59
Pretty sure this was incorrect.  All the EK templates in the High Range should use Policy B; not Policy A

See B.4.5 Template H-2: ECC NIST P256 (Storage)

for source https://trustedcomputinggroup.org/wp-content/uploads/EK-Credential-Profile-For-TPM-Family-2.0-Level-0-V2.5-R1.0_28March2022.pdf
static const alg_map alg_maps[] = {
{ "rsa", "rsa2048:aes128cfb", "sha256", &policy_a_sha256, ATTRS_A },
{ "rsa2048", "rsa2048:aes128cfb", "sha256", &policy_a_sha256, ATTRS_A },
{ "rsa2048", "rsa2048:aes128cfb", "sha256", &policy_b_sha256, ATTRS_B },
Copy link
Author

@arianvp arianvp Apr 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps instead we want to introduce new rsa2048_high and etc_nist_p256_high aliases?

@arianvp arianvp changed the title update ecc_nist_p256 to policy_b update rsa2048 and ecc_nist_p256 to policy_b Apr 15, 2025
@JuergenReppSIT
Copy link
Member

@arianvp your pr will not compile because policy_b_sha256 is currently not defined. And as you wrote the best solution would be not to delete the old entries in alg_map but add rsa2048_high and etc_nist_p256_high` to alg_map.

JuergenReppSIT added a commit to JuergenReppSIT/tpm2-tools that referenced this pull request May 2, 2025
 According to the EK Credential Profile
 B.4.4.1 Template H-1: RSA 2048 (Storage)
 B.4.4.2 Template H-2: ECC NIST P256 (Storage) and
 The high range templates are added.
 Addresses: tpm2-software#3471

Signed-off-by: Juergen Repp <juergen_repp@web.de>
@JuergenReppSIT
Copy link
Member

@arianvp Thank you for reporting the problem. I have added a PR based on your suggestion.

AndreasFuchsTPM pushed a commit that referenced this pull request Oct 15, 2025
 According to the EK Credential Profile
 B.4.4.1 Template H-1: RSA 2048 (Storage)
 B.4.4.2 Template H-2: ECC NIST P256 (Storage) and
 The high range templates are added.
 Addresses: #3471

Signed-off-by: Juergen Repp <juergen_repp@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants