Skip to content

Provide incremental by-subsystem initialization for the crypto library#202

Draft
athoelke wants to merge 1 commit intoARM-software:mainfrom
athoelke:crypto-partial-init
Draft

Provide incremental by-subsystem initialization for the crypto library#202
athoelke wants to merge 1 commit intoARM-software:mainfrom
athoelke:crypto-partial-init

Conversation

@athoelke
Copy link
Contributor

See #16 for discussion of this API, which enables partial initialization of the library. This is useful in constrained contexts, for example during early boot, when not all library functionality is required to support the application use case.

Fixes #16

@athoelke athoelke added enhancement New feature or request API design Related the design of the API Crypto API Issue or PR related to the Cryptography API labels Jul 15, 2024
@athoelke athoelke added this to the Crypto API 1.3 milestone Jul 15, 2024
@athoelke athoelke force-pushed the crypto-partial-init branch from 314871a to a4b7323 Compare September 4, 2024 12:47
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm left a comment

Choose a reason for hiding this comment

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

This design was prototyped in Mbed-TLS/mbedtls#6636 and I consider that prototype to be sufficient validation for the API design.

The specification looks good to me except for a few places where some Mbed TLS specific history remains.

@athoelke athoelke force-pushed the crypto-partial-init branch from a4b7323 to 5360369 Compare November 5, 2024 09:59
@athoelke
Copy link
Contributor Author

athoelke commented Nov 5, 2024

Rebased and updated this PR

Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm left a comment

Choose a reason for hiding this comment

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

I've reviewed up to 5360369. Ok so far. Still to be addressed:

@athoelke
Copy link
Contributor Author

athoelke commented Nov 5, 2024

I've reviewed up to 5360369. Ok so far. Still to be addressed:

I think I've covered all except the need for some discussion of accelerators, secure elements, and built-in keys within the document.

I plan to deal with that in a separate PR, unless you would prefer to keep it coupled with this one?

@athoelke
Copy link
Contributor Author

athoelke commented Nov 5, 2024

Ah, I realise that this one still needs a change to the PR.

@gilles-peskine-arm
Copy link
Contributor

Ok for a separate PR. But I don't think considerations around “drivers” and “built-in keys” should leak outside the specification of subsystem initialization for now.

@athoelke
Copy link
Contributor Author

athoelke commented Nov 6, 2024

Ok for a separate PR. But I don't think considerations around “drivers” and “built-in keys” should leak outside the specification of subsystem initialization for now.

I think I could reword the text for the subsystem definitions to avoid talking about 'drivers' - which suggests a specific way of a portable implementation providing support for varied hardware. I just need to review the spec for a mention of 'secure element' and 'accelerator', and add/amend if necessary.

@athoelke
Copy link
Contributor Author

athoelke commented Nov 6, 2024

I've added a couple more commits.

  • In one I add some terms to the glossary for accelerators, secure elements and built-int keys - using these in appropriate places.
  • I have removed 'registering drivers' from the text in the subsystem initialization
  • In the other, I add a recommendation for implementation of 'all subsystem' initialization.

I think this addresses all of the outstanding comments.

@athoelke athoelke force-pushed the crypto-partial-init branch from 74df62f to 0ad77a5 Compare December 16, 2024 14:09
@athoelke athoelke marked this pull request as draft December 17, 2024 09:55
@athoelke
Copy link
Contributor Author

This is will not be in the next release of mbed TLS (4.0), and we prefer to only include new API when there is an implementation of the interface,

@athoelke athoelke force-pushed the crypto-partial-init branch from 0fa957c to 9445f62 Compare January 28, 2026 20:56
@athoelke
Copy link
Contributor Author

I've rebased this for possible inclusion into v1.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API design Related the design of the API Crypto API Issue or PR related to the Cryptography API enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

Incremental/partial initialization of a Crypto implementation

3 participants