Skip to content

Feature: device key HAL addition #6267

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

Conversation

yossi2le
Copy link
Contributor

@yossi2le yossi2le commented Mar 5, 2018

Description

DeviceKey is a mechanism that can be used as a root of trust for key derivation, and is one of the most fundamental elements in the implementation of security in a device.

Pull request type

  • Feature

Copy link
Member

@bulislaw bulislaw left a comment

Choose a reason for hiding this comment

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

Looks good! Do you mind implementing support for another board we usually provide 2 reference implementations.

The DeviceKey consists of a secret and unique value per board instance, containing 128 or 256 bits.
There are several possible sources for this data, the preferred one is via this HAL API.
If this HAL API is not implemented and the device supports TRNG, mbedos will generate a DeviceKey the first time it is requested, using the TRNG, and save the value in the internal memory using NVStore.
As a last option, if none of the above is available, the DeviceKey can still be injected from outside the board and saved in NVStore using a dedicated API
Copy link
Member

Choose a reason for hiding this comment

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

I think we should mention that this value should be readable from outside or there shouldn't be a way to guess it someway (like mac generated base of it).


utest::v1::status_t greentea_test_setup(const size_t number_of_cases)
{
GREENTEA_SETUP(20, "default_auto");
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need 20s timeout? It looks like it could be 1-2sek


##### Undefined behavior
- There should not be any undefined behavior

Copy link
Member

Choose a reason for hiding this comment

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

Do you mind explicitly calling out dependencies, you can say none or actual presence of the identifier in hw.

@@ -0,0 +1,31 @@
### DeviceKey
Copy link
Member

Choose a reason for hiding this comment

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

@0xc0170 0xc0170 changed the title Device key HAL new API Feature: device key HAL addition Mar 12, 2018
@cmonr
Copy link
Contributor

cmonr commented Mar 15, 2018

@yossi2le Mind replying to @bulislaw's comments.

@yossi2le
Copy link
Contributor Author

Hi @bulislaw @cmonr
Currently we have stopped working on this PR. The device key HAL design is under evaluation and discussion regarding if it is actually needed. I am waiting for the final conclusion before either removing it or fixing @bulislaw remarks.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 19, 2018

Let's close this, and reopen with an update. @yossi2le Thanks for the update info

@0xc0170 0xc0170 closed this Mar 19, 2018
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.

4 participants