Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TF-M: increase default Mbed TLS heap size in TF-M #81869

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

valeriosetti
Copy link
Collaborator

This PR updates the TF-M reference in to include a couple of commits which are useful to properly size the heap memory allocated in TF-M for the crypto partition. This is necessary in order to allow Mbed TLS to handle RSA signatures with 2048-bits (previously only 1024-bits were possible).

Resolves #79864

@zephyrbot zephyrbot added the size: XS A PR changing only a single line of code label Nov 25, 2024
@zephyrbot
Copy link
Collaborator

zephyrbot commented Nov 25, 2024

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
trusted-firmware-m zephyrproject-rtos/trusted-firmware-m@bceac6c zephyrproject-rtos/trusted-firmware-m@fa020a8 (main) zephyrproject-rtos/[email protected]

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@valeriosetti
Copy link
Collaborator Author

Since GH did not automatically assigned reviewers to this PR, I manually added @ithinuel, @tomi-font, @d3zd3z, @Vge0rge as reported in the MAINTAINERS.yml file.

tomi-font
tomi-font previously approved these changes Nov 25, 2024
kartben
kartben previously approved these changes Nov 25, 2024
ithinuel
ithinuel previously approved these changes Nov 25, 2024
@henrikbrixandersen henrikbrixandersen added the area: TF-M ARM Trusted Firmware-M (TF-M) label Nov 25, 2024
@d3zd3z
Copy link
Collaborator

d3zd3z commented Nov 25, 2024

So, this seems reasonable, at least as far as RSA goes, but do you know where the requirement for RSA at all is coming from?

@valeriosetti
Copy link
Collaborator Author

So, this seems reasonable, at least as far as RSA goes, but do you know where the requirement for RSA at all is coming from?

If you meant "who is willing to use RSA signatures with 2048-bits" then I was notified by this issue #79864.

Instead if your question was more like "why RSA needs so much heap memory", it's because TF-M uses Mbed TLS in its crypto partition to perform crypto operations and there RSA uses heap memory a lot (through bignum module, in case you are curious).

Luckily the TF-M team already spotted this issue recently and they already had a fix for it, so it was quite easy for me to cherry-pick the fix from them.

@d3zd3z did I answered your question?

@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Nov 28, 2024
Copy link
Collaborator

@tomi-font tomi-font left a comment

Choose a reason for hiding this comment

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

Please change at least the title of the commit to be more explicit about what this is for than update reference.

tomi-font
tomi-font previously approved these changes Nov 28, 2024
Update TF-M reference to include a couple of commits which are
useful to properly size the stack & heap memory for Mbed TLS
in order to handle RSA signatures with 2048-bits (previously
only 1024-bits were possible).

Signed-off-by: Valerio Setti <[email protected]>
@valeriosetti
Copy link
Collaborator Author

valeriosetti commented Nov 29, 2024

I had to rebase to solve a conflict on west.yml. Please re-check :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: TF-M ARM Trusted Firmware-M (TF-M) manifest manifest-trusted-firmware-m size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests: subsys: jwt: libraries.encoding.jwt.rsa.psa fails
7 participants