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

mbedtls_mpi_write_string() could be reduced to use less RAM. #2216

Closed
RonEld opened this issue Nov 20, 2018 · 1 comment
Closed

mbedtls_mpi_write_string() could be reduced to use less RAM. #2216

RonEld opened this issue Nov 20, 2018 · 1 comment
Assignees
Labels
component-crypto Crypto primitives and low-level interfaces enhancement historical-reviewed Reviewed & agreed to keep legacy PR/issue

Comments

@RonEld
Copy link
Contributor

RonEld commented Nov 20, 2018

Description

Enhancement\Feature Request

Justification - why does the library need this feature?
It always best to reduce RAM usage, and mbedtls_mpi_write_string() is not time-critical

Suggested enhancement
From #2214 (review):

Let's safe some bytes and RAM here instead, by not using T. Suggestion: Document that mpi_write_hlp() ignores the sign and just pass X instead of the local copy T.

From #2214 (review):

I think we should call mpi_write_hlp() even for radix 16 and get rid of the radix == 16 branch - it might not be as fast as the hand-coded version, but mbedtls_mpi_write_string() is not time-critical anyway.

@RonEld RonEld added enhancement component-crypto Crypto primitives and low-level interfaces labels Nov 20, 2018
@hanno-becker hanno-becker self-assigned this Nov 20, 2018
@daverodgman daverodgman added historical-reviewing Currently reviewing (for legacy PR/issues) historical-reviewed Reviewed & agreed to keep legacy PR/issue and removed historical-reviewing Currently reviewing (for legacy PR/issues) labels Oct 20, 2022
@daverodgman
Copy link
Contributor

Closing - this is only likely to be used in debug builds, so impact is very limited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-crypto Crypto primitives and low-level interfaces enhancement historical-reviewed Reviewed & agreed to keep legacy PR/issue
Projects
None yet
Development

No branches or pull requests

3 participants