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

external: add the optiga-trust-m dependency #1329

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

benma
Copy link
Collaborator

@benma benma commented Nov 27, 2024

Needed to interact with the Optiga secure chip.

The optiga-trust-m module was forked to the BitBoxSwiss org, along with its own submodule mbedtls, so we are safe against deps disappearing.

@benma benma marked this pull request as ready for review December 2, 2024 11:40
@benma
Copy link
Collaborator Author

benma commented Dec 2, 2024

I've been developing locally on top of this PR for a while now, communicating with the chip, and had no issues. @NickeZ ready for review & merge.

Copy link
Collaborator

@NickeZ NickeZ left a comment

Choose a reason for hiding this comment

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

Overall looks good to me, left some comments

*/
#define OPTIGA_LIB_DEBUG_NULL_CHECK
/** @brief Maximum number of instance registration */
#define OPTIGA_CMD_MAX_REGISTRATIONS (0x06)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this be 1, does that have any impact on size?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Saves 288 bytes 😄

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@NickeZ actually 0x01 fails, 0x02 works. With 0x01, the second one fails:

    util = optiga_util_create(OPTIGA_INSTANCE_ID_0, optiga_lib_callback, NULL);
    if (NULL == util) {
        util_log("couldn't create optiga util");
        return false;
    }

    crypt = optiga_crypt_create(OPTIGA_INSTANCE_ID_0, optiga_lib_callback, NULL);
    if (NULL == crypt) {
        util_log("couldn't create optiga crypt");
        return false;
    }

Copy link
Collaborator

Choose a reason for hiding this comment

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

aha I see, they take one "cmd registration" each.

external/optiga_config.h Outdated Show resolved Hide resolved
external/optiga_config.h Outdated Show resolved Hide resolved
@benma benma requested a review from NickeZ December 3, 2024 18:21
Copy link
Collaborator

@NickeZ NickeZ left a comment

Choose a reason for hiding this comment

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

utACK

Needed to interact with the Optiga secure chip.

The optiga-trust-m module was forked to the BitBoxSwiss org, along
with its own submodule mbedtls, so we are safe against deps
disappearing.
@NickeZ
Copy link
Collaborator

NickeZ commented Dec 4, 2024

In the future we could probably reduce the size of the optiga lib by removing support for features as well.

@benma benma merged commit 1281685 into BitBoxSwiss:master Dec 4, 2024
3 checks passed
@benma benma deleted the secchip-deps2 branch December 4, 2024 09:25
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