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

[nrf noup] Workaround for PSA P256Keypair Generate #433

Conversation

ArekBalysNordic
Copy link
Contributor

This is a workaround to ensure thread-safety for P256Keypair generation when both Matter and Openthread threads want to generate keys.

@@ -63,6 +65,10 @@ CHIP_ERROR PSAOperationalKeystore::PersistentP256Keypair::Generate()

Destroy();

#ifdef CONFIG_NET_L2_OPENTHREAD
chip::DeviceLayer::ThreadStackMgr().LockThreadStack();
Copy link
Contributor

Choose a reason for hiding this comment

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

Worth adding a comment that it's a temporary hack.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added :)

This is workaround to ensure thread-safety for P256Keypair
generation when both Matter and Openthread threads want to
generate keys.

This workaround can be removed once the PSA core supports
thread-safety.
@ArekBalysNordic
Copy link
Contributor Author

Closing, because it will be repaired in the Crypto core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants