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

Make buffers dynamically sized in Mbed Provider #58

Merged
merged 1 commit into from
Oct 29, 2019

Conversation

ionut-arm
Copy link
Member

@ionut-arm ionut-arm commented Oct 29, 2019

Buffer sizes are now dynamically computed based on the macros provided in crypto_sizes.h.

Resolves #27

@ionut-arm ionut-arm added the enhancement New feature or request label Oct 29, 2019
@ionut-arm ionut-arm self-assigned this Oct 29, 2019
}

/// Compute the size of the asymmetric signature, given the key attributes of the signing key.
pub fn psa_asymmetric_sign_output_size(key_attrs: &psa_key_attributes_t) -> Result<usize> {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it would be nice to add where do those functions come from? Something like which C file, which macro are they implementing? It would help for maintaining in the future I think.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

This commit makes the sizes of buffers used by the mbed provider
dynamic, computed at runtime based on key attributes, the same way
that mbed crypto calculates them.

Signed-off-by: Ionut Mihalcea <[email protected]>
Copy link
Member

@hug-dev hug-dev left a comment

Choose a reason for hiding this comment

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

Thank you!

@ionut-arm ionut-arm merged commit bbaee33 into parallaxsecond:master Oct 29, 2019
@ionut-arm ionut-arm deleted the buffer_size branch October 29, 2019 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use dynamically-sized buffers in Mbed provider
2 participants